public JsonResult ChangeActive(string id) { var result = new info_dao().ChangeActive(id); return Json(new { status = result }); }
public ActionResult DeleteAllChecked(string ids) { if (ids != "" && ids != null) { string[] array_id = ids.Split(','); var dao = new info_dao(); foreach (var id in array_id) { dao.Delete(id); } } return RedirectToAction("Index"); }
public ActionResult Edit(info info) { if (ModelState.IsValid) { var dao = new info_dao(); var session = (UserLogin)Session[CommonConstants.USER_SESSION]; info.modified_by = session.username; var result = dao.Update(info); if (result) { SetAlert(StaticResources.Resources.Pub_UpdateSucess, "success"); return RedirectToAction("Index", "Info"); } else { ModelState.AddModelError("", StaticResources.Resources.UpdateInfoFailed); } } return View(); }
public ActionResult Edit(string id) { var model = new info_dao().Get_By_Id(id); return View(model); }
public ActionResult Index(int page = 1, int page_size = 10) { var dao = new info_dao(); var model = dao.ListAllPaging(page, page_size); return View(model); }