internal static List<Pin> LoadAllForSet(PinSet set) { List<Pin> ret = new List<Pin>(); Connection conn = ConnectionPoolManager.GetConnection(typeof(Pin)); foreach (Pin p in conn.Select(typeof(Pin), new SelectParameter[]{ new EqualParameter("OwningSet",set) })) ret.Add(p); conn.CloseConnection(); return ret; }
internal static List <Pin> LoadAllForSet(PinSet set) { List <Pin> ret = new List <Pin>(); Connection conn = ConnectionPoolManager.GetConnection(typeof(Pin)); foreach (Pin p in conn.Select(typeof(Pin), new SelectParameter[] { new EqualParameter("OwningSet", set) })) { ret.Add(p); } conn.CloseConnection(); return(ret); }
public static PinSet Load(string id) { PinSet ret = null; Connection conn = ConnectionPoolManager.GetConnection(typeof(PinSet)); List <Org.Reddragonit.Dbpro.Structure.Table> tmp = conn.Select(typeof(PinSet), new SelectParameter[] { new EqualParameter("Name", (id.Contains("@") ? id.Substring(0, id.IndexOf("@")) : id)), new EqualParameter((id.Contains("@") ? "Context.Name" : "Context"), (id.Contains("@") ? (object)id.Substring(id.IndexOf("@") + 1) : (object)Context.Current)) }); if (tmp.Count > 0) { ret = (PinSet)tmp[0]; } conn.CloseConnection(); return(ret); }
private Pin(PinSet owner, Extension number, string pin) { _owningSet = owner; _extension = number; _pinNumber = pin; }