public EbConstraints(string[] add_ids, EbConstraintKeyTypes key_typ, EbConstraintTypes cons_typ) { this.Constraints = new Dictionary <int, EbConstraint>(); for (int i = 0; i < add_ids.Length; i++) { add_ids[i] = add_ids[i].Replace(";", string.Empty).Replace("$", string.Empty); if (add_ids[i].IsEmpty()) { continue; } this.Constraints.Add(i, new EbConstraint() { KeyType = key_typ, Description = "no description" }); this.Constraints[i].Values.Add(0, new EbConstraintOTV() { Operation = EbConstraintOperators.EqualTo, Type = cons_typ, Value = add_ids[i] }); } }
public static string GetSelectQuery(EbConstraintKeyTypes _keyTyp, IDatabase DataDB, string _keyIdParam = "id") { return(string.Format(DataDB.EB_GET_SELECT_CONSTRAINTS, (int)_keyTyp, _keyIdParam)); }