public FileResult DownloadFileLevelTransfer(int id) { var result = new LevelTransferRepository().DownloadFileLevelTransfer(id); string fileName = result.FileName; string filePath = result.FilePath; string contentType = result.ContentType; return(new FilePathResult(Path.Combine(filePath, fileName), contentType)); }
//[HttpPost] //public JsonResult LevelTransferDetailPage(int? id) //{ // var list = new LevelTransferRepository().GetDetail(id); // return Json(new { data = list }, JsonRequestBehavior.AllowGet); //} public ActionResult LevelTransferDetailByID(int?id) { var model = new LevelTransferRepository().GetDetailByID(id); ViewBag.Employee = DropDownList.GetEmployee(null, 1); ViewBag.SalaryLevel = DropDownList.GetSalaryLevel(null); ViewBag.SalaryStep = DropDownList.GetSalaryStep(null, 1); return(PartialView("_LevelTransferDetail", model)); }
public JsonResult LevelTransfer(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 LevelTransferRepository().GetPage(search, draw, start, length, dir, column); return(Json(dataTableData, JsonRequestBehavior.AllowGet)); }
public JsonResult SaveLevelTransfer(LevelTransferViewModel data) { ResponseData result = new Models.ResponseData(); if (data.MlID != 0) { result = new LevelTransferRepository().UpdateByEntity(data); } else { result = new LevelTransferRepository().AddByEntity(data); } return(Json(result, JsonRequestBehavior.AllowGet)); }
public JsonResult DeleteLevelTransfer(int id) { var result = new LevelTransferRepository().DeleteLevelTransfer(id); return(Json(result, JsonRequestBehavior.AllowGet)); }
public ActionResult LevelTransferDetail(int?id) { var model = new LevelTransferRepository().GetByID(id); return(View(model)); }