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); }
private void detach_OrgMemberExtras(OrgMemberExtra entity) { this.SendPropertyChanging(); entity.OrganizationMember = null; }