예제 #1
0
        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));
        }
예제 #2
0
        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"));
        }