예제 #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();
 }