示例#1
0
        public void AddItem(APISales postedItem)
        {
            List <APISales> list = GetData();

            postedItem.ID = (list.Count + 1);
            list.Add(postedItem);
        }
示例#2
0
        public void UpdateItem(APISales postedItem)
        {
            var editedModel = GetData().First(i => i.ID == postedItem.ID);

            editedModel.ID                     = postedItem.ID;
            editedModel.IssueDate              = postedItem.IssueDate;
            editedModel.PostingDate            = postedItem.PostingDate;
            editedModel.CustomerName           = postedItem.CustomerName;
            editedModel.CustomerTaxCode        = postedItem.CustomerTaxCode;
            editedModel.VATInvoiceSerialNumber = postedItem.VATInvoiceSerialNumber;
            editedModel.CustomerPhone          = postedItem.CustomerPhone;
            editedModel.Total                  = postedItem.Total;
            editedModel.CustomerAddress        = postedItem.CustomerAddress;
            editedModel.Discription            = postedItem.Discription;
            editedModel.CreatedBy              = postedItem.CreatedBy;
            editedModel.Status                 = postedItem.Status;
            editedModel.IncludedVATVoice       = postedItem.IncludedVATVoice;
        }