private void btn_Back_Click(object sender, EventArgs e) { this.Hide(); form_AdminSession AdminHome = new form_AdminSession(); AdminHome.ShowDialog(); this.Close(); }
public void Addredcord() { if (!Validation()) return; BALSecUser oBALSecUser = new BALSecUser(); oBALSecUser.CRUD = "Search"; oBALSecUser.UserID = txt_UserName.Text; oBALSecUser.Password = txt_Password.Text; DataTable dtSearch = new DataTable(); dtSearch = oBALSecUser.SecUser(oBALSecUser); if (dtSearch != null && dtSearch.Rows.Count > 0) { //long _barCode = RandomNumber6D(); //MessageBox.Show(_barCode.ToString()); this.Hide(); form_AdminSession AdminHome = new form_AdminSession(); AdminHome.ShowDialog(); this.Close(); } else { MessageBox.Show("Id Or Password Not Correct"); } }
private void btn_Register_Click(object sender, EventArgs e) { try { BALCust_Registration NewCustomer = new BALCust_Registration(); NewCustomer.CRUD = "Insert"; NewCustomer.RFID = Convert.ToInt32(txt_RFID1.Text.Trim()); NewCustomer.Name=txt_Name.Text.Trim(); NewCustomer.FName = txt_FatherName.Text.Trim(); NewCustomer.NicNo = Convert.ToInt32(txt_NICNo.Text.Trim()); NewCustomer.CarNo = txt_CarNo.Text.Trim(); NewCustomer.CarName = cbo_CarName.SelectedText; NewCustomer.CarManufacturer = txt_FatherName.Text.Trim(); NewCustomer.EngineNo = txt_EngineNo.Text.Trim(); NewCustomer.ChasisNo = txt_ChasisNo.Text.Trim(); NewCustomer.LicenseNo = txt_LicenseNo.Text.Trim(); DataTable dtInsert = new DataTable(); dtInsert = NewCustomer.Cust_Registration(NewCustomer); this.Hide(); MessageBox.Show("Successfully Registered"); form_AdminSession AdminHome = new form_AdminSession(); AdminHome.ShowDialog(); this.Close(); ////txt_Name.Text = Convert.ToInt32(["RFID"]); //txt_FatherName.Text = dt.Rows[0]["FName"].ToString(); //txt_NICNo.Text = dt.Rows[0]["NicNo"].ToString(); //txt_CarNo.Text = dt.Rows[0]["CarNo"].ToString(); //cbo_CarName.Text = dt.Rows[0]["CarName"].ToString(); //cbo_CarManufacturer.Text = dt.Rows[0]["CarManufacturer"].ToString(); //txt_EngineNo.Text = dt.Rows[0]["EngineNo"].ToString(); //txt_ChasisNo.Text = dt.Rows[0]["ChasisNo"].ToString(); //txt_LicenseNo.Text = dt.Rows[0]["LicenseNo"].ToString(); } catch (Exception eX) { MessageBox.Show(eX.Message); } }