public static void AddAttend(CMSDataContext Db, int PeopleId, int OrgId, bool Present, int MeetingId, DateTime dt) { var a = new Attend { AttendanceFlag = Present, AttendanceTypeId = AttendTypeCode.Member, MemberTypeId = MemberTypeCode.Member, MeetingId = MeetingId, MeetingDate = dt, PeopleId = PeopleId, OrganizationId = OrgId, CreatedDate = DateTime.Now, }; Db.Attends.InsertOnSubmit(a); }
public static Attend AddAttend(CMSDataContext Db, int PeopleId, int OrgId, bool Present, int attendtype, int membertype, DateTime dt) { var meeting = Meeting.FetchOrCreateMeeting(Db, OrgId, dt, noautoabsents: true); var a = new Attend { AttendanceFlag = Present, AttendanceTypeId = attendtype, MemberTypeId = membertype, MeetingId = meeting.MeetingId, MeetingDate = dt, PeopleId = PeopleId, OrganizationId = OrgId, CreatedDate = DateTime.Now, }; Db.Attends.InsertOnSubmit(a); return a; }
public static Attend AddAttend(CMSDataContext Db, int PeopleId, int OrgId, bool Present, int attendtype, int membertype, DateTime dt) { var meeting = Meeting.FetchOrCreateMeeting(Db, OrgId, dt, noautoabsents: true); var a = new Attend { AttendanceFlag = Present, AttendanceTypeId = attendtype, MemberTypeId = membertype, MeetingId = meeting.MeetingId, MeetingDate = dt, PeopleId = PeopleId, OrganizationId = OrgId, CreatedDate = DateTime.Now, }; Db.Attends.InsertOnSubmit(a); return(a); }
public static int AddAttend(CMSDataContext Db, int PeopleId, int OrgId, bool Present, DateTime dt) { var meeting = Meeting.FetchOrCreateMeeting(Db, OrgId, dt); var a = new Attend { AttendanceFlag = Present, AttendanceTypeId = AttendTypeCode.Member, MemberTypeId = Codes.MemberTypeCode.Member, MeetingId = meeting.MeetingId, MeetingDate = dt, PeopleId = PeopleId, OrganizationId = OrgId, CreatedDate = DateTime.Now, }; Db.Attends.InsertOnSubmit(a); return(meeting.MeetingId); }
public static void MarkRegistered(CMSDataContext Db, int PeopleId, int MeetingId, int?CommitId, bool AvoidRegrets = false) { var i = (from m in Db.Meetings where m.MeetingId == MeetingId let om = Db.OrganizationMembers.SingleOrDefault(mm => mm.OrganizationId == m.OrganizationId && mm.PeopleId == PeopleId) let a = Db.Attends.SingleOrDefault(aa => aa.PeopleId == PeopleId && aa.MeetingId == MeetingId) select new { a, m.OrganizationId, MeetingDate = m.MeetingDate.Value, MemberTypeId = om == null ? CmsData.Codes.MemberTypeCode.Visitor : om.MemberTypeId, }).Single(); if (i.a == null) { var a = new Attend { OrganizationId = i.OrganizationId, PeopleId = PeopleId, MeetingDate = i.MeetingDate, AttendanceFlag = false, CreatedDate = Util.Now, CreatedBy = Util.UserId1, AttendanceTypeId = null, BFCAttendance = null, OtherAttends = 0, MemberTypeId = i.MemberTypeId, OtherOrgId = 0, Commitment = CommitId, MeetingId = MeetingId }; Db.Attends.InsertOnSubmit(a); } else if (AvoidRegrets == false || i.a.Commitment == 1 || i.a.Commitment == null) { i.a.Commitment = CommitId; } Db.SubmitChanges(); }
private void detach_Attends(Attend entity) { this.SendPropertyChanging(); entity.MemberType = null; }
private void attach_Attends(Attend entity) { this.SendPropertyChanging(); entity.MemberType = this; }
private void detach_Attends(Attend entity) { this.SendPropertyChanging(); entity.AttendType = null; }
private void attach_Attends(Attend entity) { this.SendPropertyChanging(); entity.AttendType = this; }
private void detach_Attends(Attend entity) { this.SendPropertyChanging(); entity.Person = null; }
private void attach_Attends(Attend entity) { this.SendPropertyChanging(); entity.Person = this; }
public static void MarkRegistered(CMSDataContext Db, int PeopleId, int MeetingId, int? CommitId, bool AvoidRegrets = false) { var i = (from m in Db.Meetings where m.MeetingId == MeetingId let om = Db.OrganizationMembers.SingleOrDefault(mm => mm.OrganizationId == m.OrganizationId && mm.PeopleId == PeopleId) let a = Db.Attends.SingleOrDefault(aa => aa.PeopleId == PeopleId && aa.MeetingId == MeetingId) select new { a, m.OrganizationId, MeetingDate = m.MeetingDate.Value, MemberTypeId = om == null ? CmsData.Codes.MemberTypeCode.Visitor : om.MemberTypeId, }).Single(); if (i.a == null) { var a = new Attend { OrganizationId = i.OrganizationId, PeopleId = PeopleId, MeetingDate = i.MeetingDate, AttendanceFlag = false, CreatedDate = Util.Now, CreatedBy = Util.UserId1, AttendanceTypeId = null, BFCAttendance = null, OtherAttends = 0, MemberTypeId = i.MemberTypeId, OtherOrgId = 0, Commitment = CommitId, MeetingId = MeetingId }; Db.Attends.InsertOnSubmit(a); } else if (AvoidRegrets == false || i.a.Commitment == 1 || i.a.Commitment == null) i.a.Commitment = CommitId; Db.SubmitChanges(); }
private void detach_Attends(Attend entity) { this.SendPropertyChanging(); entity.Organization = null; }