Beispiel #1
0
 /// <summary>
 /// Call to Get Data from DominoServers based on Primary key
 /// </summary>
 /// <param name="DominoServersObject">DominoServers object</param>
 /// <returns></returns>
 public DominoServers GetData(DominoServers DominoServersObject)
 {
     try
     {
         return(VSWebDAL.ConfiguratorDAL.DominoPropertiesDAL.Ins.GetData(DominoServersObject));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Call to Update Data of DominoServers based on Key
 /// </summary>
 /// <param name="DominoServersObject">DominoServers object</param>
 /// <returns>Object</returns>
 public Object UpdateData(DominoServers DominoServersObject)
 {
     try
     {
         Object ReturnValue = ValidateDSUpdate(DominoServersObject);
         if (ReturnValue.ToString() == "")
         {
             return(VSWebDAL.ConfiguratorDAL.DominoPropertiesDAL.Ins.UpdateData(DominoServersObject));
         }
         else
         {
             return(ReturnValue);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #3
0
        /// <summary>
        /// Validation before submitting data for Server Attributes tab
        /// </summary>
        /// <param name="DominoServersObject"></param>
        /// <returns></returns>
        public Object ValidateDSUpdate(DominoServers DominoServersObject)
        {
            Object ReturnValue = "";

            try
            {
                // if (DominoServersObject.Name == null || DominoServersObject.Name == "")
                //return "ER#Please enter the server name, in hierarchical format, such as 'NYMail01/US/IBM'";
                if (DominoServersObject.DeadThreshold.ToString() == "")
                {
                    return("ER#Please enter the number 'Dead' mail messages, over which you would like to be alerted.'");
                }
                if (DominoServersObject.PendingThreshold.ToString() == "")
                {
                    return("ER#Please enter the number 'Pending' mail messages, over which you would like to be alerted.'");
                }
                if (DominoServersObject.HeldThreshold.ToString() == "")
                {
                    return("ER#Please enter the number 'Held' mail messages, over which you would like to be alerted.'");
                }
                // if (DominoServersObject.Location == null || DominoServersObject.Location == "")
                // return "ER#Please enter the location of the device, such as '8th floor server room'";
                // if (DominoServersObject.Description == null || DominoServersObject.Description == "")
                //  return "ER#Please enter a description of the server, such as 'New York Executives'";
                if (DominoServersObject.Category == null || DominoServersObject.Category == "")
                {
                    return("ER#Please enter a category");
                }
                if (DominoServersObject.ResponseThreshold.ToString() == "")
                {
                    return("ER#Please enter a Response Threshold, in milliseconds, over which the device will be considered 'slow'.");
                }
                if (DominoServersObject.ScanInterval.ToString() == "")
                {
                    return("ER#Please enter a Scan Interval");
                }
                if (DominoServersObject.FailureThreshold.ToString() == "")
                {
                    return("ER#Please enter the failure threshold.  How many times can the server be down before an alert is sent?");
                }
                if (DominoServersObject.OffHoursScanInterval.ToString() == "")
                {
                    return("ER#Please enter an off-hours Scan Interval");
                }
                if (DominoServersObject.RetryInterval.ToString() == "")
                {
                    return("ER#Please enter a Retry Interval, to be used when the device is down.");
                }
                //6/18/2015 NS added for VSPLUS-1802
                if (DominoServersObject.EXJEnabled)
                {
                    if (DominoServersObject.EXJLookBackEnabled)
                    {
                        if (DominoServersObject.EXJStartTime.ToString() == "")
                        {
                            return("ER#Please enter a Start Time to be used when scanning EXJournals (Server Attributes tab).");
                        }
                        if (DominoServersObject.EXJDuration.ToString() == "" || DominoServersObject.EXJDuration == 0)
                        {
                            return("ER#Please enter a non-zero Duration to be used when scanning EXJournals (Server Attributes tab).");
                        }
                        if (DominoServersObject.EXJLookBackDuration.ToString() == "" || DominoServersObject.EXJLookBackDuration == 0)
                        {
                            return("ER#Please enter a non-zero Look Back Period to be used when scanning EXJournals (Server Attributes tab).");
                        }
                    }
                }
                //2/23/2016 NS added for VSPLUS-2641
                if (DominoServersObject.AvailabilityIndexThreshold.ToString() == "")
                {
                    return("ER#Please enter the availability index threshold.");
                }
            }
            catch (Exception ex)
            { throw ex; }
            finally
            { }
            return("");
        }
Beispiel #4
0
        protected void AssignButton_Click(object sender, EventArgs e)
        {
            Object    ReturnValue;
            Servers   ServersObject;
            DataTable dtsrv  = new DataTable();
            DataTable dtdisk = new DataTable();

            dtdisk.Columns.Add("ServerName");
            dtdisk.Columns.Add("DiskName");
            dtdisk.Columns.Add("Threshold");
            //dtdisk.Columns.Add("ThresholdType");
            //dtdisk.Columns.Add("DiskInfo");
            //3/4/2014 NS added for VSPLUS-431
            Object ReturnValueDisk;

            DominoServers DominoServersObjectRet = new DominoServers();
            DominoServers DominoServersObject    = new DominoServers();

            if (AdvDiskSpaceThTrackBar.Value.ToString() != null)
            {
                DominoServersObject.DiskSpaceThreshold = float.Parse(AdvDiskSpaceThTrackBar.Value.ToString()) / 100;
            }
            if (AdvMemoryThTrackBar.Value.ToString() != null)
            {
                DominoServersObject.Memory_Threshold = float.Parse(AdvMemoryThTrackBar.Value.ToString()) / 100;
            }
            if (AdvCPUThTrackBar.Value.ToString() != null)
            {
                DominoServersObject.CPU_Threshold = float.Parse(AdvCPUThTrackBar.Value.ToString()) / 100;
            }
            DominoServersObject.ScanDBHealth = SrvAtrDBHealthCheckBox.Checked;
            DominoServersObject.BES_Server   = AdvMonitorBESNtwrkQCheckBox.Checked;
            if (SrvAtrPendingMailThTextBox.Text != null && SrvAtrPendingMailThTextBox.Text != "")
            {
                DominoServersObject.PendingThreshold = int.Parse(SrvAtrPendingMailThTextBox.Text);
            }
            if (SrvAtrDeadMailThTextBox.Text != null && SrvAtrDeadMailThTextBox.Text != "")
            {
                //5/15/2013 NS modified
                DominoServersObject.DeadMailDeleteThreshold = 0;
                DominoServersObject.DeadThreshold           = int.Parse(SrvAtrDeadMailThTextBox.Text);
            }
            if (SrvAtrHeldMailThTextBox.Text != null && SrvAtrHeldMailThTextBox.Text != "")
            {
                DominoServersObject.HeldThreshold = int.Parse(SrvAtrHeldMailThTextBox.Text);
            }
            if (SrvAtrScanIntvlTextBox.Text != null && SrvAtrScanIntvlTextBox.Text != "")
            {
                DominoServersObject.ScanInterval = int.Parse(SrvAtrScanIntvlTextBox.Text);
            }
            if (SrvAtrOffScanIntvlTextBox.Text != null && SrvAtrOffScanIntvlTextBox.Text != "")
            {
                DominoServersObject.OffHoursScanInterval = int.Parse(SrvAtrOffScanIntvlTextBox.Text);
            }
            if (SrvAtrRetryIntvlTextBox.Text != null && SrvAtrRetryIntvlTextBox.Text != "")
            {
                DominoServersObject.RetryInterval = int.Parse(SrvAtrRetryIntvlTextBox.Text);
            }
            if (SrvAtrResponseThTextBox.Text != null && SrvAtrResponseThTextBox.Text != "")
            {
                DominoServersObject.ResponseThreshold = int.Parse(SrvAtrResponseThTextBox.Text);
            }
            if (SrvAtrFailBefAlertTextBox.Text != null && SrvAtrFailBefAlertTextBox.Text != "")
            {
                DominoServersObject.FailureThreshold = int.Parse(SrvAtrFailBefAlertTextBox.Text);
            }
            if (AdvClusterRepTextBox.Text != null && AdvClusterRepTextBox.Text != "")
            {
                DominoServersObject.Cluster_Rep_Delays_Threshold = float.Parse(AdvClusterRepTextBox.Text.ToString());
            }
            SrvCheckBoxList.SelectAll();
            if (SrvCheckBoxList.SelectedItems.Count > 0)
            {
                dtsrv.Columns.Add("ID");
                dtsrv.Columns.Add("ServerName");
                dtsrv.Columns.Add("IPAddress");
                dtsrv.Columns.Add("Description");
                dtsrv.Columns.Add("ServerType");
                dtsrv.Columns.Add("Location");
                dtsrv.Columns.Add("LocationID");
                for (int i = 0; i < SrvCheckBoxList.SelectedItems.Count; i++)
                {
                    DataRow dr = dtsrv.NewRow();
                    dr["ID"]          = "";
                    dr["ServerName"]  = SrvCheckBoxList.SelectedItems[i].ToString();
                    dr["IPAddress"]   = "";
                    dr["Description"] = "Production";
                    dr["ServerType"]  = "Domino";
                    dr["Location"]    = "";
                    dr["LocationID"]  = 0;
                    ServersObject     = CollectDataForServers("Insert", dr);
                    DataTable dt = VSWebBL.SecurityBL.ServersBL.Ins.GetDataByName(ServersObject);
                    if (dt.Rows.Count > 0)
                    {
                        DominoServersObject.Key = int.Parse(dt.Rows[0]["ID"].ToString());
                    }
                    DominoServersObject.Category = dr["Description"].ToString();
                    DominoServersObject.Enabled  = true;
                    DominoServersObjectRet       = VSWebBL.ConfiguratorBL.DominoPropertiesBL.Ins.GetData(DominoServersObject);
                    //7/24/2015 NS added for VSPLUS-2013
                    DominoServersObject.ScanTravelerServer = true;
                    DominoServersObject.ScanServlet        = true;
                    ReturnValue = VSWebBL.ConfiguratorBL.DominoPropertiesBL.Ins.UpdateData(DominoServersObject);
                    //Clearing the previous added rows
                    //(22/4/16 sowmya added for VSPLUS-2821)
                    dtdisk.Rows.Clear();
                    //3/4/2014 NS added for VSPLUS-431
                    DataRow row = dtdisk.Rows.Add();
                    row["ServerName"] = SrvCheckBoxList.SelectedItems[i].ToString();
                    //2/11/2016 Durga Added for VSPLUS 2432
                    row["DiskName"]  = "NoAlerts";
                    row["Threshold"] = "0";

                    ReturnValueDisk = VSWebBL.ConfiguratorBL.DominoPropertiesBL.Ins.InsertDiskSettingsData(dtdisk);
                }
                Response.Redirect("~/Security/ImportServers3.aspx", false);//Mukund, 05Aug14, VSPLUS-844:Page redirect on callback
                Context.ApplicationInstance.CompleteRequest();
            }
        }