Beispiel #1
0
 private void WarGrid1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         //long bookingid =long.Parse(WarGrid1.SelectedRows[0].Cells[2].Value.ToString());
         long         bookingid = long.Parse(WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[2].Value.ToString());
         PayablePayUI p         = new PayablePayUI(bookingid);
         p.ShowDialog();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #2
0
        internal void Cellcliick()
        {
            var value = WarGrid1.SelectedCells[0].Value.ToString();

            if (WarGrid1.SelectedCells[0].ColumnIndex == 0)
            {
                long         bookingid = long.Parse(WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[2].Value.ToString());
                PayablePayUI bk        = new PayablePayUI(bookingid);
                bk.ShowDialog();
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 1)
            {
                CompanyUI bk = new CompanyUI(long.Parse(value));
                bk.ShowDialog();
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 2)
            {
                BookingInfoUI b = new BookingInfoUI(long.Parse(value));
                b.ShowDialog();
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 3)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 4)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 5)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 6)
            {
            }
            else if (WarGrid1.SelectedCells[0].ColumnIndex == 7)
            {
            }
        }