public CustomerPresenter(ICustomerView view, ICustomerRepository repository) { _view = view; view.Presenter = this; _repository = repository; UpdateCustomerListView(); }
private void DisplayCustomer(ICustomerView customerView_) { this.txtCustomerID.Text = customerView_.ID.ToString(); this.txtCustomerName.Text = customerView_.Name; this.txtCustomerLastName.Text = customerView_.LastName; this.txtCustomerPersonalNum.Text = customerView_.PersonalNum; this.txtCustomerTotalDebt.Text = customerView_.TotalDebt.ToString(); this.richTxtNote.Text = customerView_.Note; }
public OrderViewModel() { this.quattroRepository = new QuattroRepository(); this.customerRepository = new CustomerRepository(); this.productRepository = new ProductRepository(); this._salesHeaderView = SalesFactory.createNewSalesHeader(); this.selectedProduct = ProductFactory.createProduct(); selectedCustomer = CustomerFactory.createNew(); }
public PresenterTests() { mockCustomerView = Mock.Of<ICustomerView>(view => view.CustomerList == new List<string>()); mockCustomerRepository = Mock.Of<ICustomerRepository>(repository => repository.GetAllCustomers() == stubCustomerList); presenter = new CustomerPresenter(mockCustomerView, mockCustomerRepository); }
public CustomerPresenter(ICustomerView view, ICustomerRepository repository) { _view = view; _repository = repository; _view.CreateCustomer += OnCreateCustomer; _view.DeleteCustomer += OnDeleteCustomer; _view.CustomerSelected += OnSelectCustomer; LoadCustomers(); }
public static tbl_Cus CreateCustomer(ICustomerView cus) { var customer = new tbl_Cus { Cus_ = cus.CusId, CusLastname = cus.CusLastname, CusFirstname = cus.CusFirstname, CusUsr_ = cus.CusUsrId, CusNumber = cus.CusNumber, CusContactname = cus.Email, CusIscompany = cus.CusIsCompany }; return customer; }
public void AddCustomer(ICustomerView customer) { CustomerDataFactory.AddCustomer(customer); }
public void AddCustomer(ICustomerView customer) { Service.AddCustomer(customer); }
public CustomerViewModel(ICustomerView view, IContainer container) : base(view, container) { }
public static void AddCustomer(ICustomerView customerView) { MerpDatabase().tbl_Cus.AddObject(CreateCustomer(customerView)); MerpDatabase().SaveChanges(); }
public CustomerViewModel() { customer = CustomerFactory.createNew(); customerRepository = new CustomerRepository(); customerType = "NotSpecified"; }