InsertOrgMembers() public static method

public static InsertOrgMembers ( CmsData.CMSDataContext db, int organizationId, int peopleId, int memberTypeId, System.DateTime enrollmentDate, System.DateTime inactiveDate = null, bool pending = false, bool skipTriggerProcessing = false ) : OrganizationMember
db CmsData.CMSDataContext
organizationId int
peopleId int
memberTypeId int
enrollmentDate System.DateTime
inactiveDate System.DateTime
pending bool
skipTriggerProcessing bool
return OrganizationMember
コード例 #1
0
        public void AddMembersToOrg(object savedQuery, object orgId)
        {
            var q  = db.PeopleQuery2(savedQuery);
            var dt = DateTime.Now;

            foreach (var p in q)
            {
                OrganizationMember.InsertOrgMembers(db, orgId.ToInt(), p.PeopleId, MemberTypeCode.Member, dt, null, false);
                db.SubmitChanges();
            }
        }
コード例 #2
0
ファイル: Organizations.cs プロジェクト: marius310/bvcms
        public void AddMembersToOrg(object query, object orgId)
        {
            var q  = db.PeopleQuery2(query);
            var dt = DateTime.Now;

            foreach (var p in q)
            {
                var db2 = NewDataContext();
                OrganizationMember.InsertOrgMembers(db2, orgId.ToInt(), p.PeopleId, MemberTypeCode.Member, dt, null, false);
                db2.Dispose();
            }
        }
コード例 #3
0
 public void AddMembersToOrg(object query, object orgId)
 {
     using (var db2 = NewDataContext())
     {
         var q  = db2.PeopleQuery2(query);
         var dt = Util.Now;
         foreach (var p in q)
         {
             OrganizationMember.InsertOrgMembers(db2, orgId.ToInt(), p.PeopleId, MemberTypeCode.Member, dt, null, false);
             db2.SubmitChanges();
         }
     }
     db.LogActivity($"PythonModel.AddMembersToOrg({query},{orgId})");
 }
コード例 #4
0
ファイル: Organizations.cs プロジェクト: marius310/bvcms
        public void JoinOrg(int orgid, object person)
        {
            var db2 = NewDataContext();

            if (person is int)
            {
                OrganizationMember.InsertOrgMembers(db2, orgid, person.ToInt(), 220, DateTime.Now, null, false);
            }
            else if (person is Person)
            {
                OrganizationMember.InsertOrgMembers(db2, orgid, ((Person)person).PeopleId, 220, DateTime.Now, null, false);
            }

            db2.Dispose();
        }
コード例 #5
0
        public void JoinOrg(object orgid, object person)
        {
            int?pid = null;

            if (person is int)
            {
                pid = person.ToInt2();
            }
            else if (person is Person)
            {
                pid = ((Person)person).PeopleId;
            }
            if (pid == null)
            {
                return;
            }
            db.LogActivity($"PythonModel.JoinOrg({pid},{orgid})");
            using (var db2 = NewDataContext())
                OrganizationMember.InsertOrgMembers(db2, orgid.ToInt(), pid.Value, 220, Util.Now, null, false);
        }
コード例 #6
0
ファイル: Organizations.cs プロジェクト: k4larson/bvcms
        public void JoinOrg(int orgid, object person)
        {
            var db2 = NewDataContext();

            int?pid = null;

            if (person is int)
            {
                pid = person.ToInt2();
            }
            else if (person is Person)
            {
                pid = ((Person)person).PeopleId;
            }
            db.LogActivity($"PythonModel.JoinOrg({pid},{orgid})");
            if (pid == null)
            {
                return;
            }
            OrganizationMember.InsertOrgMembers(db2, orgid, pid.Value, 220, DateTime.Now, null, false);

            db2.Dispose();
        }
コード例 #7
0
 public void JoinOrg(int orgId, Person p)
 {
     OrganizationMember.InsertOrgMembers(db, orgId, p.PeopleId, 220, DateTime.Now, null, false);
 }