1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Data.SqlClient;
- namespace Transportation
- {
- public partial class SortingVehicle : Form
- {
- SqlCommand query = null;
- SqlDataAdapter dataAdapter = null;
- DataSet dataSet = null;
- public SortingVehicle()
- {
- InitializeComponent();
- }
- private void VehiclesSortingDGV_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
-
- }
- private void SortingVehicle_Load(object sender, EventArgs e)
- {
- dataAdapter = new SqlDataAdapter($"select code_vehicle as 'Код автомобиля', (executors.surname_executor + ' ' + executors.name_executor + ' ' + executors.midname_executor) as 'ФИО исполнителя', brand_vehicle as 'Марка автомобиля', model_vehicle as 'Модель автомобиля', number_vehicle as 'Гос. номер автомобиля', name_category as 'Категория прицепа', volume_body as 'Тоннаж', length_body as 'Длина автомобиля', width_body as 'Ширина автомобиля', height_body as 'Высота автомобиля' from vehicles, executors, category_trailer where vehicles.code_executor = executors.code_executor and vehicles.code_category = category_trailer.code_category and volume_body like {MainMenu.sort}", dbhelper.sqlConnection);
- dataSet = new DataSet();
- dataAdapter.Fill(dataSet);
- VehiclesSortingDGV.DataSource = dataSet.Tables[0];
- }
- }
- }
|