Name], +
Printers. Name As [Printer Name], Staff. [First Name], Staff. [Last Name] From Boards, Mounters, Printers, Staff, Productions +
where Productions. [Board_id]=Boards. Board_id And Productions. [Mounter_id]=Mounters. Mounter_id And +
Productions. [Printer_id]=Printers. Printer_id And Productions. Staff_id=Staff. Staff_id Andstart lt;=Productions. Date And Productions. Date lt;=@ end raquo ;, conn); param=new SqlParameter () ;. ParameterName= @ start raquo ;;. Value=Convert. ToDateTime (start) ;. SqlDbType=SqlDbType. Date ;. Parameters. Add (param);=new SqlParameter () ;. ParameterName= @ end raquo ;;. Value=Convert. ToDateTime (end) ;. SqlDbType=SqlDbType. Date ;. Parameters. Add (param); (SqlDataReader dr=cmd. ExecuteReader ())
{dtTable=new DataTable (); (int i=0; i lt; dr. FieldCount; i ++)
{. Columns. Add (dr. GetName (i). ToString (). Trim ());
} (dr. Read ())
{. Rows. Add (dr. GetValue (0). ToString (). Trim (), dr. GetValue (1). ToString (). Trim (), dr. GetValue (2). ToString (). Trim (), dr. GetValue (3). ToString (). Trim (), dr. GetValue (4). ToString (). Trim (), dr. GetValue (5). ToString (). Trim ());
} bind=new Binding () ;. Source=dtTable ;. SetBinding (DataGrid. ItemsSourceProperty, bind) ;. Items. Refresh ();
}. Close () ;. Dispose ();
}
}
}
8.2 Модуль вікна Додати
8.2.1 Файл уявлення add. xaml
lt; Window x: Class= Motherboard. add = # justify" gt; lt; Grid gt;
lt; GroupBox Header= Введіть дані Height= 216 HorizontalAlignment= Left Name= groupBox3 VerticalAlignment= Top Width= 478 gt; lt;/GroupBox gt;
lt; Grid Name= gbGrid Width= 409 Margin= 6,12,8,12 gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,6,0,0 Name= Printer_id VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,35,0,0 Name= Name_printer VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,64,0,0 Name= Type_printer VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,6,0,0 Name= Mounter_id VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,35,0,0 Name= Name_mounter VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,64,0,0 Name= Speed ?? VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,6,0,0 Name= Staff_id VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,35,0,0 Name= First_name VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,64,0,0 Name= Last_name VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,6,0,0 Name= Customer_id VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,35,0,0 Name= Name_customer VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,6,0,0 Name= Board_id VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,35,0,0 Name= Elements VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,64,0,0 Name= Customer_board VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left Margin= 106,93,0,0 Name= Name_board VerticalAlignment= Top Width= 120 Visibility= Hidden / gt;
lt; TextBox Height= 23 HorizontalAlignment= Left M...