private void button1_Click(object sender, EventArgs e) { try { CustomerUI bk = new CustomerUI(long.Parse(Custmer_Or_Agent_ID_Txt.Text)); bk.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void ButtonForCustmerRegister_Click(object sender, EventArgs e) { try { CustomerUI c = new CustomerUI(); c.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
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) { } }
internal void Cellcliick() { var value = WarGrid1.SelectedCells[0].Value.ToString(); // var referencetype = Convert.ToInt32(WarGrid1.SelectedRows[0].Cells[1].Value.ToString()); if (WarGrid1.SelectedCells[0].ColumnIndex == 0) { if (SearchFor == 1) { CustomerUI bk = new CustomerUI(long.Parse(value)); bk.ShowDialog(); } else if (SearchFor == 2) { AgentUI bk = new AgentUI(long.Parse(value)); bk.ShowDialog(); } } else if (WarGrid1.SelectedCells[0].ColumnIndex == 1) { } 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) { } else if (WarGrid1.SelectedCells[0].ColumnIndex == 10) { long v = long.Parse(value); if (v > 50000) { AgentUI bk = new AgentUI(long.Parse(value)); 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 { 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 pnr = WarGrid1.Rows[WarGrid1.SelectedCells[0].RowIndex].Cells[2].Value.ToString(); SaudiVisaStampUI bk = new SaudiVisaStampUI(pnr); bk.ShowDialog(); } }
private void BookedBy_ReferenceCode_Link_Click(object sender, EventArgs e) { try { if (referencetypeVar == 1) { CustomerUI c = new CustomerUI(long.Parse(BookedBy_ReferenceCode_Link.Text)); c.ShowDialog(); } else if (referencetypeVar == 2) { AgentUI a = new AgentUI(long.Parse(BookedBy_ReferenceCode_Link.Text)); a.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void ImageR_Click(object sender, EventArgs e) { try { if (orignalCustomerid > 80001) { CustomerUI bk = new CustomerUI(orignalCustomerid); if (bk != null) { bk.ShowDialog(); } } else { } } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btn_print_Click(object sender, EventArgs e) { try { using (IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ConnectionString)) { if (db.State == ConnectionState.Closed) { db.Open(); string sql = $"Select CT.cusID,Ct.FirstName,CT.LastName,CT.ContactNum,CT.cus_address,CT.regDate,FOH.quantity,FOH.totAmt,FOH.OrderedTimes_Flag From Customer_Table CT Inner Join Food_Order_Header FOH on CT.cusID=FOH.cus_No where regDate BETWEEN '{dtp_FromDate.Value.ToString().Substring(0, 9)}' AND '{dtp_ToDate.Value.ToString().Substring(0, 9)}'"; List <CustomerDetails> list = db.Query <CustomerDetails>(sql, commandType: CommandType.Text).ToList(); using (CustomerUI obj = new CustomerUI(list)) { obj.ShowDialog(); } } } } catch { throw; } }