Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Log"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateLog(Log Log, OdbcConnection conn)
        {
            string sql = @"UPDATE log
                               SET monitorServerID = ?
                                    ,monitorFileName = ?
                                    ,monitorFileStatus = ?
                                    ,monitorFilePath = ?
                                    ,monitorFileType = ?
                                    ,monitorFileSize = ?
                                    ,monitorTime = ?
                                    ,transferFlg = ?
                                    ,backupServerGroupID = ?
                                    ,backupServerID = ?
                                    ,backupServerFileName = ?
                                    ,backupServerFilePath = ?
                                    ,backupServerFileType = ?
                                    ,backupServerFileSize = ?
                                    ,backupStartTime = ?
                                    ,backupEndTime = ?
                                    ,backupTime = ?
                                    ,backupFlg = ?
                                    ,copyStartTime = ?
                                    ,copyEndTime = ?
                                    ,copyTime = ?
                                    ,copyFlg = ?
                                    ,updater = ?
                                    ,updateDate = ? 
                             WHERE id=@id";

            OdbcParameter[] spvalues = DBTool.GetOdbcPm(Log);
            return(OdbcHelper.ExecuteNonQuery(conn, System.Data.CommandType.Text, sql, spvalues));
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MonitorServerFolder"></param>
        /// <param name="conn"></param>
        /// <returns></returns>
        public int UpdateMonitorServerFolder(MonitorServerFolder MonitorServerFolder, OdbcConnection conn)
        {
            string sql = @"UPDATE monitorServerFolder
                               SET monitorServerID = ?
                                  ,monitorFileName = ?
                                  ,monitorFilePath = ?
                                  ,monitorFileType = ?
                                  ,monitorFlg = ?
                                  ,updater = ?
                                  ,updateDate = ? 
                             WHERE id=?";

            try
            {
                OdbcParameter[] spvalues = DBTool.GetOdbcPm(MonitorServerFolder);
                return(OdbcHelper.ExecuteNonQuery(conn, System.Data.CommandType.Text, sql, spvalues));
            }
            catch (Exception e)
            {
                throw e;
            }
        }