private ObservableCollection <CustomerDataObjects> GetCustomerList() { _icust = new CustomerDataAccessLayer(); var list = _icust.GetCustomers(); return(new ObservableCollection <CustomerDataObjects>(list)); }
private void DeleteButton_Click(object sender, System.Windows.RoutedEventArgs e) { var Cust_List = new CustomerDataObjects(); Cust_List.Customer_ID = Convert.ToInt32(txt_ID.Text); _icust = new CustomerDataAccessLayer(); _icust.DeleteCustomer(Cust_List); Clear(); CustomerdataGrid.ItemsSource = GetCustomerList(); }
private void AddButton_Click(object sender, System.Windows.RoutedEventArgs e) { var Cust_List = new CustomerDataObjects(); Cust_List.Customer_ID = Convert.ToInt32(txt_ID.Text); Cust_List.FirstName = txt_FirstName.Text.ToString().Trim(); Cust_List.LastName = txt_LastName.Text.ToString().Trim(); Cust_List.Address = txt_Address.Text.ToString().Trim(); Cust_List.Customer_Type = txt_CType.Text.ToString().Trim(); _icust = new CustomerDataAccessLayer(); _icust.UpdateCustomer(Cust_List); CustomerdataGrid.ItemsSource = GetCustomerList(); Clear(); }
private void button_Click(object sender, RoutedEventArgs e) { var Cust_List = new LoginData(); Cust_List.Username = txtName.Text; Cust_List.UserPassword = txtPassword.Password.ToString(); _icust = new CustomerDataAccessLayer(); var IsValid = _icust.IsValid(Cust_List); if (IsValid > 0) { Stock_Main s = new Stock_Main(); s.Show(); this.Close(); } else { MessageBox.Show("Invalid Username or password"); } }
public CustomerEntity(ICustomerDataAccessLayer customerDataAccess) { this.customerDataAccess = customerDataAccess; }
public CustomerBusinessLogicLayer() { cdal = new CustomerDataAccessLayer(); }
public CustomerBusinessLayer(ICustomerDataAccessLayer customerBusinessLayer) { _customerBusinessLayer = customerBusinessLayer; }
public CustomerController(ICustomerDataAccessLayer customerDataAccessLayer) { this.customerDataAccessLayer = customerDataAccessLayer; }