private void GetBMDCRegDate(string strStDate, string strEndDate) { grProfCertDate.DataSource = objMst.GetBMDCRegDate(strStDate, strEndDate); grProfCertDate.DataBind(); foreach (GridViewRow gRow in grProfCertDate.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 = ""; } } lblProfCertDate.Text = grProfCertDate.Rows.Count.ToString(); if (grProfCertDate.Rows.Count > 0) { pnlProfCertDate.Visible = true; } else { pnlProfCertDate.Visible = false; } }