private void TxtCompany_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { TxtAddress.Focus(); } }
private void TxtDivision_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { TxtAddress.Focus(); } }
private void TxtMobile_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) // 엔터 { TxtAddress.Focus(); } }
private String Check() { if (TxtName.Text == "") { MessageBox.Show("Please enter a name"); TxtName.Focus(); return("Error"); } else if (TxtDesignation.Text == "") { MessageBox.Show("Please enter a designation"); TxtDesignation.Focus(); return("Error"); } else if (TxtContact.Text == "") { MessageBox.Show("Please enter a contact no"); TxtContact.Focus(); return("Error"); } else if (TxtAddress.Text == "") { MessageBox.Show("Please enter a address"); TxtAddress.Focus(); return("Error"); } else { return("OK"); } }
protected void TxtCmpyCode_TextChanged(object sender, EventArgs e) { try { string Cmcode = TxtCmpyCode.Text.Trim().Split(Constants.splitseperator)[0].ToString().Trim(); bool Auth = Masters.GetCodeValidation("Company", Cmcode); if (Auth) { MessageBox("Company Code Already Exist"); TxtCmpyCode.Text = ""; TxtCmpyCode.Focus(); } else { TxtAddress.Focus(); } } catch { } }
protected void btnSave_Click(object sender, EventArgs e) { if (TxtFirstName.Text == "" || TxtFirstName.Text == string.Empty) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Information", "alert('please Enter Child First Name')", true); TxtFirstName.Focus(); return; } if (TxtLastName.Text == "" || TxtLastName.Text == string.Empty) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Information", "alert('please Enter Child Last Name')", true); TxtLastName.Focus(); return; } if (TxtMiddleName.Text == "" || TxtMiddleName.Text == string.Empty) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Information", "alert('please Enter Child Middle Name')", true); TxtMiddleName.Focus(); return; } if (TxtDOB.Text == "" || TxtDOB.Text == string.Empty) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Information", "alert('please Enter Child Date Of Birth')", true); TxtMiddleName.Focus(); return; } if (TxtAdmissionDate.Text == "" || TxtAdmissionDate.Text == string.Empty) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Information", "alert('please Enter Enquiry Date for Admission ')", true); TxtAdmissionDate.Focus(); return; } if (TxtAddress.Text == "" || TxtAddress.Text == string.Empty) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Information", "alert('please Enter Address')", true); TxtAddress.Focus(); return; } if (TxtStandard.Text == "" || TxtStandard.Text == string.Empty) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Information", "alert('please Enter Child Standard')", true); TxtStandard.Focus(); return; } if (TxtWhatsupNumber.Text == "" || TxtWhatsupNumber.Text == string.Empty) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Information", "alert('please Enter Whats app Number For Contact')", true); TxtWhatsupNumber.Focus(); return; } EWA_Admission objEWA = new EWA_Admission(); BL_Admission objBAL = new BL_Admission(); objEWA.FirstName = TxtFirstName.Text; objEWA.LastName = TxtLastName.Text; objEWA.MiddleName = TxtMiddleName.Text; objEWA.ParentEmail = TxtEmail.Text; objEWA.MobileNo = TxtWhatsupNumber.Text; objEWA.BirthDate = TxtDOB.Text; objEWA.ApplicationDate = TxtAdmissionDate.Text; objEWA.Branch1 = TxtStandard.Text; objEWA.AddressLine1 = TxtAddress.Text; int flag = objBAL.InsertEnquiryInfo(objEWA); if (flag > 0) { Clear(); msgBox.ShowMessage("Form Submitted Successfully", "Saved", UserControls.MessageBox.MessageStyle.Successfull); } else { msgBox.ShowMessage("Some Problem Occured....", "Critical", UserControls.MessageBox.MessageStyle.Critical); } }
private void BtnSaveClient_Click(object sender, EventArgs e) { if (TxtName.Text != "") { if (TxtSurname.Text != "") { if (TxtCuit.Text != "") { if (TxtAddress.Text != "") { if (TxtNumberAddress.Text != "") { if (TxtNumberDoc.Text != "") { string name = TxtName.Text; string surname = TxtSurname.Text; string phone = TxtPhone.Text; string cuit = TxtCuit.Text; string mail = TxtMail.Text; string tipoDocumento = CmbTypeDoc.GetItemText(CmbTypeDoc.SelectedItem); string numberDocument = TxtNumberDoc.Text; string address = TxtAddress.Text; string numberAddress = TxtNumberAddress.Text; string district = CmbDistrict.GetItemText(CmbDistrict.SelectedItem); Client client = new Client(name, surname, phone, cuit, mail, tipoDocumento, numberDocument, address, numberAddress, district); AddClient(client); } else { MessageBox.Show("ingrese un numero de Documento"); TxtNumberDoc.Focus(); } } else { MessageBox.Show("ingrese un Numero de direccion"); TxtNumberAddress.Focus(); } } else { MessageBox.Show("ingrese una Direccion"); TxtAddress.Focus(); } } else { MessageBox.Show("ingrese un Cuit"); TxtCuit.Focus(); } } else { MessageBox.Show("ingrese un Apellido"); TxtSurname.Focus(); } } else { MessageBox.Show("ingrese un nombre"); TxtName.Focus(); } }
protected void BtnReg_Click(object sender, EventArgs e) { if (TxtCity.SelectedValue == "-1") { TxtCity.Focus(); showErrorMwssage(4); } else if (DdlLicensCode.SelectedValue == "-1") { DdlLicensCode.Focus(); showErrorMwssage(5); } else { if (GlobFuncs.IsExist(TxtEmail.Text.ToString()) == true) { TxtEmail.Focus(); showErrorMwssage(6); } else if (checkbox1.Checked != true) { showErrorMwssage(7); } else if (TxtName.Text.Length == 0) { TxtName.Focus(); showErrorMwssage(8); } else if (TxtAddress.Text.Length == 0) { TxtAddress.Focus(); showErrorMwssage(9); } else if (TxtId.Text.Length == 0) { TxtId.Focus(); showErrorMwssage(10); } else if (TxtDateOfBirth.Text.Length == 0) { TxtDateOfBirth.Focus(); showErrorMwssage(11); } else if (TxtLicenseNumber.Text.Length == 0) { TxtLicenseNumber.Focus(); showErrorMwssage(12); } else if (TxtDateOfIssuanceLicense.Text.Length == 0) { TxtDateOfIssuanceLicense.Focus(); showErrorMwssage(13); } else if (TxtEmail.Text.Length == 0) { TxtEmail.Focus(); showErrorMwssage(14); } else if (TxtPass.Text.Length == 0) { TxtPass.Focus(); showErrorMwssage(15); } else if (TxtPhone.Text.Length == 0) { TxtPhone.Focus(); showErrorMwssage(16); } else { string pass = GlobFuncs.Hash(TxtPass.Text.ToString()); Users Us = new Users(-1, TxtName.Text.ToString(), TxtAddress.Text.ToString(), int.Parse(TxtCity.Text.ToString()), TxtId.Text.ToString(), DateTime.Parse(TxtDateOfBirth.Text), TxtLicenseNumber.Text.ToString(), int.Parse(DdlLicensCode.Text.ToString()), DateTime.Parse(TxtDateOfIssuanceLicense.Text), TxtEmail.Text.ToString(), pass, TxtPhone.Text.ToString()); person per = new person(); per = Us.RegUser(); sendRegMessage(per.CustomId, 0.ToString(), per.FullName); Session["Person"] = per; Response.Redirect("PrivateArea.aspx"); } } }