protected void btnGenerate_Click(object sender, EventArgs e)
    {
        Payroll_PaySlipOptionMgr objOptMgr = new Payroll_PaySlipOptionMgr();
        DataTable dtBenefitsPolicy         = objOptMgr.SelectPayrollBenefitsPolicyData("0", "0");

        DataTable dtBasic = objSalaryManager.GetEmpBasic(ddlSalPackTitle.SelectedValue.Trim());

        DataTable dtSalHead = objSalaryManager.GetSalaryHeadForPackageSetup();

        this.AddToSalaryPakDetailsDataSet(dtSalHead, dtBenefitsPolicy, dtBasic);
    }
Example #2
0
    protected void btnGenerate_Click(object sender, EventArgs e)
    {
        try
        {
            Payroll_PaySlipOptionMgr objOptMgr = new Payroll_PaySlipOptionMgr();
            DataTable dtBenefitsPolicy         = objOptMgr.SelectPayrollBenefitsPolicyData("0");

            DataTable dtBasic = objSalaryManager.GetEmpBasic(ddlSalPackTitle.SelectedValue.Trim());

            if (string.IsNullOrEmpty(dtBasic.Rows[0]["GradeID"].ToString()) == true || string.IsNullOrEmpty(dtBasic.Rows[0]["GradeLevelID"].ToString()) == true)
            {
                lblMsg.Text = "Please assign staffs grade & grade step from HR screen.";
                return;
            }

            DataTable dtSalHead = objSalaryManager.GetSalaryHeadForPackageSetup();
            this.AddToSalaryPakDetailsDataSet(dtSalHead, dtBenefitsPolicy, dtBasic);
        }
        catch (Exception ex)
        {
            lblMsg.Text = ex.Message.ToString();
        }
    }