Example #1
0
        public ActionResult EditAccountTypeMaster(int id = 0)
        {
            TBACCOUNTTYPEMASTER obj = dbContext.TBACCOUNTTYPEMASTERs.Where(x => x.ACCOUNTTYPEID == id).FirstOrDefault();

            if (obj == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AccountList = dbContext.TBACCOUNTTYPEMASTERs.ToList();
            return(View("AccountTypeMaster", obj));
        }
Example #2
0
 public ActionResult AccountTypeMasterSaveChanges(TBACCOUNTTYPEMASTER obj)
 {
     if (obj.ACCOUNTTYPEID > 0)
     {
         TBACCOUNTTYPEMASTER objbrand = dbContext.TBACCOUNTTYPEMASTERs.Where(x => x.ACCOUNTTYPEID == obj.ACCOUNTTYPEID).FirstOrDefault();
         objbrand.ACCOUNTTYPENAME = obj.ACCOUNTTYPENAME;
     }
     else
     {
         dbContext.TBACCOUNTTYPEMASTERs.Add(obj);
     }
     dbContext.SaveChanges();
     return(RedirectToAction("AccountTypeMaster"));
 }