public void RunApplication() { var addNewCustomer = new AddNewCustomer { Name = "CustoerName1", Password = "******" }; commandFactory.CreateCommand <AddNewCustomer>() .Execute(addNewCustomer); }
private void btnAddCustomer_Click(object sender, EventArgs e) { string title = txtTitle.Text; string fname = txtFname.Text; string lname = txtLname.Text; string city = txtCity.Text; // method to call from BIZ AddNewCustomer ac = new AddNewCustomer(title, fname, lname, city); ac.AddCusToDb(); txtTitle.Clear(); txtFname.Clear(); txtLname.Clear(); txtCity.Clear(); MessageBox.Show("Customer added to database"); }