public ActionResult GetDependantByProfileID([DataSourceRequest] DataSourceRequest request, Att_ProIDAndCutIDModel model) { // Son.vo - 20141220 - lấy người thân không cần truyền vào kỳ công làm gì. string status = string.Empty; var actionServices = new ActionService(UserLogin); var objs = new List<object>(); objs.Add(Common.DotNetToOracle(model.ProfileID)); objs.Add(1); objs.Add(Int32.MaxValue - 1); var result = actionServices.GetData<Hre_DependantEntity>(objs, ConstantSql.hrm_hr_sp_get_DependantByProfileId, ref status); if (result == null) { return null; } if (model.IsExport) { status = ExportService.Export(result, model.GetPropertyValue("ValueFields").TryGetValue<string>().Split(',')); return Json(status); } return Json(result.ToDataSourceResult(request)); }
public ActionResult GetSalCostCentreSalByProfileID([DataSourceRequest] DataSourceRequest request, Att_ProIDAndCutIDModel model) { string status = string.Empty; var actionService = new ActionService(UserLogin); var objs = new List<object>(); objs.Add(Common.DotNetToOracle(model.ProfileID)); objs.Add(1); objs.Add(Int32.MaxValue - 1); var result = actionService.GetData<Sal_CostCentreSalEntity>(objs, ConstantSql.hrm_hr_sp_get_Sal_CostCentreSalByProfileId, ref status); if (result != null) { return Json(result.ToDataSourceResult(request)); } else { return Json(null); } }
//kiem tra he so 1nv khong lon hon 1 public ActionResult CheckRateSalCostCentreSalByProfileID(Att_ProIDAndCutIDModel model) { string status = string.Empty; var actionService = new ActionService(UserLogin); var objs = new List<object>(); objs.Add(Common.DotNetToOracle(model.ProfileID)); objs.Add(1); objs.Add(10000); var result = actionService.GetData<Sal_CostCentreSalEntity>(objs, ConstantSql.hrm_hr_sp_get_Sal_CostCentreSalByProfileId, ref status); double? rate = result.Sum(s => s.Rate); var ls = new object[] { rate }; return Json(ls); // return Json(result.ToDataSourceResult(request)); }
public ActionResult GetCodeAlocalByProfileID([DataSourceRequest] DataSourceRequest request, Att_ProIDAndCutIDModel model) { string status = string.Empty; var actionService = new ActionService(UserLogin); var objs = new List<object>(); objs.Add(Common.DotNetToOracle(model.ProfileID)); objs.Add(Common.DotNetToOracle(model.CutOffDurationID)); objs.Add(1); objs.Add(10000); var result = actionService.GetData<Sal_CodeAlocalEntity>(objs, ConstantSql.hrm_hr_sp_get_CodeAlocalByProfileId, ref status); return Json(result.ToDataSourceResult(request)); }