public JsonResult GetSalaryPackageDetails(string salaryPackageId) { int nSalaryPackageId = int.Parse(salaryPackageId); SalaryPackageSP spSalaryPackage = new SalaryPackageSP(); SalaryPackageDetailsSP spSalaryPackageDetils = new SalaryPackageDetailsSP(); SalaryPackageInfo infoSalaryPackage = new SalaryPackageInfo(); string jsonDetails = ""; if (nSalaryPackageId > 0) { infoSalaryPackage = spSalaryPackage.SalaryPackageView(nSalaryPackageId); DataTable dtblSalaryPackageDetails = spSalaryPackageDetils.SalaryPackageDetailsViewWithSalaryPackageId(nSalaryPackageId); jsonDetails = Utils.ConvertDataTabletoString(dtblSalaryPackageDetails); } PayHeadSP spPayhead = new PayHeadSP(); DataTable dtblPayheads = spPayhead.PayHeadViewAll(); string jsonPayheads = Utils.ConvertDataTabletoString(dtblPayheads); return(Json(new { isSuccess = true, message = "success", data = new { salaryPackageId = infoSalaryPackage.SalaryPackageId, salaryPackageName = infoSalaryPackage.SalaryPackageName, narration = infoSalaryPackage.Narration, isActive = infoSalaryPackage.IsActive, salaryPackageDetails = jsonDetails, payHeads = jsonPayheads } })); }
/// <summary> /// Function to get particular values from SalaryPackageDetails table based on the parameter /// </summary> /// <param name="decSalaryPackageId"></param> /// <returns></returns> public List <DataTable> SalaryPackageDetailsViewWithSalaryPackageId(decimal decSalaryPackageId) { List <DataTable> listObjSalaryPackageDetails = new List <DataTable>(); try { listObjSalaryPackageDetails = spSalaryPackageDetails.SalaryPackageDetailsViewWithSalaryPackageId(decSalaryPackageId); } catch (Exception ex) { MessageBox.Show("AL2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObjSalaryPackageDetails); }