Esempio n. 1
0
        public bool AddGroup(string grpName, CLIENT client)
        {
            if ((from ent in client.GROUP
                 where ent.NAME.TrimEnd() == grpName
                 select ent).Count() != 0)
            {
                return false;
            }

            GROUP grp = new GROUP();
            grp.NAME = grpName;
            grp.CLIENT = client;

            dbo.AddToGROUP(grp);

            return true;
        }
Esempio n. 2
0
        public bool GetGroup(string grpName, CLIENT client, out GROUP grp)
        {
            try
            {
                grp = (from ent in client.GROUP
                       where ent.NAME.TrimEnd() == grpName
                       select ent).Single();
            }

            catch
            {
                grp = null;
                return false;
            }

            return true;
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the GROUP EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToGROUP(GROUP gROUP)
 {
     base.AddObject("GROUP", gROUP);
 }
Esempio n. 4
0
        public bool AddContact(int id, GROUP grp)
        {
            if ((from ent in grp.CONTACT
                 where ent.ID == id
                 select ent).Count() != 0)
            {
                return false;
            }

            CONTACT contact = new CONTACT();
            contact.ID = id;
            grp.CONTACT.Add(contact);
            dbo.AddToCONTACT(contact);

            return true;
        }
 /// <summary>
 /// Create a new GROUP object.
 /// </summary>
 /// <param name="gROUPID">Initial value of the GROUPID property.</param>
 /// <param name="nAME">Initial value of the NAME property.</param>
 public static GROUP CreateGROUP(global::System.Int32 gROUPID, global::System.String nAME)
 {
     GROUP gROUP = new GROUP();
     gROUP.GROUPID = gROUPID;
     gROUP.NAME = nAME;
     return gROUP;
 }