public bool AddCheckEntryItem(CheckCodeInfoEntry info) { string sql = @"INSERT INTO CheckCodeInfoEntry (FInterID,FCodeRule) VALUES(@Id,@codeRule) "; using (var conn = new DbHelperSQL(config).GetConnection()) { return(conn.Execute(sql, new { Id = info.FInterID, codeRule = info.FCodeRule }) > 0); } }
public bool UpdateCheckEntryItem(CheckCodeInfoEntry info) { string sql = @"UPDATE CheckCodeInfoEntry SET FCodeRule = @rule WHERE FEntryID = @Id "; using (var conn = new DbHelperSQL(config).GetConnection()) { return(conn.Execute(sql, new { rule = info.FCodeRule, Id = info.FEntryID }) > 0); } }