Exemplo n.º 1
0
        public void UpdateSyncLog(OracleDbOperation oracleDb, SyncDataLog syncLog)
        {
            syncLog.Succ = 0;
            string strSql = SqlBuilder.BuildUpdateSql(syncLog);

            oracleDb.ExecuteNonQuery(strSql, null);
        }
Exemplo n.º 2
0
        public SyncDataLog GetSyncLogInfo(OracleDbOperation oracleDb, string code)
        {
            SyncDataLog dataInfo = null;
            string      strSql   = "select * from syncdataLog where ccode = '{0}' and syncType = {1} order by syncdate desc";

            strSql = string.Format(strSql, code, ((int)SyncDataType.System).ToString());
            DataTable dt = oracleDb.ExecuteDataTable(strSql);

            if (dt.Rows.Count > 0)
            {
                dataInfo = (SyncDataLog) new DataTableOperation().ConvertFromDataRowToEntity(dt.Rows[0], typeof(SyncDataLog));
            }
            return(dataInfo);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 插入失败的记录
        /// </summary>
        /// <param name="localDb"></param>
        /// <param name="targetConfig"></param>
        /// <param name="dataType"></param>
        public SyncDataLog InsertSyncLog(OracleDbOperation oracleDb, SyncConfigTarget targetConfig, SyncDataType dataType, string fileName)
        {
            SyncDataLog syncLog = new SyncDataLog();

            syncLog.LogId    = Guid.NewGuid().ToString();
            syncLog.CCode    = targetConfig.Code;
            syncLog.CName    = targetConfig.Name;
            syncLog.Synctype = dataType;
            syncLog.SyncDate = System.DateTime.Now;
            syncLog.FileName = fileName;
            syncLog.Succ     = 1;
            string strSql = SqlBuilder.BuildInsertSql(syncLog);

            oracleDb.ExecuteNonQuery(strSql, null);
            return(syncLog);
        }