private void AddBrrwrBtn_Click(object sender, EventArgs e)
        {
            string Name    = NameTxt.Text;
            string SSN     = SSNTxt.Text;
            string Address = AddressTxt.Text;
            string Phone   = PhoneTxt.Text;
            string Email   = EmailTxt.Text;

            bool SSN_Unique = Check_SSN(SSN);

            if (!string.IsNullOrEmpty(Name) && !string.IsNullOrEmpty(SSN) && !string.IsNullOrEmpty(Address))
            {
                SSN = Format_SSN(SSN);

                if (SSN_Unique == true)
                {
                    Execute_Add_Borrower(Name, SSN, Address, Phone, Email);
                }
                else
                {
                    MessageBox.Show("The SSN number provided is already in use.  Please enter another SSN or update the existing record.");
                }
            }
            else
            {
                MessageBox.Show("The values for Name, SSN, and Address must be filled in.");
            }

            NameTxt.Clear();
            SSNTxt.Clear();
            AddressTxt.Clear();
            PhoneTxt.Clear();
            EmailTxt.Clear();
            Load_Borrower_View();
        }
 private void CancelBtn_Click(object sender, EventArgs e)
 {
     NameTxt.Clear();
     SSNTxt.Clear();
     AddressTxt.Clear();
     PhoneTxt.Clear();
     EmailTxt.Clear();
 }
Exemplo n.º 3
0
 public void SaveJobAndVerify(string title)
 {
     Jobbtn.Click();
     NameTxt.SendKeys(title);
     PhoneTxt.Click();
     Savebtn.Click();
     System.Threading.Thread.Sleep(6000);
     Homebtn.Click();
     Assert.IsTrue(PropertiesCollection.Validatemessage("test", "/html/body/div[2]/div[2]/span[2]/a"));
 }
Exemplo n.º 4
0
 public void ResetForm()
 {
     FullNameTxt.Clear();
     PhoneTxt.Clear();
     EmailTxt.Clear();
     if (ActiveRdBtn.Checked)
     {
         DisabledRdBtn.Checked = false;
     }
     if (DisabledRdBtn.Checked)
     {
         ActiveRdBtn.Checked = false;
     }
 }
Exemplo n.º 5
0
        private void BtnCreate_Click(object sender, EventArgs e)
        {
            if (FullNameTxt.Text == "")
            {
                MessageBox.Show("FullName daxil edin.");
            }
            if (PhoneTxt.Text == "")
            {
                MessageBox.Show("Phone nomreni daxil edin");
            }
            if (EmailTxt.Text == "")
            {
                MessageBox.Show("Email daxil edin");
            }

            if (ActiveRdBtn.Checked == false && DisabledRdBtn.Checked == false)
            {
                MessageBox.Show("Status sechin");
            }
            if (!string.IsNullOrEmpty(FullNameTxt.Text) && !string.IsNullOrEmpty(EmailTxt.Text) && !string.IsNullOrEmpty(PhoneTxt.Text) &&
                (ActiveRdBtn.Checked || DisabledRdBtn.Checked))
            {
                Customer customer = new Customer();

                customer.FullName = FullNameTxt.Text;
                customer.Status   = ActiveRdBtn.Checked ? true : false;
                customer.Phone    = PhoneTxt.Text;
                customer.Email    = EmailTxt.Text;

                _db.Customers.Add(customer);
                _db.SaveChanges();

                MessageBox.Show("Author Added:" + FullNameTxt.Text + "New Author");
                FullNameTxt.Clear();
                PhoneTxt.Clear();
                EmailTxt.Clear();
                ActiveRdBtn.Checked   = false;
                DisabledRdBtn.Checked = false;

                FillCustomers();
            }
        }