Exemplo n.º 1
0
    private void GetFestivalDate(string strStDate, string strEndDate)
    {
        grFestivalDate.DataSource = objMst.GetFestivalDate(strStDate, strEndDate);
        grFestivalDate.DataBind();

        foreach (GridViewRow gRow in grFestivalDate.Rows)
        {
            gRow.Cells[2].Text = Common.DisplayDate(gRow.Cells[2].Text);
            if (Convert.ToDecimal(gRow.Cells[3].Text) == 0)
            {
                gRow.Cells[3].Text      = "Today";
                gRow.Cells[3].BackColor = System.Drawing.Color.LightGreen;
            }
        }
        lblFestivalDate.Text = grFestivalDate.Rows.Count.ToString();

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