public ActionResult Edit(GeneralCategory generalCategory) { bool isSaved = generalCategoryManager.Update(generalCategory); if (isSaved) { ViewBag.Message = "Updated Successfully!"; } return(RedirectToAction("Create")); }
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)); }
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 } }); }