예제 #1
0
        public bool AddRecordEntryItem(RecordInfoEntry info)
        {
            string sql = @"INSERT INTO RecordInfoEntry (FInterID,FCode) VALUES(@Id,@codeRule) ";

            using (var conn = new DbHelperSQL(config).GetConnection())
            {
                return(conn.Execute(sql, new { Id = info.FInterID, codeRule = info.FCode }) > 0);
            }
        }
예제 #2
0
        public bool UpdateRecordEntryItem(RecordInfoEntry info)
        {
            string sql = @"UPDATE RecordInfoEntry SET FCode = @rule WHERE FEntryID = @Id ";

            using (var conn = new DbHelperSQL(config).GetConnection())
            {
                return(conn.Execute(sql, new { rule = info.FCode, Id = info.FEntryID }) > 0);
            }
        }