Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string   strParams = Request.QueryString["params"];
            string[] strVal    = strParams.Split(',');
            strVal[1] = strVal[1] == "-1" ? "0" : strVal[1];
            DataTable dtEmployee    = new DataTable();
            DataTable dtSalaryItems = new DataTable();
            if (strVal[3].Trim() == "Nil")
            {
                dtEmployee    = objPayRptMgr.GetFiscalYearWiseDistinctEmployee(strVal[0], strVal[1]);
                dtSalaryItems = objPayRptMgr.GetFiscalYearWiseSalaryItemData(strVal[0], strVal[1]);
            }
            else
            {
                dtEmployee    = objPayRptMgr.GetMonthWiseDistinctEmployeeForStaffSalaryIT(strVal[0], strVal[1], strVal[3]);
                dtSalaryItems = objPayRptMgr.GetMonthWiseSalaryItemDataForStaffSalaryIT(strVal[0], strVal[1], strVal[3]);
            }
            DataTable dtReportSalHead = objPayRptMgr.SelectSalHeadWithSeqForReport(1);
            int       inGrossSalIndx  = this.GetGrossSalHeadIndex(dtReportSalHead);
            if (strVal[3].Trim() != "Nil")
            {
                lblSubHead.Text = "Detail of Staff Salary and Income Tax for " + Common.ReturnFullMonthName(strVal[3]) + "/" + strVal[2];
            }
            else
            {
                lblSubHead.Text = "Detail of Staff Salary and Income Tax for " + strVal[2];
            }

            if (dtReportSalHead.Rows.Count > 0)
            {
                this.IniReportDataTable(dtReportSalHead.Rows.Count + 2);
                this.GetReportData(dtEmployee, dtSalaryItems, inGrossSalIndx, dtReportSalHead);
                if (grReport.Rows.Count > 0)
                {
                    this.FormatGridView(dtReportSalHead, inGrossSalIndx);
                }
            }
        }
    }