private void btnValidate_Click(object sender, EventArgs e) { setCustomer(); try { _cust.Validate(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnValidate_Click(object sender, EventArgs e) { try { SetCustomer(); cust.Validate(); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void btnValidate_Click(object sender, EventArgs e) { try { if (cust != null) { cust.CustomerName = txtCustomerName.Text; cust.PhoneNumber = txtPhoneNumber.Text; string billingAmount = txtBillingAmount.Text; cust.BillAmount = string.IsNullOrEmpty(billingAmount) ? 0 : Convert.ToDecimal(billingAmount); if (validateDate(txtBillingDate.Text)) { cust.BillDate = string.IsNullOrEmpty(txtBillingDate.Text) ? DateTime.Now : Convert.ToDateTime(txtBillingDate.Text); } else { MessageBox.Show("Please enter valid date"); } cust.Address = txtAddress.Text; cust.Validate(); } else { MessageBox.Show("Please select customer type first"); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void button1_Click(object sender, EventArgs e) { try { SetCustomer(); _customer.Validate(); } catch (Exception ex) { } }
private void btnValidate_Click(object sender, EventArgs e) { try { SetProperties(); cust.Validate(); } catch (Exception ex) { tbCheckReq.Text = ex.Message.ToString(); } }
void ValidationClick(object sender, EventArgs e) { try { customer.Address = Addresstxt.Text; customer.BillAmount = Convert.ToDecimal(BillAmounttxt.Text); customer.BillDate = Convert.ToDateTime(BillDatetxt.Text); customer.Customername = CustomerNametxt.Text; customer.phoneNumber = PhoneNumbertxt.Text; customer.Validate(); } catch (Exception exception) { MessageBox.Show(exception.Message); } }
static void MainTestValidationForCustomerPKP(string[] args) { CustomerService srvc = new CustomerService("Customer"); CustomerBase data = null; try { data = srvc.Instance("PKP"); data.CustomerName = "Nurul Hadi"; data.Gender = "Laki laki"; data.Address = "jl Raya pamayahan, Indramayu"; data.PKPStatus = "PKP"; //data.Tempo = 40; Temp Can't more than 30 in PKP data.Tempo = 30; data.Validate(); Console.WriteLine("Success validate"); } catch (Exception ex) { Console.WriteLine(ex.Message.ToString()); } }
private void button1_Click(object sender, EventArgs e) { cust.Validate(); }
public void Validate() { SetCustomer(); cust.Validate(); }
public void Save(CustomerBase baseObj) { baseObj.Validate(); _repo.Save(baseObj); }