public ActionResult ExamTypeSave() { JxLib.ExamTypeController examtypeController = new JxLib.ExamTypeController(); DatabaseLib.Tools tools = new DatabaseLib.Tools(); string strParam = Request.Form.ToString(); System.Collections.Hashtable data = tools.paramToData(strParam); string examtype_id = CommonLib.Common.Validate.IsNullString(Request.Params["ExamTypeID"]); if (examtype_id == "") { examtype_id = examtypeController.add(data); if (examtype_id == null) { return RedirectToRoute("examtype-add"); } } else { examtypeController.save(data); } return RedirectToRoute("examtype-add"); }
public ActionResult ExamTypeEdit(string id = null) { JxLib.ExamTypeController examtypeController = new JxLib.ExamTypeController(); this.init(); if (id == null) { ViewData["title"] = "新增考试类型"; } else { System.Collections.Hashtable examtype = examtypeController.load(id); if (examtype != null) { ViewData["examtype"] = examtype; } ViewData["title"] = "编辑考试类型"; } ViewData["open_menu"] = "考试管理"; return View(); }
public ActionResult ExamTypeList(int page = 1) { this.init(); JxLib.ExamTypeController examtypeController = new JxLib.ExamTypeController(); List<System.Collections.Hashtable> list = examtypeController.getAll(); ViewData["examtypes"] = list; ViewData["open_menu"] = "考试管理"; return View(); }
public ActionResult ExamTypeDelete(string id = null, int page = 1) { JxLib.ExamTypeController examtypeController = new JxLib.ExamTypeController(); this.init(); if (id == null) { return RedirectToRoute("examtype-list-home"); } else { examtypeController.delete(id); return RedirectToRoute("examtype-list", new { page = page }); } }