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 SalaryPackage table based on the parameter
        /// </summary>
        /// <param name="salaryPackageId"></param>
        /// <returns></returns>
        public SalaryPackageInfo SalaryPackageView(decimal salaryPackageId)
        {
            SalaryPackageInfo salarypackageinfo = new SalaryPackageInfo();

            try
            {
                salarypackageinfo = spSalaryPackage.SalaryPackageView(salaryPackageId);
            }
            catch (Exception ex)
            {
                MessageBox.Show("AL2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(salarypackageinfo);
        }