示例#1
0
 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;
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
 private Pin(PinSet owner, Extension number, string pin)
 {
     _owningSet = owner;
     _extension = number;
     _pinNumber = pin;
 }
示例#5
0
 private Pin(PinSet owner, Extension number, string pin)
 {
     _owningSet = owner;
     _extension = number;
     _pinNumber = pin;
 }