public JsonResult Degree(int?draw, int?start, int?length, List <Dictionary <string, string> > order, List <Dictionary <string, string> > columns) { var search = Request["search[value]"]; var dir = order[0]["dir"].ToLower(); var column = columns[int.Parse(order[0]["column"])]["data"]; var dataTableData = new DegreeRepository().GetPage(search, draw, start, length, dir, column); return(Json(dataTableData, JsonRequestBehavior.AllowGet)); }
public ActionResult DegreeDetail(int?id) { DegreeViewModel model = new DegreeViewModel(); if (id.HasValue) { model = new DegreeRepository().GetByID((int)id); } return(PartialView("_Degree", model)); }
public JsonResult SaveDegree(DegreeViewModel model) { ResponseData result = new Models.ResponseData(); if (model.DegID != 0) { result = new DegreeRepository().UpdateByEntity(model); } else { result = new DegreeRepository().AddByEntity(model); } return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult DeleteDegree(int id) { var result = new DegreeRepository().RemoveByID(id); return(Json(result, JsonRequestBehavior.AllowGet)); }