コード例 #1
0
        public void LoadInvoices(InvoiceCatalogFilter filter)
        {
            using (var db = DB.GetContext())
            {
                var invoices = InvoiceRepository.FindInvoices(db, filter);
                foreach (var inv in this.ActiveModel)
                {
                    var find = invoices.Where(i => i.InvoiceID == inv.InvoiceID).FirstOrDefault();
                    if (find != null)
                    {
                        find.IsMarked = inv.IsMarked;
                    }
                }

                this.ActiveModel.Clear();
                this.ActiveModel.AddRange(invoices);
            }
        }