public JsonResult ActionType(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 ActionTypeRepository().GetPage(search, draw, start, length, dir, column); return(Json(dataTableData, JsonRequestBehavior.AllowGet)); }
public ActionResult ActionTypeDetail(int?id) { ActionTypeViewModel model = new ActionTypeViewModel(); if (id.HasValue) { model = new ActionTypeRepository().GetByID((int)id); } return(PartialView("_ActionType", model)); }
public JsonResult SaveActionType(ActionTypeViewModel model) { ResponseData result = new Models.ResponseData(); if (model.ActID != 0) { result = new ActionTypeRepository().UpdateByEntity(model); } else { result = new ActionTypeRepository().AddByEntity(model); } return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult DeleteActionType(int id) { var result = new ActionTypeRepository().RemoveByID(id); return(Json(result, JsonRequestBehavior.AllowGet)); }