Beispiel #1
0
        public static OrgMemberExtra GetExtraValue(CMSDataContext db, int oid, int pid, string field)
        {
            //field = field.Replace('/', '-');
            var q = from v in db.OrgMemberExtras
                    where v.Field == field
                    where v.OrganizationId == oid
                    where v.PeopleId == pid
                    select v;
            var ev = q.SingleOrDefault();

            if (ev == null)
            {
                ev = new OrgMemberExtra()
                {
                    OrganizationId  = oid,
                    PeopleId        = pid,
                    Field           = field,
                    TransactionTime = DateTime.Now
                };
                db.OrgMemberExtras.InsertOnSubmit(ev);
            }
            return(ev);
        }
Beispiel #2
0
 private void detach_OrgMemberExtras(OrgMemberExtra entity)
 {
     this.SendPropertyChanging();
     entity.OrganizationMember = null;
 }