Пример #1
0
    private void GetDrLicRenewDate(string strStDate, string strEndDate)
    {
        grDrivingLicense.DataSource = objMst.GetDrLicRenewDate(strStDate, strEndDate);
        grDrivingLicense.DataBind();

        foreach (GridViewRow gRow in grDrivingLicense.Rows)
        {
            gRow.Cells[6].Text = Common.DisplayDate(gRow.Cells[6].Text);
            if (Convert.ToDecimal(gRow.Cells[7].Text) == 0)
            {
                gRow.Cells[7].Text      = "Today";
                gRow.Cells[7].BackColor = System.Drawing.Color.LightGreen;
            }
            else if (Convert.ToDecimal(gRow.Cells[7].Text) < 0)
            {
                gRow.Cells[7].Text = "0";
            }

            if (gRow.Cells[5].Text == "-1")
            {
                gRow.Cells[5].Text = "";
            }
        }
        lblrDrivingLicense.Text = grDrivingLicense.Rows.Count.ToString();

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