/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorServerFile> GetMonitorServerFile(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <MonitorServerFile> lMonitorServerFile = new List <MonitorServerFile>(); string sql = @"SELECT id ,monitorServerID ,monitorFileName ,monitorFileDirectory ,monitorFilePath ,monitorFileType ,monitorFileSize ,monitorFileStatus ,monitorStartTime ,transferFlg ,transferNum FROM monitorServerFile"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql += " order by id desc"; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lMonitorServerFile = DBTool.GetListFromDatatable <MonitorServerFile>(dt); return(lMonitorServerFile); }
public IList <BackupServerFile> GetBackupServerFilePage(IEnumerable <SearchCondition> conditon, int page, int pagesize, OdbcConnection conn) { IList <BackupServerFile> lBackupServerFile = new List <BackupServerFile>(); string sql = @"SELECT id ,backupServerGroupID ,backupServerID ,backupServerFileName ,backupServerFilePath ,backupServerFileType ,backupServerFileSize ,backupStartTime ,backupEndTime ,backupTime ,backupFlg ,copyStartTime ,copyEndTime ,copyTime ,copyFlg ,ROW_NUMBER() over(order by createDate) as row FROM backupServerFile "; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql = "select * from (" + sql + ") as a where row>" + (page - 1) * pagesize + " and row<=" + page * pagesize; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lBackupServerFile = DBTool.GetListFromDatatable <BackupServerFile>(dt); return(lBackupServerFile); }
public IList <BackupServerFile> GetBackupServerFile(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <BackupServerFile> lBackupServerFile = new List <BackupServerFile>(); string sql = @"SELECT id ,backupServerGroupID ,backupServerID ,backupServerFileName ,backupServerFilePath ,backupServerFileType ,backupServerFileSize ,backupStartTime ,backupEndTime ,backupTime ,backupFlg ,copyStartTime ,copyEndTime ,copyTime ,copyFlg FROM backupServerFile"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lBackupServerFile = DBTool.GetListFromDatatable <BackupServerFile>(dt); return(lBackupServerFile); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="page"></param> /// <param name="pagesize"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorServerFile> GetMonitorServerFilePage(IEnumerable <SearchCondition> conditon, int page, int pagesize, OdbcConnection conn) { IList <MonitorServerFile> lMonitorServerFile = new List <MonitorServerFile>(); string sql = @"SELECT id ,monitorServerID ,monitorFileName ,monitorFilePath ,monitorFileType ,monitorFileSize ,monitorTime ,transferFlg ROW_NUMBER() over(order by createDate) as row FROM monitorServerFile "; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql = "select * from (" + sql + ") as a where row>" + (page - 1) * pagesize + " and row<=" + page * pagesize; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lMonitorServerFile = DBTool.GetListFromDatatable <MonitorServerFile>(dt); return(lMonitorServerFile); }
/// <summary> /// /// </summary> /// <param name="where"></param> /// <param name="page"></param> /// <param name="pagesize"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorFileListen> GetMonitorFileListenPage(string sql, int page, int pagesize, OdbcConnection conn) { IList <MonitorFileListen> lMonitorFileListen = new List <MonitorFileListen>(); sql = "select * from (" + sql + ") as a where row>" + (page - 1) * pagesize + " and row<=" + page * pagesize; DataTable dt = OdbcHelper.Squery(sql, conn); lMonitorFileListen = DBTool.GetListFromDatatable <MonitorFileListen>(dt); return(lMonitorFileListen); }
/// <summary> /// Get BackupServerGroup By BackupServerID /// </summary> /// 2014-06-23 wjd add /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <BackupServerGroup> GetBackupServerGroupByBackupServerID(int backupServerID, OdbcConnection conn) { IList <BackupServerGroup> lBackupServerGroup = new List <BackupServerGroup>(); string sql = @"select g.id,g.backupServerGroupName,g.monitorServerID,g.memo from [backupServerGroup] g left join [backupServerGroupDetail] gd on gd.[backupServerGroupID] = g.[id] where gd.backupServerID = " + backupServerID + " and gd.[deleteFlg] = 0 and g.[deleteFlg] = 0;"; DataTable dt = OdbcHelper.Squery(sql, conn); lBackupServerGroup = DBTool.GetListFromDatatable <BackupServerGroup>(dt); return(lBackupServerGroup); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <ManualBackupServer> GetManualBackupServer(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <ManualBackupServer> lManualBackupServer = new List <ManualBackupServer>(); string sql = "select id,DBServerIP,serverIP,account,password,startFile,drive from manualBackupServer"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lManualBackupServer = DBTool.GetListFromDatatable <ManualBackupServer>(dt); return(lManualBackupServer); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <UserInfo> GetUserInfo(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <UserInfo> lUserInfo = new List <UserInfo>(); string sql = @"select id,loginID,name,password,mail,mailFlg,authorityFlg from userInfo"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lUserInfo = DBTool.GetListFromDatatable <UserInfo>(dt); return(lUserInfo); }
/// <summary> /// 根据条件获取バックアップ元 from all DB /// </summary> /// 2014-07-06 wjd add /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorServer> GetMonitorServerAll(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <MonitorServer> lMonitorServer = new List <MonitorServer>(); string sql = @"SELECT distinct id,DBServerIP,monitorServerName,monitorServerIP,monitorSystem,memo,account,password,monitorMacPath,monitorLocalPath,copyInit FROM monitorServer"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lMonitorServer = DBTool.GetListFromDatatable <MonitorServer>(dt); return(lMonitorServer); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <FileTypeSet> GetFileTypeSet(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <FileTypeSet> lFileTypeSet = new List <FileTypeSet>(); string sql = "select id,monitorServerFolderName,monitorServerID,exceptAttribute1,exceptAttribute2,exceptAttribute3,exceptAttributeFlg1,exceptAttributeFlg2,exceptAttributeFlg3,systemFileFlg,hiddenFileFlg from fileTypeSet"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lFileTypeSet = DBTool.GetListFromDatatable <FileTypeSet>(dt); return(lFileTypeSet); }
/// <summary> /// Get BackupServerGroup from All DB /// </summary> /// 2014-07-02 wjd add /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <BackupServerGroup> GetBackupServerGroupAll(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <BackupServerGroup> lBackupServerGroup = new List <BackupServerGroup>(); string sql = "select id,DBServerIP,backupServerGroupName,monitorServerID,memo from backupServerGroup"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lBackupServerGroup = DBTool.GetListFromDatatable <BackupServerGroup>(dt); return(lBackupServerGroup); }
public IList <MonitorFileListen> GetPartMonitorFileListenList(string where, OdbcConnection conn) { IList <MonitorFileListen> lMonitorFileListen = new List <MonitorFileListen>(); string sql = @"select id,monitorServerID,monitorFileName,monitorType,monitorServerIP,sharePoint,monitorLocalPath,monitorFileRelativeDirectory,monitorFileRelativeFullPath,monitorFileLastWriteTime,monitorFileSize, monitorFileExtension,monitorFileCreateTime,monitorFileLastAccessTime,monitorStatus,monitorFileStartTime, monitorFileEndTime,deleteFlg,deleter,deleteDate,creater,createDate,updater,updateDate from MonitorFileListen"; if (where != "") { sql += " where " + where; } DataTable dt = OdbcHelper.Squery(sql, conn); lMonitorFileListen = DBTool.GetListFromDatatable <MonitorFileListen>(dt); return(lMonitorFileListen); }
/// <summary> /// /// </summary> /// <param name="where"></param> /// <param name="conn"></param> /// <returns></returns> public IList <Log> GetConditionLog(string where, OdbcConnection conn) { IList <Log> lLog = new List <Log>(); string sql = @"SELECT id ,monitorServerID ,monitorFileName ,monitorFileStatus ,monitorFilePath ,monitorFileType ,monitorFileSize ,monitorTime ,transferFlg ,backupServerGroupID ,backupServerID ,backupServerFileName ,backupServerFilePath ,backupServerFileType ,backupServerFileSize ,backupStartTime ,backupEndTime ,backupTime ,backupFlg ,copyStartTime ,copyEndTime ,copyTime ,copyFlg ,creater ,createDate FROM log"; if (where != "") { sql += " where " + where; } sql += " order by id desc"; try { //conn.ConnectionTimeout = 150; DataTable dt = OdbcHelper.Squery(sql, conn); lLog = DBTool.GetListFromDatatable <Log>(dt); } catch (Exception ex) { } return(lLog); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="page"></param> /// <param name="pagesize"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorServer> GetMonitorServerPage(IEnumerable <SearchCondition> conditon, int page, int pagesize, OdbcConnection conn) { IList <MonitorServer> lMonitorServer = new List <MonitorServer>(); string sql = @"SELECT id,monitorServerName,monitorServerIP,monitorSystem,memo,account,password,startFile,monitorDrive,monitorDriveP,monitorLocalPath ,ROW_NUMBER() over(order by createDate) as row FROM monitorServer "; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql = "select * from (" + sql + ") as a where row>" + (page - 1) * pagesize + " and row<=" + page * pagesize; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lMonitorServer = DBTool.GetListFromDatatable <MonitorServer>(dt); return(lMonitorServer); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="page"></param> /// <param name="pagesize"></param> /// <param name="conn"></param> /// <returns></returns> public IList <FileTypeSet> GetFileTypeSetPage(IEnumerable <SearchCondition> conditon, int page, int pagesize, OdbcConnection conn) { IList <FileTypeSet> lFileTypeSet = new List <FileTypeSet>(); string sql = @"SELECT id,monitorServerFolderName,monitorServerID,exceptAttribute1,exceptAttribute2,exceptAttribute3,exceptAttributeFlg1,exceptAttributeFlg2,exceptAttributeFlg3,systemFileFlg,hiddenFileFlg ,ROW_NUMBER() over(order by createDate) as row FROM fileTypeSet "; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql = "select * from (" + sql + ") as a where row>" + (page - 1) * pagesize + " and row<=" + page * pagesize; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lFileTypeSet = DBTool.GetListFromDatatable <FileTypeSet>(dt); return(lFileTypeSet); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="page"></param> /// <param name="pagesize"></param> /// <param name="conn"></param> /// <returns></returns> public IList <UserInfo> GetUserInfoPage(IEnumerable <SearchCondition> conditon, int page, int pagesize, OdbcConnection conn) { IList <UserInfo> lUserInfo = new List <UserInfo>(); string sql = @"SELECT id,loginID,name,password,mail,mailFlg,authorityFlg ,ROW_NUMBER() over(order by createDate) as row FROM userInfo "; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql = "select * from (" + sql + ") as a where row>" + (page - 1) * pagesize + " and row<=" + page * pagesize; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lUserInfo = DBTool.GetListFromDatatable <UserInfo>(dt); return(lUserInfo); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorFileListen> GetMonitorFileListen(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <MonitorFileListen> lMonitorFileListen = new List <MonitorFileListen>(); string sql = @"select id,monitorServerID,monitorFileName,monitorType,monitorServerIP,sharePoint,monitorLocalPath,monitorFileRelativeDirectory,monitorFileRelativeFullPath,monitorFileLastWriteTime,monitorFileSize, monitorFileExtension,monitorFileCreateTime,monitorFileLastAccessTime,monitorStatus,monitorFileStartTime, monitorFileEndTime,deleteFlg,deleter,deleteDate,creater,createDate,updater,updateDate from MonitorFileListen"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lMonitorFileListen = DBTool.GetListFromDatatable <MonitorFileListen>(dt); return(lMonitorFileListen); }
/// <summary> /// 获取传送容量 For Winform——2014-12-02 wjd add /// </summary> /// <param name="groupId"></param> /// <param name="dtStart"></param> /// <param name="dtEnd"></param> /// <param name="tmStart"></param> /// <param name="tmEnd"></param> /// <param name="name"></param> /// <param name="backupFlg">1:OK, 0:NG or 99:both</param> /// <returns></returns> public IList <TransferLog> GetTransferLogList(int groupID, string dtStart, string dtEnd, string tmStart, string tmEnd, string name, string backupFlg) { IList <TransferLog> lLog = new List <TransferLog>(); StringBuilder sb = new StringBuilder(); sb.Append(@"select monitorFileName,monitorFileSize,convert(varchar(10),backupStartTime,111) as DT,DATEPART(HH,backupStartTime) as HH from [log] where backupStartTime between '@StartDatetime' and '@EndDatetime' "); if (groupID > 0) { sb.Append(" and backupServerGroupID=@groupID "); } if (!string.IsNullOrWhiteSpace(name)) { sb.Append(" and backupServerFileName like '%@backupServerFileName%' "); } if (backupFlg != "99") { sb.Append(" and backupFlg = ").Append(backupFlg); } sb.Replace("@StartDatetime", dtStart + " " + tmStart).Replace("@EndDatetime", dtEnd + " " + tmEnd).Replace("@groupID", groupID.ToString()).Replace("@backupServerFileName", name); string sql = @"select DT as transferDate, SUM(cast(monitorFileSize as bigint)) as transferFileSize,COUNT(monitorFileSize) as transferFileCount,HH as transferTime from (" + sb.ToString() + ") as a group by DT,HH order by DT,HH "; try { using (OdbcConnection conn = OdbcHelper.CreateConntion()) { conn.Open(); DataTable dt = OdbcHelper.Squery(sql, conn); if (dt != null && dt.Rows.Count > 0) { lLog = DBTool.GetListFromDatatable <TransferLog>(dt); } conn.Close(); } } catch (Exception ex) { logger.Error(ex.Message); } return(lLog); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <Log> GetLog(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <Log> lLog = new List <Log>(); string sql = @"SELECT id ,monitorServerID ,monitorFileName ,monitorFileStatus ,monitorFilePath ,monitorFileType ,monitorFileSize ,monitorTime ,transferFlg ,backupServerGroupID ,backupServerID ,backupServerFileName ,backupServerFilePath ,backupServerFileType ,backupServerFileSize ,backupStartTime ,backupEndTime ,backupTime ,backupFlg ,copyStartTime ,copyEndTime ,copyTime ,copyFlg ,creater ,createDate FROM log"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql += " order by id desc"; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lLog = DBTool.GetListFromDatatable <Log>(dt); return(lLog); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="page"></param> /// <param name="pagesize"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorFileListen> GetMonitorFileListenPage(IEnumerable <SearchCondition> conditon, int page, int pagesize, OdbcConnection conn) { IList <MonitorFileListen> lMonitorFileListen = new List <MonitorFileListen>(); string sql = @"select id,monitorServerID,monitorFileName,monitorType,monitorServerIP,sharePoint,monitorLocalPath,monitorFileRelativeDirectory,monitorFileRelativeFullPath,monitorFileLastWriteTime,monitorFileSize, monitorFileExtension,monitorFileCreateTime,monitorFileLastAccessTime,monitorStatus,monitorFileStartTime, monitorFileEndTime,deleteFlg,deleter,deleteDate,creater,createDate,updater,updateDate, ROW_NUMBER() over(order by createDate) as row FROM MonitorFileListen "; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql = "select * from (" + sql + ") as a where row>" + (page - 1) * pagesize + " and row<=" + page * pagesize; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lMonitorFileListen = DBTool.GetListFromDatatable <MonitorFileListen>(dt); return(lMonitorFileListen); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <BackupServerGroupDetail> GetBackupServerGroupDetail(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <BackupServerGroupDetail> lBackupServerGroupDetail = new List <BackupServerGroupDetail>(); string sql = @"SELECT id ,backupServerGroupID ,backupServerID ,creater ,createDate FROM backupServerGroupDetail"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lBackupServerGroupDetail = DBTool.GetListFromDatatable <BackupServerGroupDetail>(dt); return(lBackupServerGroupDetail); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorBackupServer> GetMonitorBackupServer(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <MonitorBackupServer> lMonitorBackupServer = new List <MonitorBackupServer>(); string sql = @"SELECT mbs.id ,mbs.backupServerGroupID ,bsg.backupServerGroupName ,mbs.monitorServerID ,mbs.creater ,mbs.createDate FROM monitorBackupServer as mbs INNER JOIN backupServerGroup as bsg ON mbs.backupServerGroupID = bsg.id"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lMonitorBackupServer = DBTool.GetListFromDatatable <MonitorBackupServer>(dt); return(lMonitorBackupServer); }
public IList <BackupServerGroupDetail> GetBackupServerGroupDetailPage(IEnumerable <SearchCondition> conditon, int page, int pagesize, OdbcConnection conn) { IList <BackupServerGroupDetail> lBackupServerGroupDetail = new List <BackupServerGroupDetail>(); string sql = @"SELECT [id] ,backupServerGroupID ,backupServerID ,creater ,createDate ,ROW_NUMBER() over(order by createDate) as row FROM backupServerGroupDetail "; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } sql = "select * from (" + sql + ") as a where row>" + (page - 1) * pagesize + " and row<=" + page * pagesize; OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lBackupServerGroupDetail = DBTool.GetListFromDatatable <BackupServerGroupDetail>(dt); return(lBackupServerGroupDetail); }
/// <summary> /// /// </summary> /// <param name="conditon"></param> /// <param name="conn"></param> /// <returns></returns> public IList <MonitorServerFolder> GetMonitorServerFolder(IEnumerable <SearchCondition> conditon, OdbcConnection conn) { IList <MonitorServerFolder> lMonitorServerFolder = new List <MonitorServerFolder>(); string sql = @"SELECT id ,monitorServerID ,monitorFileName ,monitorFilePath ,monitorFileType ,monitorFlg ,initFlg FROM monitorServerFolder"; if (conditon.Count() > 0) { string con = DBTool.GetSqlcon(conditon); sql += " where " + con; } OdbcParameter[] spvalues = DBTool.GetOdbcParam(conditon); DataTable dt = OdbcHelper.Squery(sql, conn, spvalues); lMonitorServerFolder = DBTool.GetListFromDatatable <MonitorServerFolder>(dt); return(lMonitorServerFolder); }