Esempio n. 1
0
 public JsonResult ChangeActive(string id)
 {
     var result = new info_dao().ChangeActive(id);
     return Json(new
     {
         status = result
     });
 }
Esempio n. 2
0
 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");
 }
Esempio n. 3
0
        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();
        }
Esempio n. 4
0
 public ActionResult Edit(string id)
 {
     var model = new info_dao().Get_By_Id(id);
     return View(model);
 }
Esempio n. 5
0
 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);
 }