public ActionResult Edit(int Id) { SettingHelper helper = new SettingHelper(); SettingsModel result = helper.GetById(Id); ViewBag.Status = AppLogic.BindDDStatus(Convert.ToInt32(result.Status)); return(View(result)); }
public ActionResult InActivate(int Id) { SettingHelper helper = new SettingHelper(); SettingsModel objSettings = helper.GetById(Id); objSettings.Flag = 1; objSettings.Status = 0; int count = helper.Update(objSettings); if (count == 0) { TempData["CommonMessage"] = AppLogic.setMessage(count, "Setting deactivated successfully."); } else { TempData["CommonMessage"] = AppLogic.setMessage(count, "Setting deactivation failed."); } return(RedirectToAction("Index")); }