コード例 #1
0
ファイル: InvoicesViewModel.cs プロジェクト: CompG33k/CoolIce
        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();
        }
コード例 #2
0
ファイル: CustomerViewModel.cs プロジェクト: CompG33k/CoolIce
        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));
        }
コード例 #3
0
        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();
        }