コード例 #1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if ((bool)PhoneApplicationService.Current.State.ContainsKey("isTombStoned"))
     {
         base.OnNavigatedTo(e);
         return;
     }
     if (this.Source == Source.EXTERNAL)
     {
         this.Source = this.PreviousSource;
         base.OnNavigatedTo(e);
         return;
     }
     InvoiceListModel = new InvoiceListingModel();
     this.DataContext = InvoiceListModel;
     LoadInvoiceList();
     base.OnNavigatedTo(e);
 }
コード例 #2
0
        public InvoiceListingModel GetInvoiceListing(InvoiceFilterModel filter)
        {
            if (filter == null)
            {
                filter = new InvoiceFilterModel();
            }

            var invoices = GetInvoices(filter);

            InvoiceListingModel model = new InvoiceListingModel();

            model.Filter      = filter;
            model.InvoiceList = invoices.ToPagedList(filter.Page, filter.Size);

            for (int i = 0; i < model.InvoiceList.Count; i++)
            {
                model.InvoiceList[i].RowId = ((filter.Page - 1) * filter.Size) + i + 1;
            }

            return(model);
        }
コード例 #3
0
        public IActionResult GetAll()
        {
            var listingResultIL = _invoice.GetAll() // _packingNote.GetAllLines(PackingNoteId)
                                  .Select(item => new InvoiceIndexListingModel
            {
                InvoiceId        = item.Id,
                InvoiceNumber    = item.InvoiceNumber,
                InvoiceTime      = item.InvoiceDate,
                Post             = item.Posted,
                OrderNumber      = item.Order.OrderNumber,
                OrderId          = item.OrderId,
                TotalPriceBrutto = item.TotalPrice
            });



            var model = new InvoiceListingModel()
            {
                Invoices = listingResultIL
            };

            return(View(model));
        }