本文整理汇总了C#中CmsData.CMSDataContext.AttendUpdateN方法的典型用法代码示例。如果您正苦于以下问题:C# CMSDataContext.AttendUpdateN方法的具体用法?C# CMSDataContext.AttendUpdateN怎么用?C# CMSDataContext.AttendUpdateN使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CmsData.CMSDataContext
的用法示例。
在下文中一共展示了CMSDataContext.AttendUpdateN方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MovePersonStuff
public void MovePersonStuff(CMSDataContext db, int targetid)
{
var toperson = db.People.Single(p => p.PeopleId == targetid);
foreach (var om in this.OrganizationMembers)
{
var om2 = OrganizationMember.InsertOrgMembers(db, om.OrganizationId, targetid, om.MemberTypeId, om.EnrollmentDate.Value, om.InactiveDate, om.Pending ?? false);
db.UpdateMainFellowship(om.OrganizationId);
om2.CreatedBy = om.CreatedBy;
om2.CreatedDate = om.CreatedDate;
om2.AttendPct = om.AttendPct;
om2.AttendStr = om.AttendStr;
om2.LastAttended = om.LastAttended;
om2.Request = om.Request;
om2.Grade = om.Grade;
om2.Amount = om.Amount;
om2.TranId = om.TranId;
om2.AmountPaid = om.AmountPaid;
om2.PayLink = om.PayLink;
om2.Moved = om.Moved;
om2.InactiveDate = om.InactiveDate;
om.Pending = om.Pending;
om.Request = om.Request;
om2.RegisterEmail = om.RegisterEmail;
om2.ShirtSize = om.ShirtSize;
om2.Tickets = om.Tickets;
om2.UserData = om.UserData;
om2.OnlineRegData = om.OnlineRegData;
db.SubmitChanges();
foreach (var m in om.OrgMemMemTags)
if (!om2.OrgMemMemTags.Any(mm => mm.MemberTagId == m.MemberTagId))
om2.OrgMemMemTags.Add(new OrgMemMemTag { MemberTagId = m.MemberTagId });
db.SubmitChanges();
db.OrgMemMemTags.DeleteAllOnSubmit(om.OrgMemMemTags);
db.SubmitChanges();
TrySubmit(db, $"Organizations (orgid:{om.OrganizationId})");
}
db.OrganizationMembers.DeleteAllOnSubmit(this.OrganizationMembers);
TrySubmit(db, "DeletingMemberships");
foreach (var et in this.EnrollmentTransactions)
et.PeopleId = targetid;
TrySubmit(db, "EnrollmentTransactions");
var tplist = TransactionPeople.ToList();
if (tplist.Any())
{
db.TransactionPeople.DeleteAllOnSubmit(TransactionPeople);
TrySubmit(db, "Delete TransactionPeople");
foreach (var tp in tplist)
db.TransactionPeople.InsertOnSubmit(new TransactionPerson
{
OrgId = tp.OrgId,
Amt = tp.Amt,
Id = tp.Id,
PeopleId = targetid
});
TrySubmit(db, "Add TransactionPeople");
}
var q = from a in db.Attends
where a.AttendanceFlag == true
where a.PeopleId == this.PeopleId
select a;
foreach (var a in q)
Attend.RecordAttendance(db, targetid, a.MeetingId, true);
db.AttendUpdateN(targetid, 10);
foreach (var c in this.Contributions)
c.PeopleId = targetid;
TrySubmit(db, "Contributions");
foreach (var u in this.Users)
u.PeopleId = targetid;
TrySubmit(db, "Users");
if (this.Volunteers.Any() && !toperson.Volunteers.Any())
foreach (var v in this.Volunteers)
{
var vv = new Volunteer
{
PeopleId = targetid,
Children = v.Children,
Comments = v.Comments,
Leader = v.Leader,
ProcessedDate = v.ProcessedDate,
Standard = v.Standard,
StatusId = v.StatusId,
};
db.Volunteers.InsertOnSubmit(vv);
}
TrySubmit(db, "Volunteers");
foreach (var v in this.VolunteerForms)
v.PeopleId = targetid;
TrySubmit(db, "VolunteerForms");
foreach (var c in this.contactsMade)
{
var cp = db.Contactors.SingleOrDefault(c2 => c2.PeopleId == targetid && c.ContactId == c2.ContactId);
//.........这里部分代码省略.........