internal void Cellcliick() { var value = WarGrid1.SelectedCells[0].Value.ToString(); var referencetype = Convert.ToInt32(WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[1].Value.ToString()); if (WarGrid1.SelectedCells[0].ColumnIndex == 0) { BookingInfoUI bk = new BookingInfoUI(long.Parse(value)); bk.ShowDialog(); } else if (WarGrid1.SelectedCells[0].ColumnIndex == 1) { } else if (WarGrid1.SelectedCells[0].ColumnIndex == 2) { if (referencetype == 1) { CustomerUI bk = new CustomerUI(long.Parse(value)); bk.ShowDialog(); } else if (referencetype == 2) { AgentUI bk = new AgentUI(long.Parse(value)); bk.ShowDialog(); } //BookingInfoUI b = new BookingInfoUI(long.Parse(value)); //b.ShowDialog(); } else if (WarGrid1.SelectedCells[0].ColumnIndex == 3) { } else if (WarGrid1.SelectedCells[0].ColumnIndex == 4) { PackageUI bk = new PackageUI(long.Parse(value)); bk.ShowDialog(); } else if (WarGrid1.SelectedCells[0].ColumnIndex == 5) { } else if (WarGrid1.SelectedCells[0].ColumnIndex == 6) { // long bookingidrec = long.Parse( WarGrid1.SelectedRows[0].Cells[0].Value.ToString()); var bookingidrec = long.Parse(WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[6].Value.ToString()); PrintUI bk = new PrintUI(bookingidrec); bk.ShowDialog(); } else if (WarGrid1.SelectedCells[0].ColumnIndex == 7) { } }
private void BillId_Link_Click(object sender, EventArgs e) { try { PrintUI p = new PrintUI(long.Parse(BillId_Link.Text)); p.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void WarGrid1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { //long bookingid = long.Parse(WarGrid1.SelectedRows[0].Cells[3].Value.ToString()); var bookingid = Convert.ToInt32(WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[0].Value.ToString()); PrintUI p = new PrintUI(bookingid); p.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }