Example #1
0
 private void TxtDivision_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         TxtAddress.Focus();
     }
 }
Example #2
0
 private void TxtCompany_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         TxtAddress.Focus();
     }
 }
Example #3
0
 private void TxtMobile_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13) // 엔터
     {
         TxtAddress.Focus();
     }
 }
Example #4
0
 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");
     }
 }
Example #5
0
 private void BtnClear_Click(object sender, EventArgs e)
 {
     TxtFirstName.Clear();
     TxtLastName.Clear();
     TxtGrade.Clear();
     TxtAddress.Clear();
     TxtContactNo.Clear();
 }
Example #6
0
 public void Save(string email, string name, string lastname, string phone, string address)
 {
     BtnCreate.Click();
     TxtEmail.EnterText(email);
     TxtFirstName.EnterText(name);
     TxtLastName.EnterText(lastname);
     TxtPhone.EnterText(phone);
     TxtAddress.EnterText(address);
     BtnSave.Click();
 }
Example #7
0
 public void clr()
 {
     txtId.Clear();
     txtLastName.Clear();
     txtSalary.Clear();
     txtSpecialization.Clear();
     txtFirstName.Clear();
     txtConatctNo.Clear();
     TxtAddress.Clear();
     cmbSchedule.SelectedIndex = -1;
 }
Example #8
0
 private void BtnUpdate_Click(object sender, EventArgs e)
 {
     if (TxtFirstName.Text == "")
     {
         MessageBox.Show("Please fill empty fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (TxtLastName.Text == "")
     {
         MessageBox.Show("Please fill empty fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (TxtGrade.Text == "")
     {
         MessageBox.Show("Please fill empty fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (TxtAddress.Text == "")
     {
         MessageBox.Show("Please fill empty fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (TxtContactNo.Text == "")
     {
         MessageBox.Show("Please fill empty fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         var result = MessageBox.Show("Confirm editing new record?", "Edit New Record", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             using (var con = new MySqlConnection(GetConnection()))
             {
                 string command = $"UPDATE `lms.sad`.`tblusers`" +
                                  $" SET " +
                                  $"`First_Name`='{TxtFirstName.Text}',`Last_Name`='{TxtLastName.Text}',`Year_Level`='{TxtGrade.Text}',`Address`='{TxtAddress.Text}',`Contact_Number`='{TxtContactNo.Text}'" +
                                  $" WHERE `User_ID`='{TxtUserID.Text}'";
                 con.Open();
                 using (var cmd = new MySqlCommand(command, con))
                 {
                     cmd.CommandType = CommandType.Text;
                     var i = cmd.ExecuteNonQuery();
                     if (i > 0)
                     {
                         MessageBox.Show("Successfully Updated! Please refresh Book List to view entry!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                         TxtFirstName.Clear();
                         TxtLastName.Clear();
                         TxtGrade.Clear();
                         TxtAddress.Clear();
                         TxtContactNo.Clear();
                         TxtUserID.Clear();
                     }
                 }
                 con.Close();
             }
         }
     }
 }
Example #9
0
 private void ReseTextBox()
 {
     this.Abo_Load(abo, usu);
     MtxtIdentification.ResetText();
     TxtName.ResetText();
     TxtFirstN.ResetText();
     TxtLastN.ResetText();
     MtxtPhone.ResetText();
     MtxtMovil.ResetText();
     TxtEmail.ResetText();
     TxtAddress.ResetText();
 }
Example #10
0
 private void BtnRegister_Click(object sender, EventArgs e)
 {
     if (TxtFirstName.Text == "")
     {
         MessageBox.Show("Please enter missing fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (TxtLastName.Text == "")
     {
         MessageBox.Show("Please enter missing fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (TxtGrade.Text == "")
     {
         MessageBox.Show("Please enter missing fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (TxtAddress.Text == "")
     {
         MessageBox.Show("Please enter missing fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else if (TxtContactNo.Text == "")
     {
         MessageBox.Show("Please enter missing fields!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     else
     {
         var result = MessageBox.Show("Confirm adding new record?", "Add New Record", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.Yes)
         {
             using (var con = new MySqlConnection(GetConnection()))
             {
                 string command = $"INSERT INTO `lms.sad`.`tblusers` (`First_Name`,`Last_Name`, `Year_Level`, `Address`,`Contact_Number`) " +
                                  "VALUES " +
                                  $"('{TxtFirstName.Text}','{TxtLastName.Text}','{TxtGrade.Text}','{TxtAddress.Text}','{TxtContactNo.Text}')";
                 con.Open();
                 using (var cmd = new MySqlCommand(command, con))
                 {
                     cmd.CommandType = CommandType.Text;
                     var i = cmd.ExecuteNonQuery();
                     if (i > 0)
                     {
                         MessageBox.Show("Successfully Added! Please refresh Borrower List to view entry!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                         TxtFirstName.Clear();
                         TxtLastName.Clear();
                         TxtGrade.Clear();
                         TxtAddress.Clear();
                         TxtContactNo.Clear();
                     }
                 }
                 con.Close();
             }
         }
     }
 }
 private void BtnClear_Click(object sender, EventArgs e)
 {
     TxtTcnumber.Clear();
     TxtName.Clear();
     TxtSurname.Clear();
     TxtAddress.Clear();
     TxtDays.Clear();
     MskTxtPhoneNumber.Clear();
     TxtEmail.Clear();
     TxtPayment.Clear();
     TxtRoomNumber.Clear();
     dateTimePicker1.ResetText();
     DtpCheckin.ResetText();
     DtpCheckout.ResetText();
 }
Example #12
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            // Perform any additional setup after loading the view, typically from a nib.
            TxtPassword.SecureTextEntry             = true;
            TxtPasswordConfirmation.SecureTextEntry = true;

            userController = new UserController();
            userController.UserInserted += UserController_UserRegisted;


            TxtName.ShouldReturn = (textField) =>
            {
                TxtName.ResignFirstResponder();
                return(true);
            };

            TxtMail.ShouldReturn = (textField) =>
            {
                TxtMail.ResignFirstResponder();
                return(true);
            };

            TxtPassword.ShouldReturn = (textField) =>
            {
                TxtPassword.ResignFirstResponder();
                return(true);
            };

            TxtPasswordConfirmation.ShouldReturn = (textField) =>
            {
                TxtPasswordConfirmation.ResignFirstResponder();
                return(true);
            };

            TxtAddress.ShouldReturn = (textField) =>
            {
                TxtAddress.ResignFirstResponder();
                return(true);
            };

            TxtPhone.ShouldReturn = (textField) =>
            {
                TxtPhone.ResignFirstResponder();
                return(true);
            };
        }
        void ReleaseDesignerOutlets()
        {
            if (BtnEdit != null)
            {
                BtnEdit.Dispose();
                BtnEdit = null;
            }

            if (ImgProfilePicture != null)
            {
                ImgProfilePicture.Dispose();
                ImgProfilePicture = null;
            }

            if (LblChange != null)
            {
                LblChange.Dispose();
                LblChange = null;
            }

            if (TxtAddress != null)
            {
                TxtAddress.Dispose();
                TxtAddress = null;
            }

            if (TxtName != null)
            {
                TxtName.Dispose();
                TxtName = null;
            }

            if (TxtPhone != null)
            {
                TxtPhone.Dispose();
                TxtPhone = null;
            }

            if (ViewProfilePicture != null)
            {
                ViewProfilePicture.Dispose();
                ViewProfilePicture = null;
            }
        }
Example #14
0
 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
     {
     }
 }
Example #15
0
 /// <summary>
 /// actually clears each textbox in the form
 /// </summary>
 private void ClearNewEmpForm()
 {
     EpForm.Clear();
     TxtID.Clear();
     TxtFirstName.Clear();
     TxtLastName.Clear();
     TxtAddress.Clear();
     TxtCity.Clear();
     CBxState.SelectedIndex = -1;
     CBxEmpType.SelectedIndex = -1;
     TxtZip.Clear();
     TxtHireDate.Clear();
     CBxMarriageStatus.SelectedIndex = -1;
     TxtDept.Clear();
     TxtJobTitle.Clear();
     LblAfterSubmitMsg.Text = "";
     TxtPayAmount.Visible = false;
     LblPayAmount.Visible = false;
     LblSecondInput.Visible = false;
     TxtSecondInput.Visible = false;
 }
Example #16
0
        void ReleaseDesignerOutlets()
        {
            if (TxtName != null)
            {
                TxtName.Dispose();
                TxtName = null;
            }

            if (TxtMail != null)
            {
                TxtMail.Dispose();
                TxtMail = null;
            }

            if (TxtPassword != null)
            {
                TxtPassword.Dispose();
                TxtPassword = null;
            }

            if (TxtPasswordConfirmation != null)
            {
                TxtPasswordConfirmation.Dispose();
                TxtPasswordConfirmation = null;
            }

            if (TxtAddress != null)
            {
                TxtAddress.Dispose();
                TxtAddress = null;
            }

            if (TxtPhone != null)
            {
                TxtPhone.Dispose();
                TxtPhone = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (BtnNext != null)
            {
                BtnNext.Dispose();
                BtnNext = null;
            }

            if (IBAccountDoneBar != null)
            {
                IBAccountDoneBar.Dispose();
                IBAccountDoneBar = null;
            }

            if (IBAccountDoneBtn != null)
            {
                IBAccountDoneBtn.Dispose();
                IBAccountDoneBtn = null;
            }

            if (IBAccountPicker != null)
            {
                IBAccountPicker.Dispose();
                IBAccountPicker = null;
            }

            if (IBDateDoneBar != null)
            {
                IBDateDoneBar.Dispose();
                IBDateDoneBar = null;
            }

            if (IBDateDoneBtn != null)
            {
                IBDateDoneBtn.Dispose();
                IBDateDoneBtn = null;
            }

            if (IBDatePicker != null)
            {
                IBDatePicker.Dispose();
                IBDatePicker = null;
            }

            if (LblAddresTitle != null)
            {
                LblAddresTitle.Dispose();
                LblAddresTitle = null;
            }

            if (LblCurrencyTitle != null)
            {
                LblCurrencyTitle.Dispose();
                LblCurrencyTitle = null;
            }

            if (LblDateTitle != null)
            {
                LblDateTitle.Dispose();
                LblDateTitle = null;
            }

            if (LblOrderNameTitle != null)
            {
                LblOrderNameTitle.Dispose();
                LblOrderNameTitle = null;
            }

            if (LblSelectAcoountTilte != null)
            {
                LblSelectAcoountTilte.Dispose();
                LblSelectAcoountTilte = null;
            }

            if (Scrollvw != null)
            {
                Scrollvw.Dispose();
                Scrollvw = null;
            }

            if (TxtAddress != null)
            {
                TxtAddress.Dispose();
                TxtAddress = null;
            }

            if (TxtCurrency != null)
            {
                TxtCurrency.Dispose();
                TxtCurrency = null;
            }

            if (TxtOrderDate != null)
            {
                TxtOrderDate.Dispose();
                TxtOrderDate = null;
            }

            if (TxtOrderName != null)
            {
                TxtOrderName.Dispose();
                TxtOrderName = null;
            }

            if (TxtSelectAcoountTilte != null)
            {
                TxtSelectAcoountTilte.Dispose();
                TxtSelectAcoountTilte = null;
            }
        }
Example #18
0
 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");
         }
     }
 }
        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);
            }
        }
Example #20
0
 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();
     }
 }