should_return_customer_summary_view() { var address = new Address("New Delhi", "110011", "India"); var customer = new Customer("Mr.", "firstname", "lastname", address); var view = new CustomerSummaryView(customer); Assert.AreEqual("Mr. firstname lastname, New Delhi, 110011 India", view.GetCustomerSummary()); }
public void Run(QueueEntry queueEntry, IWorkspace workspace) { IActionCatalogService catalog = WorkItem.Services.AddNew <ActionCatalogService, IActionCatalogService>(); catalog.RegisterGeneralCondition(new EnterpriseLibraryAuthorizationActionCondition()); WorkItem.Items.Add(queueEntry, "QueueEntry"); WorkItem.Activated += new EventHandler(WorkItem_Activated); _queueEntry = queueEntry; _workspace = workspace; _officerView = WorkItem.SmartParts.AddNew <OfficerView>(); // Show the summary as default CustomerSummaryView summary = WorkItem.SmartParts.AddNew <CustomerSummaryView>(); WorkItem.Workspaces[WorkspaceNames.OfficerWorkspace].Show(summary); }
public IEnumerable <CustomerSummaryView> GetAll() { var view = new List <CustomerSummaryView>(); var customerSummaries = _customerSummaryRepository.Get(); foreach (var customerSummary in customerSummaries) { var summary = new CustomerSummaryView { CustomerName = customerSummary.Customer.CustomerName, SeasonName = customerSummary.Season.SeasonName, TotalCredit = customerSummary.TotalCredit, TotalRepaid = customerSummary.TotalRepaid, }; view.Add(summary); } return(view); }