Tag() public static method

public static Tag ( CMSDataContext db, int peopleId, string tagName, int ownerId, int tagTypeId ) : void
db CMSDataContext
peopleId int
tagName string
ownerId int
tagTypeId int
return void
Beispiel #1
0
 public void AddTag(object query, string tagName, int ownerId)
 {
     using (var db2 = NewDataContext())
     {
         foreach (var pid in db2.PeopleQueryIds(query))
         {
             Person.Tag(db2, pid, tagName, ownerId, DbUtil.TagTypeId_Personal);
         }
         db2.SubmitChanges();
     }
 }
Beispiel #2
0
        public void AddTag(object query, string tagName, int ownerId)
        {
            var list = PeopleIds(query);
            var db2  = NewDataContext();

            foreach (var pid in list)
            {
                Person.Tag(db2, pid, tagName, ownerId, DbUtil.TagTypeId_Personal);
            }
            db2.SubmitChanges();
            db2.Dispose();
        }