Exemple #1
0
    private void OpenRecord()
    {
        dtHeadSeq            = objPayrollMgr.SelectPaySlipSalHeadSeq(0, 0);
        grHeadSeq.DataSource = dtHeadSeq;
        grHeadSeq.DataBind();

        foreach (GridViewRow gRow in grHeadSeq.Rows)
        {
            gRow.Cells[1].Text = Convert.ToString(Math.Round(Convert.ToDouble(gRow.Cells[1].Text), 0));
            switch (gRow.Cells[3].Text.Trim())
            {
            case "S":
                gRow.Cells[3].Text      = "Salary";
                gRow.Cells[3].BackColor = System.Drawing.Color.FromArgb(204, 204, 204);
                break;

            case "B":
                gRow.Cells[3].Text      = "Benefit";
                gRow.Cells[3].BackColor = System.Drawing.Color.FromArgb(153, 255, 102);
                break;

            case "D":
                gRow.Cells[3].Text      = "Deduction";
                gRow.Cells[3].BackColor = System.Drawing.Color.FromArgb(255, 153, 051);
                break;
            }
        }

        dtSalaryHead = objPayrollMgr.SelectSalaryHead(0, "");
        this.Bind_DdlSalaryHead();
    }