示例#1
0
        async Task IsEditingInvoice()
        {
            if (Id <= 0)
            {
                return;
            }

            _model = await GetById(Id);

            Lines = _model.InvoiceDetails.Map(i => new InvoiceLine
            {
                Id          = i.Id,
                Product     = ProductsData.SingleOrDefault(p => p.Code == i.ProductCode),
                Index       = i.Id,
                IsDelete    = false,
                IsEmpty     = false,
                OptionValue = ProductsData.SingleOrDefault(p => p.Code == i.ProductCode).Id.ToString(),
                Qty         = i.Qty,
            }).ToList();
        }