本文整理汇总了C#中CmsData.CMSDataContext.LoadOrganizationById方法的典型用法代码示例。如果您正苦于以下问题:C# CMSDataContext.LoadOrganizationById方法的具体用法?C# CMSDataContext.LoadOrganizationById怎么用?C# CMSDataContext.LoadOrganizationById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CmsData.CMSDataContext
的用法示例。
在下文中一共展示了CMSDataContext.LoadOrganizationById方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UseBootstrap
public bool UseBootstrap(CMSDataContext db)
{
if (usebootstrap.HasValue)
return usebootstrap.Value;
var org = db.LoadOrganizationById(OrgId);
return (usebootstrap = org.UseBootstrap) ?? false;
}
示例2: ParseSettings
public static Settings ParseSettings(string s, CMSDataContext Db, int OrgId)
{
var settings = ParseSettings(s);
settings.Db = Db;
settings.OrgId = OrgId;
settings.org = Db.LoadOrganizationById(OrgId);
return settings;
}
示例3: Settings
public Settings(string s, CMSDataContext Db, int OrgId)
: this()
{
this.Db = Db;
this.OrgId = OrgId;
org = Db.LoadOrganizationById(OrgId);
var parser = new Parser(s);
while (parser.NextSection())
ParseSection(parser);
SetUniqueIds("AskDropdown");
SetUniqueIds("AskExtraQuestions");
SetUniqueIds("AskCheckboxes");
SetUniqueIds("AskMenu");
var sglist = new List<string>();
AskItems.ForEach(a => sglist.AddRange(a.SmallGroups()));
var q = sglist.GroupBy(mi => mi).Where(g => g.Count() > 1).Select(g => g.Key).ToList();
if (q.Any())
throw parser.GetException("Duplicate SmallGroup: " + string.Join(",", q));
parser.data = null;
}
示例4: CopySettings
public void CopySettings(CMSDataContext Db, int fromid)
{
var frorg = Db.LoadOrganizationById(fromid);
//only Copy settings
NotifyIds = frorg.NotifyIds;
FirstMeetingDate = frorg.FirstMeetingDate;
LastDayBeforeExtra = frorg.LastDayBeforeExtra;
LastMeetingDate = frorg.LastMeetingDate;
Limit = frorg.Limit;
RegistrationTypeId = frorg.RegistrationTypeId;
RegStart = frorg.RegStart;
RegEnd = frorg.RegEnd;
IsMissionTrip = frorg.IsMissionTrip;
RegSetting = frorg.RegSetting;
RegSettingXml = frorg.RegSettingXml;
CopySettings2(frorg, this);
Db.SubmitChanges();
}
示例5: VolunteerLeaderInOrg
public static bool VolunteerLeaderInOrg(CMSDataContext db, int? orgid)
{
if (orgid == null)
return false;
var o = db.LoadOrganizationById(orgid);
if (o == null || o.RegistrationTypeId != RegistrationTypeCode.ChooseVolunteerTimes)
return false;
if (HttpContext.Current.User.IsInRole("Admin") ||
HttpContext.Current.User.IsInRole("ManageVolunteers"))
return true;
var leaderorgs = db.GetLeaderOrgIds(Util.UserPeopleId);
if (leaderorgs == null)
return false;
return leaderorgs.Contains(orgid.Value);
}
示例6: InsertOrgMembers
public static OrganizationMember InsertOrgMembers(CMSDataContext db, int organizationId, int peopleId, int memberTypeId, DateTime enrollmentDate, DateTime? inactiveDate = null, bool pending = false, bool skipTriggerProcessing = false)
{
var org = db.LoadOrganizationById(organizationId);
return InsertOrgMembers(db, organizationId, peopleId, memberTypeId, enrollmentDate, inactiveDate, pending, org.OrganizationName, skipTriggerProcessing);
}
示例7: AmountDueTrans
public static decimal AmountDueTrans(CMSDataContext db, Transaction ti)
{
var org = db.LoadOrganizationById(ti.OrgId);
var tt = (from t in db.ViewTransactionSummaries
where t.RegId == ti.OriginalId
select t).FirstOrDefault();
if (tt == null)
return 0;
if (org.IsMissionTrip ?? false)
return (tt.IndAmt ?? 0) - (db.TotalPaid(tt.OrganizationId, tt.PeopleId) ?? 0);
return tt.TotDue ?? 0;
}