/// <summary> /// 転送対象の失敗の場合、レコードの抽出 /// </summary> /// <returns></returns> public IList <MonitorServerFile> GetTransferNGFileList(string monitorServerID) { OdbcConnection conn; IList <MonitorServerFile> MonitorServerFile; SearchCondition[] condition = new SearchCondition[] { new SearchCondition { con = "deleteFlg= ? ", param = "@deleteFlg", value = "0" }, new SearchCondition { con = "monitorServerID= ? ", param = "@monitorServerID", value = monitorServerID }, new SearchCondition { con = "transferFlg=?", param = "@transferFlg", value = "2" }, new SearchCondition { con = "id IN (SELECT max(id) AS id FROM monitorServerFile GROUP BY monitorFilePath) ", param = "", value = "" } }; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); MonitorServerFile = MonitorServerFileDal.GetMonitorServerFile(condition, conn); conn.Close(); return(MonitorServerFile); } }
/// <summary> /// Get BackupServer List By Name But This Id /// </summary> /// 2014-06-24 wjd add /// <param name="id"></param> /// <param name="bkName"></param> /// <returns></returns> public IList <BackupServer> GetBackupServerListByNameButId(int id, string bkName) { OdbcConnection conn; IList <BackupServer> BackupServer; SearchCondition[] condition = new SearchCondition[] { new SearchCondition { con = "id!=?", param = "@id", value = id.ToString() }, new SearchCondition { con = "deleteFlg=?", param = "@deleteFlg", value = "0" }, new SearchCondition { con = "backupServerName=?", param = "@backupServerName", value = bkName } }; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); BackupServer = BackupServerDal.GetBackupServer(condition, conn); conn.Close(); return(BackupServer); } }
public IList <MonitorFileListen> GetMonitorFileListenList(string fileName, int monitorServerId) { OdbcConnection conn; IList <MonitorFileListen> MonitorFileListen; string where = "deleteFlg = 0"; if (fileName != "") { where += " AND monitorfileName like '%" + fileName + "%'"; } if (monitorServerId != -1) { where += " AND monitorServerID = " + monitorServerId; } using (conn = OdbcHelper.CreateConntion()) { conn.Open(); MonitorFileListen = MonitorFileListenDal.GetPartMonitorFileListenList(where, conn); conn.Close(); return(MonitorFileListen); } }
/// <summary> /// Get Log For Winform /// </summary> /// 2014-06-03 wjd modified /// <param name="pindex"></param> /// <param name="pagesize"></param> /// <param name="groupId"></param> /// <param name="dtStart"></param> /// <param name="dtEnd"></param> /// <param name="tmStart"></param> /// <param name="tmEnd"></param> /// <param name="displayFlg"></param> /// <param name="tranferLfg"></param> /// <param name="stateFlg"></param> /// <param name="logFlg"></param> /// <param name="name"></param> /// <returns></returns> public IList <Log> GetLogListByProc(int pindex, int pagesize, string groupId, DateTime dtStart, DateTime dtEnd, string tmStart, string tmEnd, int displayFlg, int tranferLfg, int stateFlg, int logFlg, string name) { IList <Log> LogList; OdbcParameter[] parameters = { new OdbcParameter("@groupId", groupId), new OdbcParameter("@StartDate", dtStart.ToString("yyyy-MM-dd")), new OdbcParameter("@EndDate", dtEnd.ToString("yyyy-MM-dd")), new OdbcParameter("@StartTime", tmStart), new OdbcParameter("@EndTime", tmEnd), new OdbcParameter("@TranferFlg", tranferLfg), new OdbcParameter("@StateFlg", stateFlg), new OdbcParameter("@LogFlg", logFlg), new OdbcParameter("@backupServerFileName", name), new OdbcParameter("@Pindex", pindex), new OdbcParameter("@Psize", pagesize) }; OdbcConnection conn; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); LogList = LogDal.GetLogListByProc(conn, parameters, "{call sp_GetTransferList2(?,?,?,?,?,?,?,?,?,?,?)}"); conn.Close(); return(LogList); } }
public IList <MonitorFileListen> GetMonitorFileListenList(string fileName, string updateTime) { OdbcConnection conn; IList <MonitorFileListen> MonitorFileListen; //SearchCondition[] condition = new SearchCondition[] { new SearchCondition { con = "deleteFlg=?", param = "@deleteFlg", value = "0" }, //new SearchCondition { con = "monitorFileName like '%?%'", param = "@monitorFileName", value = fileName }, //new SearchCondition { con = "Convert(varchar,updateDate,120) like '%?%'", param = "@updateDate", value = updateTime }}; string where = "deleteFlg = 0"; if (fileName != "") { where += " AND monitorfileName like '" + fileName + "%'"; } if (updateTime != "") { where += " AND Convert(varchar,updateDate,120) like '" + updateTime + "%'"; } using (conn = OdbcHelper.CreateConntion()) { conn.Open(); //MonitorFileListen = MonitorFileListenDal.GetPartMonitorFileListenList(condition, conn); MonitorFileListen = MonitorFileListenDal.GetPartMonitorFileListenList(where, conn); conn.Close(); return(MonitorFileListen); } }
/// <summary> /// Get Deleted BackupServer List By IP And StartFolder /// </summary> /// 2014-06-30 wjd add /// <param name="bkIP"></param> /// <param name="startFolder"></param> /// <returns></returns> public IList <BackupServer> GetDeletedBackupServerList(string bkIP, string startFolder) { OdbcConnection conn; IList <BackupServer> BackupServer; SearchCondition[] condition = new SearchCondition[] { new SearchCondition { con = "backupServerIP=?", param = "@backupServerIP", value = bkIP }, new SearchCondition { con = "startFile=?", param = "@startFile", value = startFolder }, new SearchCondition { con = "deleteFlg=?", param = "@deleteFlg", value = "1" } }; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); BackupServer = BackupServerDal.GetBackupServer(condition, conn); conn.Close(); return(BackupServer); } }
public IList <Log> GetLogListByProc(int pindex, int pagesize, string groupId, string dtStart, string dtEnd, string tmStart, string tmEnd, int displayFlg, int tranferLfg, int stateFlg, int logFlg, string name) { IList <Log> LogList; OdbcParameter[] parameters = { //new OdbcParameter("@DBServerIP", DBServerIP), new OdbcParameter("@groupId", groupId), new OdbcParameter("@StartDate", dtStart), new OdbcParameter("@EndDate", dtEnd), new OdbcParameter("@StartTime", tmStart), new OdbcParameter("@EndTime", tmEnd), new OdbcParameter("@TranferFlg", tranferLfg), new OdbcParameter("@StateFlg", stateFlg), new OdbcParameter("@LogFlg", logFlg), new OdbcParameter("@backupServerFileName", name), new OdbcParameter("@Pindex", pindex), new OdbcParameter("@Psize", pagesize) }; OdbcConnection conn; //2014-06-03 wjd modified using (conn = OdbcHelper.CreateConntion()) //xiecongwen 20141217 改为访问各自数据库 98部分弃用 { conn.Open(); LogList = LogDal.GetLogListByProc(conn, parameters, "{call sp_GetTransferList2(?,?,?,?,?,?,?,?,?,?,?)}"); conn.Close(); return(LogList); } }
/// <summary> /// 転送容量の取得 /// </summary> /// <param name="groupId">グループid</param> /// <param name="dtStart">開始日付</param> /// <param name="dtEnd">終了日付</param> /// <param name="tmStart">開始時間</param> /// <param name="tmEnd">終了時間</param> /// <param name="displayFlg">表示フラグ</param> /// <param name="tranferLfg">0:転送中-完了両方;1:転送中のみ</param> /// <param name="stateFlg">0:OK-NG両方;1:NGのみ</param> /// <param name="logFlg">0:ログ表示;1:転送容量表示</param> /// <returns></returns> public IList <TransferLog> GetTransferLogListByProc(int groupId, string dtStart, string dtEnd, string tmStart, string tmEnd, int displayFlg, int tranferFlg, int stateFlg, int logFlg) { IList <TransferLog> LogList; OdbcParameter[] parameters = { new OdbcParameter("@groupId", groupId), new OdbcParameter("@StartDate", dtStart), new OdbcParameter("@EndDate", dtEnd), new OdbcParameter("@StartTime", tmStart), new OdbcParameter("@EndTime", tmEnd), new OdbcParameter("@TranferFlg", tranferFlg), new OdbcParameter("@StateFlg", stateFlg), new OdbcParameter("@LogFlg", logFlg) }; OdbcConnection conn; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); //sqlcommand ストアド実行方法 //LogList = TransferLogDal.GetTransferLogListByProc(conn, parameters, "sp_GetTranferList"); //odbccommand ストアド実行方法 LogList = TransferLogDal.GetTransferLogListByProc(conn, parameters, "{call sp_GetTranferList(?,?,?,?,?,?,?,?)}"); conn.Close(); return(LogList); } }
public IList <MonitorServerFolder> GetMonitorServerFolderPage(IEnumerable <SearchCondition> condition, int page, int pagesize) { OdbcConnection conn; IList <MonitorServerFolder> MonitorServerFolder; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); MonitorServerFolder = MonitorServerFolderDal.GetMonitorServerFolderPage(condition, page, pagesize, conn); conn.Close(); return(MonitorServerFolder); } }
public int InsertMonitorServerFolder(MonitorServerFolder MonitorServerFolder) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = MonitorServerFolderDal.InsertMonitorServerFolder(MonitorServerFolder, conn); conn.Close(); } return(count); }
public int DeleteMonitorServerFolder(int MonitorServerFolderId, string loginID) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = MonitorServerFolderDal.DeleteMonitorServerFolderById(MonitorServerFolderId, loginID, conn); conn.Close(); } return(count); }
public int GetMonitorServerFolderCount(IEnumerable <SearchCondition> condition) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = MonitorServerFolderDal.GetMonitorServerFolderCount(condition, conn); conn.Close(); } return(count); }
public int GetUserInfoCount(IEnumerable <SearchCondition> condition) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = UserInfoDal.GetUserInfoCount(condition, conn); conn.Close(); } return(count); }
public int DeleteBackupServerGroupDetailByGroupId(int BackupGroupId, string loginID) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = BackupServerGroupDetailDal.DeleteBackupServerGroupDetailByGroupId(BackupGroupId, loginID, conn); conn.Close(); } return(count); }
public IList <BackupServer> GetGroupBackupServerList(string groupId) { OdbcConnection conn; IList <BackupServer> BackupServer; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); BackupServer = BackupServerDal.GetGroupBackupServerList(conn, groupId); conn.Close(); return(BackupServer); } }
public int GetMaxId() { OdbcConnection conn; int maxId; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); maxId = MonitorServerDal.GetMaxId(conn); conn.Close(); return(maxId); } }
public int UpdateMonitorServerCopyInit(int MonitorServerId) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = MonitorServerDal.UpdateMonitorServerCopyInit(MonitorServerId, conn); conn.Close(); } return(count); }
/// <summary> /// /// </summary> /// <param name="BackupServerFile"></param> /// <returns></returns> public int InsertBackupServerFile(BackupServerFile BackupServerFile) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = BackupServerFileDal.InsertBackupServerFile(BackupServerFile, conn); conn.Close(); } return(count); }
public IList <Log> GetLogPage(IEnumerable <SearchCondition> condition, int page, int pagesize) { OdbcConnection conn; IList <Log> Log; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); Log = LogDal.GetLogPage(condition, page, pagesize, conn); conn.Close(); return(Log); } }
public int InsertLog(Log Log) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = LogDal.InsertLog(Log, conn); conn.Close(); } return(count); }
public IList <BackupServerGroupDetail> GetBackupServerGroupDetailPage(IEnumerable <SearchCondition> condition, int page, int pagesize) { OdbcConnection conn; IList <BackupServerGroupDetail> BackupServerGroupDetail; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); BackupServerGroupDetail = BackupServerGroupDetailDal.GetBackupServerGroupDetailPage(condition, page, pagesize, conn); conn.Close(); return(BackupServerGroupDetail); } }
public int InsertUserInfo(UserInfo UserInfo) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = UserInfoDal.InsertUserInfo(UserInfo, conn); conn.Close(); } return(count); }
public int GetBackupServerGroupDetailCount(IEnumerable <SearchCondition> condition) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = BackupServerGroupDetailDal.GetBackupServerGroupDetailCount(condition, conn); conn.Close(); } return(count); }
/// <summary> /// /// </summary> /// <param name="MonitorServerFile"></param> /// <returns></returns> public int UpdateTransferFlg(string MonitorServerFileId, int transferFlg) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = MonitorServerFileDal.UpdateTransferFlg(MonitorServerFileId, transferFlg, conn); conn.Close(); } return(count); }
public int InsertBackupServerGroupDetail(BackupServerGroupDetail BackupServerGroupDetail) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = BackupServerGroupDetailDal.InsertBackupServerGroupDetail(BackupServerGroupDetail, conn); conn.Close(); } return(count); }
public int UpdateBackupServer(BackupServer BackupServer) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = BackupServerDal.UpdateBackupServer(BackupServer, conn); conn.Close(); } return(count); }
public int DeleteUserInfo(int UserInfoId, string loginID) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = UserInfoDal.DeleteUserInfoById(UserInfoId, loginID, conn); conn.Close(); } return(count); }
public int DeleteLog(int LogId, string loginID) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = LogDal.DeleteLogById(LogId, loginID, conn); conn.Close(); } return(count); }
public IList <UserInfo> GetUserInfoPage(IEnumerable <SearchCondition> condition, int page, int pagesize) { OdbcConnection conn; IList <UserInfo> UserInfo; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); UserInfo = UserInfoDal.GetUserInfoPage(condition, page, pagesize, conn); conn.Close(); return(UserInfo); } }
/// <summary> /// /// </summary> /// <param name="MonitorServerFile"></param> /// <returns></returns> public int UpdateMonitorServerFile(MonitorServerFile MonitorServerFile) { OdbcConnection conn; int count = 0; using (conn = OdbcHelper.CreateConntion()) { conn.Open(); count = MonitorServerFileDal.UpdateMonitorServerFile(MonitorServerFile, conn); conn.Close(); } return(count); }