private void GetConfirmationEmp(string strStDate, string strEndDate) { grConfirmation.DataSource = objMst.GetConfirmationEmp(strStDate, strEndDate); grConfirmation.DataBind(); foreach (GridViewRow gRow in grConfirmation.Rows) { gRow.Cells[6].Text = Common.DisplayDate(gRow.Cells[6].Text); if (Convert.ToDecimal(Common.ReturnZeroForNull(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 = ""; } } lblConfirmation.Text = grConfirmation.Rows.Count.ToString(); if (grConfirmation.Rows.Count > 0) { pnlConfirmation.Visible = true; } else { pnlConfirmation.Visible = false; } }