Esempio n. 1
0
        public void ReloadGrid()
        {
            exactmatch = false;
            //12/4/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();
            }
            dtval = Convert.ToDateTime(date);
            DataTable dt = new DataTable();

            //6/12/2015 NS modified for VSPLUS-1622
            if (AlertDefComboBox.SelectedIndex != -1)
            {
                // 3/14/2016 Durga Addded for VSPLUS-2704
                if (AlertDefComboBox.Text == "All Open Alerts")
                {
                    dt = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetAllOpenAlers(dtval.Month.ToString(), dtval.Year.ToString());
                    AlertsHistory.DataSource = dt;
                    AlertsHistory.DataBind();
                }
                else
                {
                    dt = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetAlertHistoryByAlertID(AlertDefComboBox.SelectedItem.Value.ToString());
                }
            }
            else
            {
                dt = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetAlertHistory(dtval.Month.ToString(), dtval.Year.ToString());
            }
            AlertsHistory.DataSource = dt;
            AlertsHistory.DataBind();

            AlertsHistory.SortBy(AlertsHistory.Columns["DateTimeOfAlert"] as GridViewDataColumn, DevExpress.Data.ColumnSortOrder.Descending);
        }
Esempio n. 2
0
        protected void AlertDefComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            if (AlertDefComboBox.SelectedIndex != -1)
            {// 3/14/2016 Durga Addded for VSPLUS-2704
                if (AlertDefComboBox.Text == "All Open Alerts")
                {
                    dt = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetAllOpenAlers(dtval.Month.ToString(), dtval.Year.ToString());
                    AlertsHistory.DataSource = dt;
                    AlertsHistory.DataBind();
                }
                else
                {
                    dt = VSWebBL.ConfiguratorBL.AlertsBL.Ins.GetAlertHistoryByAlertID(AlertDefComboBox.SelectedItem.Value.ToString());

                    AlertsHistory.DataSource = dt;
                    AlertsHistory.DataBind();
                }
            }
        }