Beispiel #1
0
        protected void DAGGridView_SelectionChanged(object sender, EventArgs e)
        {
            if (DAGGridView.Selection.Count > 0)
            {
                System.Collections.Generic.List <object> DagID   = DAGGridView.GetSelectedFieldValues("ID");
                System.Collections.Generic.List <object> DAGName = DAGGridView.GetSelectedFieldValues("DAGName");

                if (DagID.Count > 0)
                {
                    string    sID = DagID[0].ToString();
                    DataTable dt  = VSWebBL.DashboardBL.ExchangeServerDetailsBL.Ins.GetDAGActivationPreference(sID);
                    //10/28/2014 NS added for VE-157
                    string sDAGName = DAGName[0].ToString();
                    lblSubtitle.InnerHtml = sDAGName;
                    dt = VSWebBL.DashboardBL.ExchangeServerDetailsBL.Ins.GetDAGHealth(sID);
                    Session["DAGHealth"] = dt;
                }
            }
        }
Beispiel #2
0
        public void FillDAGStatusGrid()
        {
            string    DAGList = "";
            DataTable dt      = new DataTable();

            dt = VSWebBL.ExchangeBAL.Ins.GetDAGStatus("");
            Session["ExchangeDAGStatusList"] = dt;
            //DAGList.Text = "0";
            DAGList = "0";
            if (dt != null && dt.Rows.Count > 0)
            {
                //DAGList.Text = dt.Rows.Count.ToString();
                DAGList = dt.Rows.Count.ToString();
            }
            DAGGridView.DataSource = dt;
            DAGGridView.DataBind();
            //7/18/2014 NS added
            DataRow rolerow = srvroles.Rows.Add();

            rolerow["Role"]      = "DAG";
            rolerow["RoleCount"] = Convert.ToInt32(DAGList);
        }
Beispiel #3
0
        public void FillDAGStatusGridfromSession()
        {
            DataTable DataServers = new DataTable();

            try
            {
                if (Session["DAGStatusList"] != null && Session["DAGStatusList"] != "")
                {
                    DataServers = Session["DAGStatusList"] as DataTable;
                }
                if (DataServers.Rows.Count > 0)
                {
                    DataServers.PrimaryKey = new DataColumn[] { DataServers.Columns["DAGName"] };
                    //DAGList.Text = DataServers.Rows.Count.ToString();
                }
                DAGGridView.DataSource = DataServers;
                DAGGridView.DataBind();
            }
            catch (Exception ex)
            {
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
        }
Beispiel #4
0
        public void FillDAGStatusGrid()
        {
            string    DAGList = "";
            DataTable dt      = new DataTable();

            if (VSWebBL.DashboardBL.ExchangeServerDetailsBL.Ins.getDagIdFromName(DAGName) == "-1")
            {
                dt = VSWebBL.ExchangeBAL.Ins.GetDAGStatus("");
            }
            else
            {
                dt = VSWebBL.ExchangeBAL.Ins.GetDAGStatus(DAGName.ToString());
            }
            Session["DAGStatusList"] = dt;
            //DAGList.Text = "0";
            DAGList = "0";
            if (dt != null && dt.Rows.Count > 0)
            {
                //DAGList.Text = dt.Rows.Count.ToString();
                DAGList = dt.Rows.Count.ToString();
            }
            DAGGridView.DataSource = dt;
            DAGGridView.DataBind();
        }
Beispiel #5
0
        protected void DAGGridView_SelectionChanged(object sender, EventArgs e)
        {
            if (DAGGridView.Selection.Count > 0)
            {
                System.Collections.Generic.List <object> DAGName = DAGGridView.GetSelectedFieldValues("DAGName");

                if (DAGName.Count > 0)
                {
                    string sDAGName = DAGName[0].ToString();
                    //DevExpress.Web.ASPxWebControl.RedirectOnCallback("~/Dashboard/DAGDetail.aspx?id=" + sID + "&Name=" + sDAGName);
                    //Mukund: VSPLUS-844, Page redirect on callback
                    try
                    {
                        DevExpress.Web.ASPxWebControl.RedirectOnCallback("~/Dashboard/DAGHealth.aspx?Name=" + sDAGName);
                        Context.ApplicationInstance.CompleteRequest();//Mukund, 05Aug14, VSPLUS-844:Page redirect on callback
                    }
                    catch (Exception ex)
                    {
                        Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                        //throw ex;
                    }
                }
            }
        }
Beispiel #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int index;

            if (Request.QueryString["Name"] != null)
            {
                //DAGID = int.Parse(Request.QueryString["ID"].ToString());
                DAGName = Request.QueryString["Name"].ToString();
                //9/24/2014 NS modified
                //lblTitle.Text += ":  " + DAGName;
                lblTitle.InnerHtml += ":  " + DAGName;
            }
            if (!IsPostBack)
            {
                Session["DAGStatusList"] = null;
                FillDAGStatusGrid();
                if (Session["UserPreferences"] != null)
                {
                    DataTable UserPreferences = (DataTable)Session["UserPreferences"];
                    foreach (DataRow dr in UserPreferences.Rows)
                    {
                        if (dr[1].ToString() == "DAGHealth|DAGGridView")
                        {
                            DAGGridView.SettingsPager.PageSize = Convert.ToInt32(dr[2]);
                        }
                        if (dr[1].ToString() == "DAGHealth|ActivPrefGridView")
                        {
                            ActivPrefGridView.SettingsPager.PageSize = Convert.ToInt32(dr[2]);
                        }
                    }
                }
            }
            else
            {
                FillDAGStatusGrid();
            }
            //7/24/2014 NS added
            string url = HttpContext.Current.Request.Url.AbsoluteUri;

            Session["BackURL"] = url;
            if (Request.QueryString["Name"] == null)
            {
                index = DAGGridView.FocusedRowIndex;
                if (DAGGridView.VisibleRowCount > 0)
                {
                    value   = DAGGridView.GetRowValues(index, "ID").ToString();
                    DAGName = DAGGridView.GetRowValues(index, "DAGName").ToString();
                }
            }
            else
            {
                //value = DAGID.ToString();
                value = VSWebBL.DashboardBL.ExchangeServerDetailsBL.Ins.getDagIdFromName(DAGName);
            }
            DataTable dt = VSWebBL.DashboardBL.ExchangeServerDetailsBL.Ins.GetDAGActivationPreference(value);

            if (dt.Rows.Count > 0)
            {
                dtactive = VSWebBL.DashboardBL.ExchangeServerDetailsBL.Ins.GetDAGActivePassive(value);
                dthealth = VSWebBL.DashboardBL.ExchangeServerDetailsBL.Ins.GetDAGHealth(value);
                //10/28/2014 NS modified for VE-157
                //DAGLabel.Text = DAGName + " Activation Preferences";
                //DAGPageControl.TabPages[0].Text = DAGName + " - Activation Preferences";
                lblSubtitle.InnerHtml = DAGName;
                ActivPrefGridView.Columns.Clear();
                ActivPrefGridView.DataSource          = dt;
                ActivPrefGridView.AutoGenerateColumns = true;
                //8/21/2014 NS added for VSPLUS-888
                ActivPrefGridView.Settings.ShowGroupPanel = false;
                ActivPrefGridView.KeyFieldName            = String.Empty;
                ActivPrefGridView.DataBind();
                for (int i = 1; i < ActivPrefGridView.Columns.Count; i++)
                {
                    ActivPrefGridView.Columns[i].Caption = "Activation Preference " + dt.Columns[i].Caption;
                }
            }
            else
            {
                //10/28/2014 NS modified for VE-157
                //DAGLabel.Text = DAGName + " Activation Preferences";
                //DAGPageControl.TabPages[0].Text = DAGName + " - Activation Preferences";
                lblSubtitle.InnerHtml = DAGName;
                ActivPrefGridView.Columns.Clear();
                ActivPrefGridView.DataSource          = dt;
                ActivPrefGridView.AutoGenerateColumns = true;
                //8/21/2014 NS added for VSPLUS-888
                ActivPrefGridView.Settings.ShowGroupPanel = false;
                ActivPrefGridView.KeyFieldName            = String.Empty;
                ActivPrefGridView.DataBind();
            }
            //10/28/2014 NS added for VE-157
            Session["DAGHealth"] = dthealth;

            //8/21/2014 NS modified for VSPLUS-888
            if (value != null && value != "")
            {
                //10/28/2014 NS modified for VE-157
                //DAGMembersLabel.Text = DAGName + " - DAG Members";
                //DAGPageControl.TabPages[1].Text = DAGName + " - DAG Members";
                lblSubtitle.InnerHtml = DAGName;
                FillDAGMembersGridView(int.Parse(value));
                //DAGDBsLabel.Text = DAGName + " -  DAG Databases";
                //DAGPageControl.TabPages[2].Text = DAGName + " - DAG Databases";
                lblSubtitle.InnerHtml = DAGName;
                FillDAGDBGridView(int.Parse(value));
                //DAGDBOverviewLabel.Text = DAGName + " -  DAG Databases Status";
                //DAGPageControl.TabPages[3].Text = DAGName + " - DAG Databases Status";
                lblSubtitle.InnerHtml = DAGName;
                FillDAGDBOverviewGridView(int.Parse(value));
            }
            //10/28/2014 NS added for VE-157
            SetTabImage();
        }