Esempio n. 1
0
    private void GetAddResponsibility(string strStDate, string strEndDate)
    {
        grAddResponsibility.DataSource = objMst.GetAddResponsibility(strStDate, strEndDate);
        grAddResponsibility.DataBind();

        foreach (GridViewRow gRow in grAddResponsibility.Rows)
        {
            gRow.Cells[4].Text = Common.DisplayDate(gRow.Cells[4].Text);
            if (Convert.ToDecimal(gRow.Cells[5].Text) == 0)
            {
                gRow.Cells[5].Text      = "Today";
                gRow.Cells[5].BackColor = System.Drawing.Color.LightGreen;
            }
            else if (Convert.ToDecimal(gRow.Cells[5].Text) < 0)
            {
                gRow.Cells[5].Text = "0";
            }
        }
        lblAddResponsibility.Text = grAddResponsibility.Rows.Count.ToString();

        if (grAddResponsibility.Rows.Count > 0)
        {
            pnlAddResponsibility.Visible = true;
        }
        else
        {
            pnlAddResponsibility.Visible = false;
        }
    }