예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MonitorBackupServer"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateMonitorBackupServer(MonitorBackupServer MonitorBackupServer, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = @"UPDATE monitorBackupServer
                               SET backupServerGroupID = ?
                                  ,updater = ?
                                  ,updateDate = ? 
                             WHERE monitorServerID=@monitorServerID";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@backupServerGroupID", MonitorBackupServer.backupServerGroupId),
                new OdbcParameter("@updater", MonitorBackupServer.updater),
                new OdbcParameter("@updateDate", MonitorBackupServer.updateDate),
                new OdbcParameter("@monitorServerID", MonitorBackupServer.monitorServerId)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="BackupServer"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateManualBackupServer(ManualBackupServer ManualBackupServer, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE manualBackupServer SET "
                            + " DBServerIP = ?,"
                            + " serverIP = ?,"
                            + " account =?,"
                            + " password =?,"
                            + " startFile =?,"
                            + " drive =?,"
                            + " updater =?,"
                            + " updateDate =?"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@DBServerIP", ManualBackupServer.DBServerIP),
                new OdbcParameter("@backupServerIP", ManualBackupServer.serverIP),
                new OdbcParameter("@account", ManualBackupServer.account),
                new OdbcParameter("@password", ManualBackupServer.password),
                new OdbcParameter("@startFile", ManualBackupServer.startFile),
                new OdbcParameter("@drive", ManualBackupServer.drive),
                new OdbcParameter("@updater", ManualBackupServer.updater),
                new OdbcParameter("@updateDate", ManualBackupServer.updateDate),
                new OdbcParameter("@id", ManualBackupServer.id)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="BackupServerGroup"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateBackupServerGroup(BackupServerGroup BackupServerGroup, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE backupServerGroup SET backupServerGroupName = ?,"
                            + " monitorServerID = ?,"
                            + " memo = ?,"
                            + " updater = ?,"
                            + " updateDate = ?,"
                            + " synchronismFlg = 0"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@backupServerGroupName", BackupServerGroup.backupServerGroupName),
                new OdbcParameter("@monitorServerID", BackupServerGroup.monitorServerID),
                new OdbcParameter("@memo", BackupServerGroup.memo),
                new OdbcParameter("@updater", BackupServerGroup.updater),
                new OdbcParameter("@updateDate", BackupServerGroup.updateDate),
                new OdbcParameter("@id", BackupServerGroup.id)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #4
0
파일: UserInfoD.cs 프로젝트: hst-bridge/BBS
        /// <summary>
        ///
        /// </summary>
        /// <param name="UserInfo"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateUserInfo(UserInfo UserInfo, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE userInfo SET loginID = ?,"
                            + " password = ?,"
                            + " name = ?, "
                            + " mail = ?,"
                            + " mailFlg = ?,"
                            + " authorityFlg = ?,"
                            + " updater = ?,"
                            + " updateDate = ?"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@loginID", UserInfo.loginID),
                new OdbcParameter("@password", UserInfo.password),
                new OdbcParameter("@name", UserInfo.name),
                new OdbcParameter("@mail", UserInfo.mail),
                new OdbcParameter("@mailFlg", UserInfo.mailFlg),
                new OdbcParameter("@authorityFlg", UserInfo.authorityFlg),
                new OdbcParameter("@updater", UserInfo.updater),
                new OdbcParameter("@updateDate", UserInfo.updateDate),
                new OdbcParameter("@id", UserInfo.id)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="BackupServerGroupDetail"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateBackupServerGroupDetail(BackupServerGroupDetail BackupServerGroupDetail, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = @"UPDATE backupServerGroupDetail
                               SET backupServerGroupID = ?
                                  ,backupServerID = ?                                  
                                  ,updater = ?
                                  ,updateDate = ?
                             WHERE id=?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@backupServerGroupID", BackupServerGroupDetail.backupServerGroupId),
                new OdbcParameter("@backupServerID", BackupServerGroupDetail.backupServerId),
                new OdbcParameter("@updater", BackupServerGroupDetail.updater),
                new OdbcParameter("@updateDate", BackupServerGroupDetail.updateDate),
                new OdbcParameter("@id", BackupServerGroupDetail.id)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="BackupServerFile"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateBackupServerFile(BackupServerFile BackupServerFile, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE backupServerFile SET backupServerGroupID = ?,"
                            + " backupServerID = ?,"
                            + " backupServerFileName = ?, "
                            + " backupServerFilePath = ?,"
                            + " backupServerFileType = ?,"
                            + " backupServerFileSize = ?,"
                            + " backupStartTime = ?,"
                            + " backupEndTime = ?,"
                            + " backupTime = ?,"
                            + " backupFlg = ?,"
                            + " copyStartTime = ?,"
                            + " copyEndTime = ?,"
                            + " copyTime = ?,"
                            + " copyFlg = ?,"
                            + " updater = ?,"
                            + " updateDate = ?"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@backupServerGroupID", BackupServerFile.backupServerGroupID),
                new OdbcParameter("@backupServerID", BackupServerFile.backupServerID),
                new OdbcParameter("@backupServerFileName", BackupServerFile.backupServerFileName),
                new OdbcParameter("@backupServerFilePath", BackupServerFile.backupServerFilePath),
                new OdbcParameter("@backupServerFileType", BackupServerFile.backupServerFileType),
                new OdbcParameter("@backupServerFileSize", BackupServerFile.backupServerFileSize),
                new OdbcParameter("@backupStartTime", BackupServerFile.backupStartTime),
                new OdbcParameter("@backupEndTime", BackupServerFile.backupEndTime),
                new OdbcParameter("@backupTime", BackupServerFile.backupTime),
                new OdbcParameter("@backupFlg", BackupServerFile.backupFlg),
                new OdbcParameter("@copyStartTime", BackupServerFile.copyStartTime),
                new OdbcParameter("@copyEndTime", BackupServerFile.copyEndTime),
                new OdbcParameter("@copyTime", BackupServerFile.copyTime),
                new OdbcParameter("@copyFlg", BackupServerFile.copyFlg),
                new OdbcParameter("@updater", BackupServerFile.updater),
                new OdbcParameter("@updateDate", BackupServerFile.updateDate),
                new OdbcParameter("@id", BackupServerFile.id)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MonitorServer"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateMonitorFileListen(MonitorServer MonitorServer, MonitorServer MonitorServerForOld, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE monitorFileListen SET monitorServerIP = ?,"
                            + " sharePoint = ?,"
                            + " monitorLocalPath = ?,"
                            + " updater = ?,"
                            + " updateDate = ?,"
                            + " synchronismFlg = 0"
                            + " WHERE monitorServerIP = ? and sharePoint = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@monitorServerIP", MonitorServer.monitorServerIP),
                new OdbcParameter("@sharePoint", MonitorServer.startFile),
                new OdbcParameter("@monitorLocalPath", MonitorServer.monitorLocalPath),
                new OdbcParameter("@updater", MonitorServer.updater),
                new OdbcParameter("@updateDate", MonitorServer.updateDate),
                new OdbcParameter("@monitorServerIP2", MonitorServerForOld.monitorServerIP),
                new OdbcParameter("@sharePoint2", MonitorServerForOld.startFile),
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MonitorServer"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateMonitorServer(MonitorServer MonitorServer, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE monitorServer SET monitorServerName = ?,"
                            + " monitorServerIP = ?,"
                            + " monitorSystem = ?,"
                            + " memo = ?, "
                            + " account = ?,"
                            + " password = ?,"
                            + " startFile = ?,"
                            + " monitorDrive = ?,"
                            + " monitorDriveP = ?,"
                            + " monitorMacPath = ?,"
                            + " monitorLocalPath = ?,"
                            + " copyInit = ?,"
                            + " updater = ?,"
                            + " updateDate = ?,"
                            + " synchronismFlg = 0"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@monitorServerName", MonitorServer.monitorServerName),
                new OdbcParameter("@monitorServerIP", MonitorServer.monitorServerIP),
                new OdbcParameter("@monitorSystem", MonitorServer.monitorSystem),
                new OdbcParameter("@memo", MonitorServer.memo),
                new OdbcParameter("@account", MonitorServer.account),
                new OdbcParameter("@password", MonitorServer.password),
                new OdbcParameter("@startFile", MonitorServer.startFile),
                new OdbcParameter("@monitorDrive", MonitorServer.monitorDrive),
                new OdbcParameter("@monitorDriveP", MonitorServer.monitorDriveP),
                new OdbcParameter("@monitorMacPath", MonitorServer.monitorMacPath),
                new OdbcParameter("@monitorLocalPath", MonitorServer.monitorLocalPath),
                new OdbcParameter("@copyInit", MonitorServer.copyInit),
                new OdbcParameter("@updater", MonitorServer.updater),
                new OdbcParameter("@updateDate", MonitorServer.updateDate),
                new OdbcParameter("@id", MonitorServer.id)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="FileTypeSet"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateFileTypeSet(FileTypeSet FileTypeSet, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE fileTypeSet SET monitorServerFolderName = ?,"
                            + " monitorServerID = ?,"
                            + " exceptAttribute1 = ?,"
                            + " exceptAttribute2 = ?,"
                            + " exceptAttribute3 = ?,"
                            + " exceptAttributeFlg1 = ?,"
                            + " exceptAttributeFlg2 = ?,"
                            + " exceptAttributeFlg3 = ?,"
                            + " systemFileFlg = ?,"
                            + " hiddenFileFlg = ?,"
                            //+ " creater = ?,"
                            //+ " createDate = ?,"
                            + " updater = ?,"
                            + " updateDate = ?"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@monitorServerFolderName", FileTypeSet.monitorServerFolderName),
                new OdbcParameter("@monitorServerID", FileTypeSet.monitorServerID),
                new OdbcParameter("@exceptAttribute1", FileTypeSet.exceptAttribute1),
                new OdbcParameter("@exceptAttribute2", FileTypeSet.exceptAttribute2),
                new OdbcParameter("@exceptAttribute3", FileTypeSet.exceptAttribute3),
                new OdbcParameter("@exceptAttributeFlg1", FileTypeSet.exceptAttributeFlg1),
                new OdbcParameter("@exceptAttributeFlg2", FileTypeSet.exceptAttributeFlg2),
                new OdbcParameter("@exceptAttributeFlg3", FileTypeSet.exceptAttributeFlg3),
                new OdbcParameter("@systemFileFlg", FileTypeSet.systemFileFlg),
                new OdbcParameter("@hiddenFileFlg", FileTypeSet.hiddenFileFlg),
                //new OdbcParameter("@creater",FileTypeSet.creater),
                //new OdbcParameter("@createDate",FileTypeSet.createDate),
                new OdbcParameter("@updater", FileTypeSet.updater),
                new OdbcParameter("@updateDate", FileTypeSet.updateDate),
                new OdbcParameter("@id", FileTypeSet.id)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #10
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MonitorServerFileId"></param>
        /// <param name="transferFlg"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateTransferFlg(string MonitorServerFileId, int transferFlg, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE monitorServerFile SET transferFlg = ?,updater = 'exe',"
                            + "updateDate = ?"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@transferFlg", transferFlg),
                new OdbcParameter("@updateDate", DateTime.Now),
                new OdbcParameter("@id", MonitorServerFileId)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #11
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MonitorServerFolderId"></param>
        /// <param name="loginID"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int DeleteMonitorServerFolderById(int MonitorServerFolderId, string loginID, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE monitorServerFolder SET deleteFlg = 1,"
                            + "deleter = ?,"
                            + "deleteDate = ?"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@deleter", loginID),
                new OdbcParameter("@deleteDate", DateTime.Now),
                new OdbcParameter("@id", MonitorServerFolderId)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #12
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="BackupServer"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateBackupServer(BackupServer BackupServer, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE backupServer SET backupServerName = ?,"
                            + " backupServerIP = ?,"
                            + " memo = ?, "
                            + " account =?,"
                            + " password =?,"
                            + " startFile =?,"
                            + " ssbpath =?,"
                            + " updater =?,"
                            + " updateDate =?,"
                            + " synchronismFlg = 0"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@backupServerName", BackupServer.backupServerName),
                new OdbcParameter("@backupServerIP", BackupServer.backupServerIP),
                new OdbcParameter("@memo", BackupServer.memo),
                new OdbcParameter("@account", BackupServer.account),
                new OdbcParameter("@password", BackupServer.password),
                new OdbcParameter("@startFile", BackupServer.startFile),
                new OdbcParameter("@ssbpath", BackupServer.ssbpath),
                new OdbcParameter("@updater", BackupServer.updater),
                new OdbcParameter("@updateDate", BackupServer.updateDate),
                new OdbcParameter("@id", BackupServer.id)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }
예제 #13
0
파일: LogD.cs 프로젝트: hst-bridge/BBS
        /// <summary>
        ///
        /// </summary>
        /// <param name="LogId"></param>
        /// <param name="loginID"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int DeleteLogById(int LogId, string loginID, OdbcConnection conn)
        {
            int    result = -1;
            string sql    = "UPDATE log SET deleteFlg = 1,"
                            + "deleter = ?,"
                            + "deleteDate = ?"
                            + " WHERE id = ?";

            OdbcParameter[] para = new OdbcParameter[] {
                new OdbcParameter("@deleter", loginID),
                new OdbcParameter("@deleteDate", DateTime.Now),
                new OdbcParameter("@id", LogId)
            };
            try
            {
                result = db.Udaquery(sql, conn, para);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(result);
        }