Exemplo n.º 1
0
 private void txtPhone_Leave(object sender, EventArgs e)
 {
     try
     {
         if (txtPhone.Text != "")
         {
             if (txtPhone.Visible)
             {
                 txtPhone.BackColor = Color.White;
                 CustID             = Orders.getCustomerIdWRTPhone(txtPhone.Text); //get phone number to insert for customerID
                 if (CustID == 0)
                 {
                     frmCustomers objCust = new frmCustomers();
                     Main.showWindow(objCust, this, frmMDI.ActiveForm);
                 }
                 else
                 {
                     Main.showMessage(Orders.CUSTOMER + "\n" + Orders.ADDRESS + "\n", "success");
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Main.showMessage(ex.Message, "error");
     }
 }
 private void btnCustomers_Click(object sender, EventArgs e)
 {
     try
     {
         frmCustomers objCustomer = new frmCustomers();
         Main.showWindow(objCustomer, this, frmMDI.ActiveForm);
     }
     catch (Exception ex)
     {
         Main.showMessage(ex.Message, "error");
     }
 }