Exemplo n.º 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;
            }
        }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     CarsForm CF = new CarsForm();
     CF.Show();
 }