Example #1
0
 public ActionResult Create(Creditor crModel)
 {
     try
     {
         _CreditorList.Add(crModel);
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }
Example #2
0
        public ActionResult Edit(string id, Creditor crModel)
        {
            try

            {
                _CreditorList.Where(c => c.NewNRIC == id).ToList().ForEach(d => { d = crModel; });
                // TODO: Add update logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }