public CustomerViewModel() { CustomerServiceInstance = ClientServiceLocator.Instance().ContractLocator.CustomerServices; Refresh(); View = new CustomerView { DataContext = this }; View.ShowDialog(); }
public CustomerViewModel() { CustomerServiceAdapter = new ServiceAdapter <ICustomerService>(); Refresh(); View = new CustomerView { DataContext = this }; View.ShowDialog(); }
private void CustomerButton_Click(object sender, EventArgs e) { CustomerView customerView = new CustomerView(); CustomerService customerService = new CustomerService(); IList customerList = customerService.getAllCustomers(); CustomerController customerController = new CustomerController(customerView, customerList); customerController.LoadView(); customerView.ShowDialog(); }
/// <summary> /// method for checking username and password and opening the windows /// </summary> private void SaveExecute() { if (JmbgValidation(username) && password == "Gost") { CustomerView customer = new CustomerView(username); customer.ShowDialog(); } else if (username == "Zaposleni" && password == "Zaposleni") { EmployeeView employee = new EmployeeView(); employee.ShowDialog(); } else { MessageBox.Show("Wrong username or password, please try again."); } }
private void btnCustomerLogin_Click(object sender, RoutedEventArgs e) { bool success = LoginRegisterViewModel .LoginCustomer (tbCustomerEmailLogin.Text, tbCustomerPasswordLogin.Password); if (success && Session.isLogin) { this.Hide(); if (Session.role.ToUpper() == "ADMIN") { HomeAdminView hav = new HomeAdminView(); hav.ShowDialog(); } else { CustomerView cv = new CustomerView(); cv.ShowDialog(); } Utility.TraverseVisualTree(this); this.Show(); } }
private void AddCustomer() { CustomerViewModel cvm = new CustomerViewModel(); CustomerView dv = new CustomerView(); dv.DataContext = cvm; dv.ShowDialog(); GetCustomers(); }
private void EditCustomer() { CustomerViewModel cvm = new CustomerViewModel(this.SelectedCustomer.CustomerId); CustomerView cv = new CustomerView(); cv.DataContext = cvm; cv.ShowDialog(); GetCustomers(); }
public CustomerViewModel() { View = new CustomerView(); View.DataContext = this; View.ShowDialog(); }