示例#1
0
        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (dataGridView.CurrentRow.Index >= dataGridView.RowCount - 1)
            {
                return;
            }
            id.Text = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString();
            int Id = int.Parse(id.Text);

            ShowShipping(Id);
            shipping Shipping = Functions.FindShipping(Id);

            if (dataGridView1.CurrentCell.ColumnIndex == 1)
            {
                DriversForm DF = new DriversForm(Shipping.DriverId);
                DF.Show();
                return;
            }
            if (dataGridView1.CurrentCell.ColumnIndex == 2)
            {
                CarsForm CF = new CarsForm(Shipping.CarId);
                CF.Show();
                return;
            }
            if (dataGridView1.CurrentCell.ColumnIndex == 3)
            {
                FreightsForm FF = new FreightsForm(Shipping.FreightId);
                FF.Show();
                return;
            }
        }
示例#2
0
        public static void getDrivers()
        {
            projektEntities ctx   = new projektEntities();
            var             query = from driver in ctx.drivers
                                    select new
            {
                Driver = driver
            };

            DriversForm.clearDataGridView();

            foreach (var result in query)
            {
                DriversForm.fillDataGridView(result.Driver.Id, result.Driver.Name, result.Driver.Surname, result.Driver.Wage, result.Driver.ADR_License, result.Driver.Employed, result.Driver.Busy, result.Driver.Comment);
            }
        }
示例#3
0
        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (dataGridView.CurrentRow.Index >= dataGridView.RowCount - 1)
            {
                return;
            }
            id.Text = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString();
            int Id = int.Parse(id.Text);
            ShowShipping(Id);
            shipping Shipping = Functions.FindShipping(Id);

            if (dataGridView1.CurrentCell.ColumnIndex == 1)
            {
                DriversForm DF = new DriversForm(Shipping.DriverId);
                DF.Show();
                return;
            }
            if (dataGridView1.CurrentCell.ColumnIndex == 2)
            {
                CarsForm CF = new CarsForm(Shipping.CarId);
                CF.Show();
                return;
            }
            if (dataGridView1.CurrentCell.ColumnIndex == 3)
            {
                FreightsForm FF = new FreightsForm(Shipping.FreightId);
                FF.Show();
                return;
            }
        }
示例#4
0
文件: MainForm.cs 项目: lukadut/bazy
        private void button2_Click(object sender, EventArgs e)
        {
            DriversForm DF = new DriversForm();

            DF.Show();
        }
示例#5
0
文件: MainForm.cs 项目: lukadut/bazy
 private void button2_Click(object sender, EventArgs e)
 {
     DriversForm DF = new DriversForm();
     DF.Show();
 }