Beispiel #1
0
        public ActionResult Edit(GeneralCategory generalCategory)
        {
            bool isSaved = generalCategoryManager.Update(generalCategory);


            if (isSaved)
            {
                ViewBag.Message = "Updated Successfully!";
            }
            return(RedirectToAction("Create"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "GeneralCategoryID,GeneralCategoryName,GeneralCategoryCode")] GeneralCategory generalcategory)
 {
     if (ModelState.IsValid)
     {
         //db.Entry(generalcategory).State = EntityState.Modified;
         //db.SaveChanges();
         _generalCategoryManager.Update(generalcategory);
         return(RedirectToAction("Index"));
     }
     return(View(generalcategory));
 }
Beispiel #3
0
        public JsonResult Edit(GeneralCategoryCreateVM vmObj)
        {
            bool isUpdated = _Manager.Update(vmObj.GeneralCategory);


            if (isUpdated)
            {
                status = true;

                message = "Update Successfully!!";
            }


            return(new JsonResult {
                Data = new { status = status, message = message }
            });
        }