public dynamic GetInfo(int Id) { SalarySlip model = new SalarySlip(); try { model = _salarySlipService.GetObjectById(Id); } catch (Exception ex) { LOG.Error("GetInfo", ex); Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "Error " + ex); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } return(Json(new { model.Id, model.Index, model.Code, model.Name, model.SalaryItemId, model.SalarySign, model.IsEnabled, model.IsMainSalary, model.IsDetailSalary, model.Errors }, JsonRequestBehavior.AllowGet)); }
public SalarySlipDetail VHasSalarySlip(SalarySlipDetail salarySlipDetail, ISalarySlipService _salarySlipService) { SalarySlip salarySlip = _salarySlipService.GetObjectById(salarySlipDetail.SalarySlipId); if (salarySlip == null) { salarySlipDetail.Errors.Add("SalarySlip", "Tidak ada"); } return(salarySlipDetail); }