Esempio n. 1
0
        public static void AddItem(APIOutputVATInvoice postedItem)
        {
            List <APIOutputVATInvoice> list = OutputVATInvoiceModels();

            try
            {
                postedItem.Id = list.Max(m => m.Id) + 1;
            }
            catch { postedItem.Id = 1; }
            list.Add(postedItem);
        }
Esempio n. 2
0
        public static void UpdateItem(APIOutputVATInvoice postedItem)
        {
            var editedModel = OutputVATInvoiceModels().First(i => i.Id == postedItem.Id);

            editedModel.InvoiceType          = postedItem.InvoiceType;
            editedModel.InvoiceCode          = postedItem.InvoiceCode;
            editedModel.InvoiceNumber        = postedItem.InvoiceNumber;
            editedModel.InvoiceDate          = postedItem.InvoiceDate;
            editedModel.ExternalOrganization = postedItem.ExternalOrganization;
            editedModel.Buyer           = postedItem.Buyer;
            editedModel.TaxCode         = postedItem.TaxCode;
            editedModel.AmountBeforeVAT = postedItem.AmountBeforeVAT;
            editedModel.VAT             = postedItem.VAT;
            editedModel.VATAmount       = postedItem.VATAmount;
            editedModel.Description     = postedItem.Description;
        }