public FieldCondition GetFieldCondition(Guid id) { string sql = "SELECT * from UFfieldconditions where id = @id"; IRecordsReader rr = sqlHelper.ExecuteReader(sql, sqlHelper.CreateParameter("@id", id)); FieldCondition fc = new FieldCondition(); if (rr.Read()) { fc = FieldCondition.CreateFromDataReader(rr); fc.Rules.AddRange(storage.GetAllFieldConditionRules(fc)); } rr.Dispose(); return(fc); }
public FieldCondition GetAllFieldConditions() { string sql = "SELECT * from UFfieldconditions"; IRecordsReader rr = sqlHelper.ExecuteReader(sql); FieldCondition fc = null; if (rr.Read()) { fc = new FieldCondition(); fc = FieldCondition.CreateFromDataReader(rr); fc.Rules = storage.GetAllFieldConditionRules(fc); } rr.Dispose(); return(fc); }
public FieldCondition GetFieldCondition(Field field) { string sql = "SELECT * from UFfieldconditions where field = @field"; IRecordsReader rr = sqlHelper.ExecuteReader(sql, sqlHelper.CreateParameter("@field", field.Id)); FieldCondition fc = null; if (rr.Read()) { fc = new FieldCondition(); fc = FieldCondition.CreateFromDataReader(rr); fc.Rules = storage.GetAllFieldConditionRules(fc); } rr.Dispose(); return(fc); }