private static void InvoiceWindowLogic(Models.InvoiceSearch invoiceSearch) { var invoice = ProjectManager.Instance.CoolIceProDBHelper.GetInvoice(invoiceSearch.Id); var page = new CoolIcePro.Views.InsertInvoice(PAGE_STATE.UPDATE, new CoolIcePro.ViewModels.InsertInvoiceViewModel(invoice)); var customer = ProjectManager.Instance.CoolIceProDBHelper.GetCustomer(invoiceSearch.CompanyId); Windows.GenericWindow gw = new Windows.GenericWindow(685, 625, string.Format("Invoice for {0}", customer.CompanyName), page); gw.ShowDialog(); }
private void InvoiceWindowLogic(Models.Invoice invoice) { var page = new CoolIcePro.Views.InsertInvoice(PAGE_STATE.UPDATE, new CoolIcePro.ViewModels.InsertInvoiceViewModel(invoice)); var customer = ProjectManager.Instance.CoolIceProDBHelper.GetCustomer(invoice.CompanyId); Windows.GenericWindow gw = new Windows.GenericWindow(685, 625, string.Format("Invoice for {0}", customer.CompanyName), page); gw.ShowDialog(); this.Invoices = new ObservableCollection <Models.Invoice>(ProjectManager.Instance.CoolIceProDBHelper.GetCustomerInvoices(Id)); }
private static void CustomerWindowLogic(Models.CustomerSearch customerSearch) { var customer = ProjectManager.Instance.CoolIceProDBHelper.GetCustomer(customerSearch.Id); var contact = ProjectManager.Instance.CoolIceProDBHelper.GetCustomerContacts(customerSearch.Id); customer.Contact = contact; var page = new CoolIcePro.Views.Customer(new CustomerViewModel(customer)); Windows.GenericWindow gw = new Windows.GenericWindow(685, 625, string.Format("{0}", customerSearch.CompanyName), page); gw.ShowDialog(); }