internal void Cellcliick() { var value = WarGrid1.SelectedCells[0].Value.ToString(); if (WarGrid1.SelectedCells[0].ColumnIndex == 1) { CustomerUI bk = new CustomerUI(long.Parse(value)); bk.ShowDialog(); } else { long ss = long.Parse(WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[0].Value.ToString()); ProtectorUI bk = new ProtectorUI(ss); bk.ShowDialog(); } }
internal void Cellcliick() { //var value = WarGrid1.SelectedCells[0].Value.ToString(); //if (WarGrid1.SelectedCells[0].ColumnIndex == 1) //{ // CustomerUI bk = new CustomerUI(long.Parse(value)); // bk.ShowDialog(); //} //else //{ string check = WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[7].Value.ToString(); var value = WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[1].Value.ToString(); if (check.ToLower().Contains("protector") == true) { ProtectorUI bk = new ProtectorUI(long.Parse(value)); bk.ShowDialog(); } else if (check.ToLower().Contains("dubai") == true) { DubaiVisitUI bk = new DubaiVisitUI(long.Parse(value)); bk.ShowDialog(); } else if (check.ToLower().Contains("saudi") == true) { SaudiVisaStampUI bk = new SaudiVisaStampUI(value); bk.ShowDialog(); } else if (check.ToLower().Contains("ticket") == true) { TicketUI bk = new TicketUI(value); bk.ShowDialog(); } else if (check.ToLower().Contains("booking") == true) { BookingInfoUI bk = new BookingInfoUI(long.Parse(value)); bk.ShowDialog(); } //} }
private void ServiceIdLinkTxt_Click(object sender, EventArgs e) { try { var value = ServiceIdLinkTxt.Text; var check = ServiceNameLinkTxt.Text; if (check.ToLower().Contains("protector") == true) { ProtectorUI bk = new ProtectorUI(long.Parse(value)); bk.ShowDialog(); } else if (check.ToLower().Contains("dubai") == true) { DubaiVisitUI bk = new DubaiVisitUI(long.Parse(value)); bk.ShowDialog(); } else if (check.ToLower().Contains("saudi") == true) { SaudiVisaStampUI bk = new SaudiVisaStampUI(value); bk.ShowDialog(); } else if (check.ToLower().Contains("ticket") == true) { TicketUI bk = new TicketUI(value); bk.ShowDialog(); } else if (check.ToLower().Contains("booking") == true) { BookingInfoUI bk = new BookingInfoUI(long.Parse(value)); bk.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }