Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Page.Title = "Lotus Domino Cluster";
            if (Request.QueryString["tab"] != null)
            {
                if (!IsPostBack)
                {
                    //FillClusterCategoryComboBox();

                    if (Session["UserPreferences"] != null)
                    {
                        DataTable UserPreferences = (DataTable)Session["UserPreferences"];
                    }
                }
            }

            try
            {
                if (Request.QueryString["ID"] != null && Request.QueryString["ID"] != "")
                {
                    Mode = "Update";

                    ServerKey = int.Parse(Request.QueryString["ID"]);

                    //For Validation Summary
                    ////ApplyValidationSummarySettings();
                    ////ApplyEditorsSettings();
                    if (!IsPostBack)
                    {
                        //Fill Server Attributes Tab & Advanced Tab
                        FillData(ServerKey);


                        //11/19/2014 NS modified
                        //DominoClusterRoundPanel.HeaderText = "Domino Cluster - " + ClsAttNameTextBox.Text;
                        servernamelbldisp.InnerHtml = "Network Latency - " + ClsAttNameTextBox.Text;
                    }
                }
                else
                {
                    Mode = "Insert";
                    if (!IsPostBack)
                    {
                        testduration.Text        = "5";
                        ScanIntervalTextBox.Text = "60";

                        scanEnableCheckBox.Checked = true;

                        ClsAttNameTextBox.Focus();
                    }
                }
            }
            catch (Exception ex)
            {
                //6/27/2014 NS added for VSPLUS-634
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally { }
        }
Esempio n. 2
0
        private void InsertStatus()
        {
            errorDiv.Style.Value = "display: none";
            DominoCluster ClsObj = new DominoCluster();

            ClsObj.Name = ClsAttNameTextBox.Text;
            DataTable returntable = VSWebBL.ConfiguratorBL.DominoClusterBL.Ins.GetNameforStatus(ClsObj);

            if (returntable.Rows.Count > 0)
            {
                //4/29/2015 NS modified

                /*
                 * ErrorMessageLabel.Text = "This cluster name is already in use.  Please enter a different server name.";
                 * ErrorMessagePopupControl.ShowOnPageLoad = true;
                 */
                errorDiv.InnerHtml = "This cluster name is already in use.  Please enter a different cluster name." +
                                     "<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>";
                errorDiv.Style.Value = "display: block";
                flag = true;
                ClsAttNameTextBox.Focus();
            }
            else
            {
                try
                {
                    object ReturnValue = VSWebBL.StatusBL.StatusTBL.Ins.InsertData(CollectDataforStatus());
                    // SetFocusOnError(ReturnValue);
                    if (ReturnValue.ToString().Equals("True"))
                    {
                        Session["Status"] = ClsAttNameTextBox.Text;
                        Response.Redirect("ClusterGrid.aspx", false);                         //Mukund, 05Aug14, VSPLUS-844:Page redirect on callback
                        Context.ApplicationInstance.CompleteRequest();
                        //ErrorMessageLabel.Text = "Cluster record created successfully.";
                        //ErrorMessagePopupControl.HeaderText = "Information";
                        //ErrorMessagePopupControl.ShowCloseButton = false;
                        //ValidationUpdatedButton.Visible = true;
                        //ValidationOkButton.Visible = false;
                        //ErrorMessagePopupControl.ShowOnPageLoad = true;
                    }
                    else if (ReturnValue.ToString().Equals("false"))
                    {
                        errorDiv.InnerHtml = "The following error has occurred: could not insert a record into the SQL table." +
                                             "<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button>";
                        errorDiv.Style.Value = "display: block";
                        //6/27/2014 NS added for VSPLUS-634
                        Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Error while trying to insert to SQL.");
                    }
                }
                catch (Exception ex)
                {
                    ErrorMessageLabel.Text = "Error attempting to update the status table :" + ex.Message;
                    ErrorMessagePopupControl.ShowOnPageLoad = true;
                    //6/27/2014 NS added for VSPLUS-634
                    Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                }
                finally { }
            }
        }
Esempio n. 3
0
        private void InsertNetworkLatency()
        {
            NetworkLatency ClsObj = new NetworkLatency();

            ClsObj.Name = ClsAttNameTextBox.Text;
            DataTable returntable = VSWebBL.ConfiguratorBL.NetworkLatencyBL.Ins.GetIPAddress(ClsObj);

            if (returntable.Rows.Count > 0)
            {
                ErrorMessageLabel.Text = "This Latency name is already in use.  Please enter a different server name.";
                ErrorMessagePopupControl.ShowOnPageLoad = true;
                flag = true;
                ClsAttNameTextBox.Focus();
            }
            else
            {
                try
                {
                    object ReturnValue = VSWebBL.ConfiguratorBL.NetworkLatencyBL.Ins.InsertData(CollectDataForNetworkLatency());
                    SetFocusOnError(ReturnValue);
                    if (ReturnValue.ToString() == "True")
                    {
                        ErrorMessageLabel.Text = "Latency record created successfully.";
                        ErrorMessagePopupControl.HeaderText      = "Information";
                        ErrorMessagePopupControl.ShowCloseButton = false;
                        ValidationUpdatedButton.Visible          = true;
                        ValidationOkButton.Visible = false;
                        ErrorMessagePopupControl.ShowOnPageLoad = true;
                    }
                    else
                    {
                        flag = true;
                    }
                }
                catch (Exception ex)
                {
                    //6/27/2014 NS added for VSPLUS-634
                    Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                    throw ex;
                }
                finally { }
            }
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Page.Title = "Lotus Domino Cluster";
            if (Request.QueryString["tab"] != null)
            {
                ASPxPageControl1.ActiveTabIndex = 2;
            }
            if (!IsPostBack)
            {
                ServerAComboBox.Items.Clear();
                ServerBComboBox3.Items.Clear();
                ServerCComboBox.Items.Clear();
                //FillClusterCategoryComboBox();
                FillClusterServerAComboBox();
                FillClusterServerBComboBox();
                FillClusterServerCComboBox();
                if (Session["UserPreferences"] != null)
                {
                    DataTable UserPreferences = (DataTable)Session["UserPreferences"];
                    foreach (DataRow dr in UserPreferences.Rows)
                    {
                        if (dr[1].ToString() == "LotusDominoCluster|MaintWinListGridView")
                        {
                            MaintWinListGridView.SettingsPager.PageSize = Convert.ToInt32(dr[2]);
                        }
                        if (dr[1].ToString() == "LotusDominoCluster|AlertGridView")
                        {
                            AlertGridView.SettingsPager.PageSize = Convert.ToInt32(dr[2]);
                        }
                    }
                }
            }

            try
            {
                if (Request.QueryString["ID"] != null && Request.QueryString["ID"] != "")
                {
                    Mode = "Update";

                    ServerKey = int.Parse(Request.QueryString["ID"]);

                    //For Validation Summary
                    ////ApplyValidationSummarySettings();
                    ////ApplyEditorsSettings();
                    if (!IsPostBack)
                    {
                        //Fill Server Attributes Tab & Advanced Tab
                        FillData(ServerKey);
                        FillMaintenanceGrid();
                        FillAlertGridView();
                        //11/19/2014 NS modified
                        //DominoClusterRoundPanel.HeaderText = "Domino Cluster - " + ClsAttNameTextBox.Text;
                        servernamelbldisp.InnerHtml = "Domino Cluster - " + ClsAttNameTextBox.Text;
                    }
                    else
                    {
                        FillMaintServersGridfromSession();
                        FillAlertGridViewfromSession();
                    }
                }
                else
                {
                    errorDiv.Style.Value = "display: none;";
                    Mode = "Insert";
                    if (!IsPostBack)
                    {
                        OHScanTextBox.Text           = "120";
                        ScanIntervalTextBox.Text     = "60";
                        ClusterCategoryComboBox.Text = "Mail";
                        scanEnableCheckBox.Checked   = true;
                        //ServerAComboBox.Text = "None";
                        //ServerATextBox.Enabled = false;
                        //ServerBComboBox3.Text = "None";
                        //ServerBTextBox.Enabled = false;
                        ServerCComboBox.Text = "None";
                        if (ServerCComboBox.Text == "None")
                        {
                            ServerCTextBox.Enabled = false;
                        }
                        else
                        {
                            ServerCTextBox.Enabled = true;
                        }

                        ClsAttNameTextBox.Focus();
                    }
                }
            }
            catch (Exception ex)
            {
                //6/27/2014 NS added for VSPLUS-634
                Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
                throw ex;
            }
            finally { }
        }