Example #1
0
        public static void UpdateItem(APIPurchasingDetail postedItem)
        {
            var editedModel = PurchasingDetailList.GetData().First(i => i.ID == postedItem.ID);

            editedModel.VATInvoiceSerialNumber = postedItem.VATInvoiceSerialNumber;
            editedModel.InvoicedType           = postedItem.InvoicedType;
            editedModel.IssueDate       = postedItem.IssueDate;
            editedModel.CreatedBy       = postedItem.CreatedBy;
            editedModel.TaxCode         = postedItem.TaxCode;
            editedModel.AmountBeforeTax = postedItem.AmountBeforeTax;
            editedModel.Tax             = postedItem.Tax;
            editedModel.Amount          = postedItem.Amount;
        }
Example #2
0
        public ActionResult PurchasingDetailPartialUpdate(MVC.Areas.Purchasing.Models.APIPurchasingDetail item)
        {
            var model = new object[0];

            if (ModelState.IsValid)
            {
                try
                {
                    // Insert here a code to update the item in your model
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            else
            {
                ViewData["EditError"] = "Please, correct all errors.";
            }
            return(PartialView("_PurchasingDetailPartial", PurchasingDetailList.GetData()));
        }
Example #3
0
 public static void AddItem(APIPurchasingDetail postedItem)
 {
     PurchasingDetailList.GetData().Add(postedItem);
 }