示例#1
0
        public bool InsertData(HoursIndicator BusinesshoursObject)

        {
            bool Insert = false;

            try
            {
                DataTable NetworkDevicesDataTable = new DataTable();



                //4/23/2015 NS modified
                string SqlQuery = "INSERT INTO [HoursIndicator] (Type,Starttime,Duration,Issunday,IsMonday" +
                                  ",IsTuesday,IsWednesday,IsThursday,IsFriday,Issaturday,UseType) " +
                                  "VALUES('" + BusinesshoursObject.Type + "','" + BusinesshoursObject.Starttime + "','" + BusinesshoursObject.Duration + "','" + BusinesshoursObject.Issunday +
                                  "','" + BusinesshoursObject.IsMonday + "','" + BusinesshoursObject.IsTuesday + "','" + BusinesshoursObject.IsWednesday +
                                  "','" + BusinesshoursObject.IsThursday + "','" + BusinesshoursObject.IsFriday + "','" + BusinesshoursObject.Issaturday +
                                  "'," + BusinesshoursObject.UseType + ")";
                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#2
0
        /// <summary>
        /// Insert data into ExchangeMailProbe table
        /// </summary>
        /// <param name="DSObject">ExchangeMailProbe object</param>
        /// <returns></returns>

        public bool InsertData(ExchangeMailProbeClass ProbeObject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO ExchangeMailProbe (Enabled,Name,ExchangeMailAddress,Category,ScanInterval" +
                                  ",OffHoursScanInterval,DeliveryThreshold,RetryInterval,SourceServerID,Filename)" +
                                  "VALUES('" + ProbeObject.Enabled + "','" + ProbeObject.Name +
                                  "','" + ProbeObject.ExchangeMailAddress + "','" + ProbeObject.Category +
                                  "','" + ProbeObject.ScanInterval + "','" + ProbeObject.OffHoursScanInterval +
                                  "'," + ProbeObject.DeliveryThreshold + "," + ProbeObject.RetryInterval +
                                  ",'" + ProbeObject.SourceServerID + "','" + ProbeObject.Filename + "')";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#3
0
        /// <summary>
        /// Insert data into NotesMailProbe table
        /// </summary>
        /// <param name="DSObject">NotesMailProbe object</param>
        /// <returns></returns>

        public bool InsertData(NotesMailProbe ProbeObject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO NotesMailProbe (Enabled,Name,NotesMailAddress,Category,ScanInterval" +
                                  ",OffHoursScanInterval,DeliveryThreshold,RetryInterval,DestinationServerID,DestinationDatabase" +
                                  ",SourceServer,EchoService,ReplyTo,Filename)" +
                                  "VALUES('" + ProbeObject.Enabled + "','" + ProbeObject.Name +
                                  "','" + ProbeObject.NotesMailAddress + "','" + ProbeObject.Category +
                                  "','" + ProbeObject.ScanInterval + "','" + ProbeObject.OffHoursScanInterval +
                                  "'," + ProbeObject.DeliveryThreshold + "," + ProbeObject.RetryInterval +
                                  ",'" + ProbeObject.DestinationServerID + "','" + ProbeObject.DestinationDatabase + "','" + ProbeObject.SourceServer +
                                  "','" + ProbeObject.EchoService +
                                  "','" + ProbeObject.ReplyTo + "','" + ProbeObject.Filename + "')";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#4
0
文件: URLsDAL.cs 项目: ImranVS/SVNGIT
        /// <summary>
        /// Insert data into URLs table
        /// </summary>
        /// <param name="DSObject">URLs object</param>
        /// <returns></returns>

        public bool InsertData(URLs URLObject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO URLs (TheURL,Name,Category,ScanInterval,OffHoursScanInterval,Enabled" +
                                  ",ResponseThreshold,RetryInterval,SearchString,AlertStringFound,UserName,PW,LocationId,ServerTypeId,FailureThreshold)" +
                                  "VALUES('" + URLObject.TheURL + "','" + URLObject.Name + "','" + URLObject.Category + "'," + URLObject.ScanInterval +
                                  "," + URLObject.OffHoursScanInterval + ",'" + URLObject.Enabled + "'," + URLObject.ResponseThreshold + "," + URLObject.RetryInterval +
                                  ",'" + URLObject.SearchStringNotFound + "','" + URLObject.SearchStringFound + "','" + URLObject.UserName + "','" + URLObject.PW + "'," + URLObject.LocationId + "," + URLObject.ServerTypeId + "," + URLObject.FailureThreshold + ")";



                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#5
0
        /// <summary>
        /// Insert data into DominoCluster table
        /// </summary>
        /// <param name="DSObject">DominoServers object</param>
        /// <returns></returns>

        public bool InsertData(DominoCluster DCObject)
        {
            bool Insert = false;

            try
            {
                //4/27/2016 NS modified for VSPLUS-2724
                string SqlQuery = "INSERT INTO DominoCluster (ServerID_A,Server_A_Directory,Server_A_ExcludeList,ServerID_B,Server_B_Directory," +
                                  "Server_B_ExcludeList,ServerID_C,Server_C_Directory,Server_C_ExcludeList,Missing_Replica_Alert,First_Alert_Threshold," +
                                  "Enabled,Name,ScanInterval,OffHoursScanInterval,RetryInterval,Category,ServerAName,ServerBName,ServerCName) " +
                                  "VALUES('" + DCObject.ServerID_A + "','" + DCObject.Server_A_Directory + "','" + DCObject.Server_A_ExcludeList +
                                  "','" + DCObject.ServerID_B + "','" + DCObject.Server_B_Directory + "','" + DCObject.Server_B_ExcludeList +
                                  "','" + DCObject.ServerID_C + "','" + DCObject.Server_C_Directory + "','" + DCObject.Server_C_ExcludeList +
                                  "','" + DCObject.Missing_Replica_Alert + "'," + DCObject.First_Alert_Threshold +
                                  ",'" + DCObject.Enabled + "','" + DCObject.Name + "'," + DCObject.ScanInterval + "," + DCObject.OffHoursScanInterval +
                                  "," + DCObject.RetryInterval + ",'" + DCObject.Category + "', " +
                                  "'" + DCObject.ServerAName + "', '" + DCObject.ServerBName + "', " +
                                  "'" + DCObject.ServerCName + "')";



                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#6
0
        /// <summary>
        /// Insert data into NetworkDevices table
        /// </summary>
        /// <param name="DSObject">DominoServers object</param>
        /// <returns></returns>

        public bool InsertData(SNMPDevices SNMPObject)
        {
            bool Insert = false;

            try
            {
                DataTable SNMPDevicesDataTable = new DataTable();
                string    SqlQuery             = "select ID from servertypes where servertype='SNMP Devices'";
                SNMPDevicesDataTable = objAdaptor.FetchData(SqlQuery);
                if (SNMPDevicesDataTable.Rows.Count > 0)
                {
                    SNMPObject.ServerTypeId = int.Parse(SNMPDevicesDataTable.Rows[0][0].ToString());
                }

                SqlQuery = "INSERT INTO [SNMPDevices] (Description,Category,Port,Username,Password,[Scanning Interval]" +
                           ",OffHoursScanInterval,Enabled,IncludeOnDashBoard,Location,ImageURL,Name,ResponseThreshold,RetryInterval,Address,LocationID,ServerTypeId,OID) " +
                           "VALUES('" + SNMPObject.Description + "','" + SNMPObject.Category + "'," + SNMPObject.Port + ",'" + SNMPObject.Username + "','" + SNMPObject.Password +
                           "'," + SNMPObject.ScanningInterval + "," + SNMPObject.OffHoursScanInterval + ",'" + SNMPObject.Enabled +
                           "','" + SNMPObject.IncludeOnDashBoard + "', '" + SNMPObject.Location + "','" + SNMPObject.ImageURL + "','" + SNMPObject.Name + "'," + SNMPObject.ResponseThreshold + "," + SNMPObject.RetryInterval + ",'" + SNMPObject.Address +
                           "'," + SNMPObject.LocationID + "," + SNMPObject.ServerTypeId + ",'" + SNMPObject.OID + "')";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#7
0
        public bool InsertData(MailServices MSObject)
        {
            bool Insert = false;

            try
            {
                DataTable MailServicesDataTable = new DataTable();
                string    SqlQuery = "select ID from servertypes where servertype='Mail'";
                MailServicesDataTable = objAdaptor.FetchData(SqlQuery);
                if (MailServicesDataTable.Rows.Count > 0)
                {
                    MSObject.ServerTypeId = int.Parse(MailServicesDataTable.Rows[0][0].ToString());
                }

                SqlQuery = "INSERT INTO MailServices (Address,Name,Description,Category,ScanInterval,OffHoursScanInterval" +
                           ",Enabled,ResponseThreshold,RetryInterval,Port,FailureThreshold,LocationId,ServerTypeId)" +
                           "VALUES('" + MSObject.Address + "','" + MSObject.Name +
                           "','" + MSObject.Description + "','" + MSObject.Category +
                           "'," + MSObject.ScanInterval + "," + MSObject.OffHoursScanInterval +
                           ",'" + MSObject.Enabled + "'," + MSObject.ResponseThreshold + "," + MSObject.RetryInterval +
                           "," + MSObject.Port + "," + MSObject.FailureThreshold + "," + MSObject.LocationId + "," + MSObject.ServerTypeId + ")";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#8
0
        /// <summary>
        /// Update data of ServerTaskSettings table
        /// </summary>
        /// <param name="objDominoServers">ServerTaskSettings object</param>
        /// <returns></returns>
        public Object UpdateData(ServerTaskSettings STSettingsObject)
        {
            Object Update;

            try
            {
                //string SqlQuery = "Update ServerTaskSettings SET Enabled= " + STSettingsObject.Enabled +
                //    ", RestartOffHours=" + STSettingsObject.RestartOffHours + ", SendLoadCommand=" +
                //    STSettingsObject.SendLoadCommand + ", SendExitCommand=" + STSettingsObject.SendExitCommand +
                //    ", SendRestartCommand=" + STSettingsObject.SendRestartCommand + " " +
                //                "Where MyID=" + STSettingsObject.MyID + " AND TaskID=" + STSettingsObject.TaskID;

                string SqlQuery = "Update ServerTaskSettings SET Enabled= '" + STSettingsObject.Enabled +
                                  "', IsMinTasksEnabled='" + STSettingsObject.IsMinTasksEnabled + "',SendMinTasksLoadCmd='" + STSettingsObject.SendMinTasksLoadCmd + "', MinNoOfTasks=" + STSettingsObject.MinNoOfTasks + ", RestartOffHours='" + STSettingsObject.RestartOffHours + "', SendLoadCommand='" +
                                  STSettingsObject.SendLoadCommand + "', SendExitCommand='" + STSettingsObject.SendExitCommand +
                                  "', SendRestartCommand='" + STSettingsObject.SendRestartCommand + "',TaskID=" + STSettingsObject.TaskID +
                                  " Where MyID=" + STSettingsObject.MyID;

                Update = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Update = false;
            }
            finally
            {
            }
            return(Update);
        }
示例#9
0
        public Object UpdateData(LyncServers ServerObject)
        {
            Object Update;

            try
            {
                DataTable dt = GetData(ServerObject.ServerID);
                if (dt.Rows.Count > 0)
                {
                    string SqlQuery = "UPDATE LyncServers SET Enabled='" + ServerObject.Enabled.ToString() +
                                      "',ScanInterval=" + ServerObject.ScanInterval + ",RetryInterval=" + ServerObject.RetryInterval +
                                      ",OffHoursScanInterval=" + ServerObject.OffHoursScanInterval + ",Category='" + ServerObject.Category +
                                      "',CPUThreshold=" + ServerObject.CPUThreshold + ",MemoryThreshold=" + ServerObject.MemoryThreshold +
                                      ",ResponseThreshold=" + ServerObject.ResponseThreshold +
                                      ",FailureThreshold=" + ServerObject.FailureThreshold + ",CredentialsId =" + ServerObject.CredentialsID +
                                      " where ServerId=" + ServerObject.ServerID + "";

                    Update = objAdaptor.ExecuteNonQuery(SqlQuery);
                }
                else
                {
                    Update = InsertData(ServerObject);
                }
            }
            catch
            {
                Update = false;
            }
            finally
            {
            }
            return(Update);
        }
示例#10
0
        //7/19/2016 NS added for VSPLUS-3097
        public Object DeleteCASData(string id, string serverid)
        {
            Object Update;

            try
            {
                string SqlQuery = "DELETE FROM [CASServerTests] WHERE [TestId]=" + id + " AND [ServerId]=" + serverid + " ";
                Update = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Update = false;
            }
            return(Update);
        }
示例#11
0
        public Object insertServertypes(ServerTypes StypeObject)
        {
            Object returnval;

            try
            {
                string s = "insert into ServerTypes(ServerType) values('" + StypeObject.ServerType + "')";
                returnval = objAdaptor.ExecuteNonQuery(s);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(returnval);
        }
示例#12
0
        public bool InsertSrvDatabaseSettingsData(DataTable dtDatabase, String ServerName)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "delete DAGQueueThresholds where DAGName='" + ServerName + "'";

                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);


                for (int i = 0; i < dtDatabase.Rows.Count; i++)
                {
                    string SqlQuery2 = "insert into DAGQueueThresholds(DAGName,ServerName,ServerTypeId,DatabaseName, ReplayQueueThreshold, CopyQueueThreshold) " +
                                       "values(@DAGName,@ServerName,(select ID from ServerTypes where ServerType='Database Availability Group'),@DatabaseName,@ReplayQueueThreshold,@CopyQueueThreshold)";
                    SqlCommand cmd = new SqlCommand(SqlQuery2);
                    cmd.Parameters.AddWithValue("@DAGName", (object)ServerName ?? DBNull.Value);
                    cmd.Parameters.AddWithValue("@ServerName", (object)dtDatabase.Rows[i]["ServerName"].ToString() ?? DBNull.Value);
                    cmd.Parameters.AddWithValue("@DatabaseName", (object)dtDatabase.Rows[i]["DatabaseName"].ToString() ?? DBNull.Value);
                    cmd.Parameters.AddWithValue("@ReplayQueueThreshold", (object)dtDatabase.Rows[i]["ReplayQueueThreshold"].ToString() ?? DBNull.Value);
                    cmd.Parameters.AddWithValue("@CopyQueueThreshold", (object)dtDatabase.Rows[i]["CopyQueueThreshold"].ToString() ?? DBNull.Value);
                    Insert = objAdaptor.ExecuteNonQuerywithcmd(cmd);
                    //Insert = objAdaptor.ExecuteNonQuery(SqlQuery2);
                }
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#13
0
        public Object Deletecell(WebsphereCell cell)
        {
            Object Delete;

            try
            {
                string SqlQuery = "delete from Servers where ServerName in (select ServerName from WebSphereServer where CellId=" + cell.CellID + ") and ServerTypeID=22;" +
                                  "delete from WebSphereServer where CellID=" + cell.CellID + ";" +
                                  "delete from WebSphereNode where CellID=" + cell.CellID + ";" +
                                  "delete from WebSphereCellStats where CellID=" + cell.CellID + ";" +
                                  "delete from WebSphereCell where CellID=" + cell.CellID + ";";


                //Delete = objAdaptor.ExecuteNonQuery(S);
                //string s1 = "Delete from AlertDeviceTypes where AlertKey=" + Alert.AlertKey;
                //Delete = objAdaptor.ExecuteNonQuery(s1);
                //string s2 = "Delete from AlertEvents where AlertKey=" + Alert.AlertKey;
                //Delete = objAdaptor.ExecuteNonQuery(s2);
                //string s3 = "Delete from AlertLocations where AlertKey=" + Alert.AlertKey;
                //Delete = objAdaptor.ExecuteNonQuery(s3);
                //string s4 = "Delete from AlertServers where AlertKey=" + Alert.AlertKey;
                //Delete = objAdaptor.ExecuteNonQuery(s4);
                //string SqlQuery = "Delete from AlertNames where AlertKey=" + Alert.AlertKey;
                Delete = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Delete = false;
            }
            finally
            {
            }

            return(Delete);
        }
示例#14
0
        public Object deletefromgrid(BlackBerryServers BlackBerryServerObject)
        {
            Object BlackBerryServer;

            try
            {
                string st        = "delete from BlackBerryServers where [key]=" + BlackBerryServerObject.key + "";
                string delServer = "delete from servers where ID=" + BlackBerryServerObject.key;
                BlackBerryServer = objAdaptor.ExecuteNonQuery(delServer);
                BlackBerryServer = objAdaptor.ExecuteNonQuery(st);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(BlackBerryServer);
        }
示例#15
0
        /// <summary>
        /// Insert data into Locations table
        /// </summary>
        /// <param name="DSObject">Locations object</param>
        /// <returns></returns>

        public bool InsertData(Menus objMenu)
        {
            bool Insert = false;

            try
            {
                string    ParentID = "";
                DataTable dt       = VSWebDAL.SecurityDAL.MenusDAL.Ins.GetParentMenuId(objMenu);
                if (dt.Rows.Count == 0)
                {
                    ParentID = "NULL";
                }
                else
                {
                    ParentID = dt.Rows[0]["ID"].ToString();
                }
                string SqlQuery = "INSERT INTO [MenuItems] ([DisplayText],[OrderNum],[ParentID],[PageLink],[Level],[RefName],[ImageURL],[MenuArea]) " +
                                  "VALUES('" + objMenu.DisplayText + "', " + objMenu.OrderNum + "," + ParentID + ",'" + objMenu.PageLink +
                                  "'," + objMenu.Level + ",'" + objMenu.RefName + "','" + objMenu.ImageURL + "','" + objMenu.MenuArea + "')";

                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#16
0
        public bool InsertData(ScheduledReports SRObject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO [ScheduledReports] (ReportID,Frequency,Days,SpecificDay,SendTo,CopyTo,BlindCopyTo,Title,Body,FileFormat) " +
                                  "VALUES(" + SRObject.ReportID + ",'" + SRObject.Frequency + "','" + SRObject.Days + "'," + SRObject.SpecificDay + "," +
                                  "'" + SRObject.SendTo + "','" + SRObject.CopyTo + "','" + SRObject.BlindCopyTo + "','" + SRObject.Title +
                                  "','" + SRObject.Body + "','" + SRObject.FileFormat + "')";
                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            return(Insert);
        }
示例#17
0
        /// <summary>
        /// Insert data into UserProfileMaster table
        /// </summary>
        /// <param name="DSObject">UserProfileMaster object</param>
        /// <returns></returns>

        public bool InsertData(UserProfileMaster LOCbject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO UserProfileMaster(Name) VALUES('" + LOCbject.Name + "')";
                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#18
0
        public bool InsertData(Status StatusObj)
        {
            bool Insert = false;

            try
            {
                //string SqlQuery = "Insert Into Status(Type,Location,Category,Name,Status,Details,LastUpdate,Description" +
                // ",PendingMail,DeadMail,MailDetails,Upcount,DownCount,UpPercent,ResponseTime,ResponseThreshold,PendingThreshold" +
                //  ",DeadThreshold,UserCount,MyPercent,"+"(StatusObj.NextScan == Convert.ToDateTime("1/1/0001 12:00:00 AM") ? "" : "NextScan")"+",DominoServerTasks,TypeANDName,Icon,OperatingSystem,DominoVersion" +
                // ",UpMinutes,DownMinutes,UpPercentMinutes,PercentageChange,CPU,HeldMail,HeldMailThreshold,Severity,Memory)" +
                // "Values('"+StatusObj.Type+"','"+StatusObj.Location+"','"+StatusObj.Category+"','"+StatusObj.Name+"','"+StatusObj.sStatus+
                // "','"+StatusObj.Details+"','"+StatusObj.LastUpdate+"','"+StatusObj.Description+"','"+StatusObj.PendingMail+
                // "','"+StatusObj.DeadMail+"','"+StatusObj.MailDetails+"',"+StatusObj.Upcount+","+StatusObj.DownCount+","+StatusObj.UpPercent+
                // ","+StatusObj.ResponseTime+","+StatusObj.ResponseThreshold+","+StatusObj.PendingThreshold+","+StatusObj.DeadThreshold+
                //  ","+StatusObj.UserCount+","+StatusObj.MyPercent+",(StatusObj.NextScan == Convert.ToDateTime("1/1/0001 12:00:00 AM") ? "" : "'" + StatusObj.NextScan + "',"),'"+StatusObj.DominoServerTasks+
                // "','"+StatusObj.TypeANDName+"',"+StatusObj.Icon+",'"+StatusObj.OperatingSystem+"','"+StatusObj.DominoVersion+
                // "',"+StatusObj.UpMinutes+","+StatusObj.DownMinutes+","+StatusObj.UpPercentMinutes+","+StatusObj.PercentageChange+
                // ","+StatusObj.CPU+","+StatusObj.HeldMail+","+StatusObj.HeldMailThreshold+","+StatusObj.Severity+","+StatusObj.Memory+")";

                string SqlQuery = "Insert Into Status(Type,Location,Category,Name,Status,Details,LastUpdate,Description" +
                                  ",PendingMail,DeadMail,MailDetails,Upcount,DownCount,UpPercent,ResponseTime,ResponseThreshold,PendingThreshold" +
                                  ",DeadThreshold,UserCount,MyPercent," +
                                  (StatusObj.NextScan == Convert.ToDateTime("1/1/0001 12:00:00 AM") ? "" : "NextScan,") +
                                  "DominoServerTasks,TypeANDName,Icon,OperatingSystem,DominoVersion" +
                                  ",UpMinutes,DownMinutes,UpPercentMinutes,PercentageChange,CPU,HeldMail,HeldMailThreshold,Severity,Memory,StatusCode)" +
                                  "Values('" + StatusObj.Type + "','" + StatusObj.Location + "','" + StatusObj.Category + "','" + StatusObj.Name + "','" + StatusObj.sStatus +
                                  "','" + StatusObj.Details + "','" + StatusObj.LastUpdate + "','" + StatusObj.Description + "','" + StatusObj.PendingMail +
                                  "','" + StatusObj.DeadMail + "','" + StatusObj.MailDetails + "'," + StatusObj.Upcount + "," + StatusObj.DownCount + "," + StatusObj.UpPercent +
                                  "," + StatusObj.ResponseTime + "," + StatusObj.ResponseThreshold + "," + StatusObj.PendingThreshold + "," + StatusObj.DeadThreshold +
                                  "," + StatusObj.UserCount + "," + StatusObj.MyPercent + "," +
                                  (StatusObj.NextScan == Convert.ToDateTime("1/1/0001 12:00:00 AM") ? "" : "'" + StatusObj.NextScan + "',") +
                                  "'" + StatusObj.DominoServerTasks + "','" + StatusObj.TypeANDName + "'," + StatusObj.Icon + ",'" + StatusObj.OperatingSystem + "','" + StatusObj.DominoVersion +
                                  "'," + StatusObj.UpMinutes + "," + StatusObj.DownMinutes + "," + StatusObj.UpPercentMinutes + "," + StatusObj.PercentageChange +
                                  "," + StatusObj.CPU + "," + StatusObj.HeldMail + "," + StatusObj.HeldMailThreshold + "," + StatusObj.Severity + "," + StatusObj.Memory + ",'" + StatusObj.sStatus + "')";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            return(Insert);
        }
示例#19
0
        public Object UpdateIsFirstTimeLogin(int UserID)
        {
            Object Update;

            try
            {
                string Query = "Update Users set IsFirstTimeLogin='******' WHERE ID =" + UserID;
                Update = objAdaptor.ExecuteNonQuery(Query);
            }
            catch
            {
                Update = false;
            }
            return(Update);
        }
示例#20
0
        public bool InsertData(FeedBack FeedObj)

        {
            bool Insert = false;

            try
            {
                string SqlQuery = "Insert Into Feedback(Subject,Type,Message,Status,Attachments)" +

                                  " Values('" + FeedObj.Subject + "','" + FeedObj.Type + "','" + FeedObj.Message + "','" + FeedObj.Status + "','" + FeedObj.Attachments + "')";

                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            return(Insert);
        }
示例#21
0
        public Object DeleteData(PowershellScripts pwrObject)
        {
            Object Update;

            try
            {
                string SqlQuery = "Delete PowershellScripts Where ScriptName='" + pwrObject.ScriptName + "'";

                Update = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Update = false;
            }
            finally
            {
            }
            return(Update);
        }
示例#22
0
        public Object InsertBlackBerry(BlackBerry BlackBerryObject)
        {
            Object returnval;

            try
            {
                //string st = "Insert into BlackBerry(Enabled,Name,Category,ScanInterval,OffHoursScanInterval,RetryInterval,DestinationServer,DestinationDatabase,InternetMailAddress,ConfirmationServer,ConfirmationDatabase,NotesMailAddress,SourceServer) values" +
                //   "('" + BlackBerryObject.Enabled + "','" + BlackBerryObject.Name + "','" + BlackBerryObject.Category + "'," + BlackBerryObject.ScanInterval + "," + BlackBerryObject.OffHoursScanInterval + "," + BlackBerryObject.RetryInterval + ",'" + BlackBerryObject.DestinationServer + "','" + BlackBerryObject.DestinationDatabase + "','" + BlackBerryObject.InternetMailAddress + "','" + BlackBerryObject.ConfirmationServer + "','" + BlackBerryObject.ConfirmationDatabase + "','" + BlackBerryObject.NotesMailAddress + "','"+BlackBerryObject.SourceServer+"')";
                // returnval = objAdaptor.ExecuteNonQuery(st);

                string st = "Insert into BlackBerry(Enabled,Name,Category,ScanInterval,OffHoursScanInterval,RetryInterval,DestinationServerID,DestinationDatabase,InternetMailAddress,ConfirmationServerID,ConfirmationDatabase,NotesMailAddress,SourceServer) values" +
                            "('" + BlackBerryObject.Enabled + "','" + BlackBerryObject.Name + "','" + BlackBerryObject.Category + "'," + BlackBerryObject.ScanInterval + "," + BlackBerryObject.OffHoursScanInterval + "," + BlackBerryObject.RetryInterval + ",'" + BlackBerryObject.DestinationServerID + "','" + BlackBerryObject.DestinationDatabase + "','" + BlackBerryObject.InternetMailAddress + "','" + BlackBerryObject.ConfirmationServerID + "','" + BlackBerryObject.ConfirmationDatabase + "','" + BlackBerryObject.NotesMailAddress + "','" + BlackBerryObject.SourceServer + "')";
                returnval = objAdaptor.ExecuteNonQuery(st);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(returnval);
        }
示例#23
0
        /// <summary>
        /// Insert data into MaintenanceWindows table
        /// </summary>
        /// <param name="DSObject">MaintenanceWindows object</param>
        /// <returns></returns>
        public bool InsertData(MaintenanceWindows MWObject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO MaintenanceWindows( DeviceType, Name, MaintWindow ) " +
                                  "VALUES ('" + MWObject.DeviceType + "', '" + MWObject.Name + "', '" + MWObject.MaintWindow + "')";

                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#24
0
        /// <summary>
        /// Insert data into LogFile table
        /// </summary>
        /// <param name="DSObject">LogFile object</param>
        /// <returns></returns>

        public bool InsertData(LogFile LOgobject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO [LogFile] (Keyword,RepeatOnce,Log,AgentLog,NotRequiredKeyword) VALUES('" + LOgobject.Keyword + "','" + LOgobject.RepeatOnce + "','" + LOgobject.Log + "','" + LOgobject.AgentLog + "','" + LOgobject.NotRequiredKeyword + "')";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#25
0
        /// <summary>
        /// Insert data into DominoCustomStatValues table
        /// </summary>
        /// <param name="DCSObject">DominoCustomStatValues object</param>
        /// <returns></returns>
        public bool InsertData(DominoCustomStatValues DCSObject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO DominoCustomStatValues(ServerName,StatName,ThresholdValue,GreaterThanORLessThan,TimesInARow,ConsoleCommand)" +
                                  " VALUES ('" + DCSObject.ServerName + "','" + DCSObject.StatName + "'," + DCSObject.ThresholdValue + ",'" + DCSObject.GreaterThanORLessThan +
                                  "'," + DCSObject.TimesInARow + ",'" + DCSObject.ConsoleCommand + "')";

                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#26
0
        public Object UpdateData(WebSpherePropertie WebSphereobj)
        {
            Object Update;

            try
            {
                DataTable dt = GetData(WebSphereobj.ServerID);
                if (dt.Rows.Count > 0)
                {
                    string SqlQuery = "UPDATE WebsphereServer SET NodeID=" + WebSphereobj.NodeID + ",CellID =" + WebSphereobj.CellID + ", AvgThreadPool='" + WebSphereobj.AvgThreadPool +
                                      "',ActiveThreadCount=" + WebSphereobj.ActiveThreadCount + ",CurrentHeap=" + WebSphereobj.CurrentHeap +
                                      ",MaxHeap=" + WebSphereobj.MaxHeap + ",Uptime='" + WebSphereobj.Uptime +
                                      "',HungThreadCount=" + WebSphereobj.HungThreadCount +
                                      ",DumpGenerated =" + WebSphereobj.DumpGenerated +
                                      " where ServerId=" + WebSphereobj.ServerID + "";

                    Update = objAdaptor.ExecuteNonQuery(SqlQuery);
                }
                else
                {
                    Update = InsertData(WebSphereobj);
                }
            }
            catch
            {
                Update = false;
            }
            finally
            {
            }
            return(Update);
        }
示例#27
0
        public bool InsertData(string DeviceId, int duration)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO MobileUserThreshold (DeviceId,SyncTimeThreshold)" +
                                  " VALUES('" + DeviceId + "'," + duration.ToString() + ")";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }

            return(Insert);
        }
示例#28
0
        /// <summary>
        /// Insert data into DominoCluster table
        /// </summary>
        /// <param name="DSObject">DominoServers object</param>
        /// <returns></returns>

        public bool InsertData(NetworkLatency NLObject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO NetworkLatency ([TestName] ,[ScanInterval],[TestDuration],Enable) " +
                                  "VALUES('" + NLObject.TestName + "'," + NLObject.ScanInterval +
                                  "," + NLObject.TestDuration + ",'" + NLObject.Enable + "')";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }
示例#29
0
        public Object UpdateTravelerDataStoreData(TravelerDS TravelerObject)
        {
            Object Update;
            string port = "";

            try
            {
                port = TravelerObject.Port;
                if (port == "")
                {
                    port = "NULL";
                }
                //7/18/2014 NS modified for VSPLUS-806

                /*
                 * string SqlQuery = "UPDATE Traveler_HA_Datastore SET TravelerServicePoolName='" + TravelerObject.TravelerPoolName + "', " +
                 *  "ServerName='" + TravelerObject.ServerName + "', DataStore='" + TravelerObject.DataStore + "', " +
                 *  "Port=" + port + ", UserName='******', " +
                 *  "Password='******', IntegratedSecurity='" + TravelerObject.IntegratedSecurity + "', " +
                 *  "TestScanServer='" + TravelerObject.TestScan + "', UsedbyServers='" + TravelerObject.UsedByServers + "' " +
                 *  "WHERE ID=" + TravelerObject.ID.ToString();
                 */
                string SqlQuery = "UPDATE Traveler_HA_Datastore SET TravelerServicePoolName='" + TravelerObject.TravelerPoolName + "', " +
                                  "ServerName='" + TravelerObject.ServerName + "', DataStore='" + TravelerObject.DataStore + "', " +
                                  "Port=" + port + ", UserName='******', " +
                                  "Password='******', IntegratedSecurity='" + TravelerObject.IntegratedSecurity + "', " +
                                  "TestScanServer='" + TravelerObject.TestScan + "', UsedbyServers='" + TravelerObject.UsedByServers + "', " +
                                  "DatabaseName='" + TravelerObject.DatabaseName + "' " +
                                  "WHERE ID=" + TravelerObject.ID.ToString();
                Update = objAdaptorCfg.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Update = false;
            }
            return(Update);
        }
示例#30
0
        /// <summary>
        /// Insert data into DominoServerTasks table
        /// </summary>
        /// <param name="DSTObject">DominoServerTasks object</param>
        /// <returns></returns>
        public bool InsertData(DominoServerTasks DSTObject)
        {
            bool Insert = false;

            try
            {
                string SqlQuery = "INSERT INTO DominoServerTasks (TaskName,ConsoleString,RetryCount,FreezeDetect," +
                                  " MaxBusyTime,IdleString,LoadString)VALUES('" + DSTObject.TaskName +
                                  "','" + DSTObject.ConsoleString + "'," + DSTObject.RetryCount + ",'" + DSTObject.FreezeDetect +
                                  "'," + DSTObject.MaxBusyTime + ",'" + DSTObject.IdleString +
                                  "','" + DSTObject.LoadString + "')";


                Insert = objAdaptor.ExecuteNonQuery(SqlQuery);
            }
            catch
            {
                Insert = false;
            }
            finally
            {
            }
            return(Insert);
        }