Пример #1
0
        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));
        }
Пример #2
0
        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();
        }