public void ReloadGrid()
        {
            string date;
            string sname = "";

            exactmatch = false;
            //10/23/2013 NS modified - added jQuery month/year control

            /*
             * if (this.DateParamEdit.Text == "")
             * {
             *  date = DateTime.Now.ToString();
             *  this.DateParamEdit.Date = Convert.ToDateTime(date);
             * }
             * else
             * {
             *  date = this.DateParamEdit.Value.ToString();
             * }
             */
            if (startDate.Value.ToString() == "")
            {
                date = DateTime.Now.ToString();
            }
            else
            {
                date = startDate.Value.ToString();
            }
            DateTime  dtval = Convert.ToDateTime(date);
            DataTable dt    = new DataTable();

            dt = VSWebBL.DashboardBL.MailHealthBL.Ins.GetServerMailDelivered(sname, dtval.Month, dtval.Year, exactmatch);
            if (dt.Rows.Count == 0)
            {
                ServerStatsGridView.TotalSummary.Clear();
            }
            ServerStatsGridView.DataSource = dt;
            ServerStatsGridView.DataBind();
        }
Beispiel #2
0
        public void ReloadGrid()
        {
            string date;
            string sname = "";

            exactmatch = false;
            //10/23/2013 NS modified - added jQuery month/year control

            /*
             * if (this.DateParamEdit.Text == "")
             * {
             *  date = DateTime.Now.ToString();
             *  this.DateParamEdit.Date = Convert.ToDateTime(date);
             * }
             * else
             * {
             *  date = this.DateParamEdit.Value.ToString();
             * }
             */
            if (startDate.Value.ToString() == "")
            {
                date = DateTime.Now.ToString();
                //3/21/3014 NS added
                startDate.Value = DateTime.Now.ToString("MMMM") + " " + DateTime.Now.ToString("yyyy");
            }
            else
            {
                date = startDate.Value.ToString();
            }
            DateTime  dtval = Convert.ToDateTime(date);
            DataTable dt    = new DataTable();

            dt = VSWebBL.DashboardBL.MailHealthBL.Ins.GetMailStats(sname, dtval.Month, dtval.Year, exactmatch);
            ServerStatsGridView.DataSource = dt;
            ServerStatsGridView.DataBind();
        }