public static string[] ConstituentTypes(this CRM_Person person, MainDataContext db) { IEnumerable <CRM_FormFieldResponse> answers = db.CRM_FormFieldResponses.Where(f => f.TargetReference == person.Reference && f.CRM_FormFieldID == 1); if (answers != null) { return(answers.Select(s => s.CRM_FormFieldItem.Label).ToArray()); } else { return new string[] { } }; } }
public static IEnumerable <TemplateEmail> BaseSet(MainDataContext db) { return(from p in db.TemplateEmails orderby p.Name select p); }
public static IEnumerable <CRM_School> BaseSet(MainDataContext db) { return(db.CRM_Schools); }
public IEnumerable <IDuplicate> GetBaseSet(MainDataContext db) { return(CRM_Organisation.BaseSet(db).Select(l => (IDuplicate)l)); }
public static IEnumerable <CRM_FundraisingGiftProfile> BaseSet(MainDataContext db) { return(from p in db.CRM_FundraisingGiftProfiles where !p.IsArchived select p); }
public static IEnumerable <CRM_Communication> BaseSet(MainDataContext db) { return(db.CRM_Communications); }
public static IEnumerable <CRM_Exhibition> BaseSet(MainDataContext db) { return(db.CRM_Exhibitions.Where(e => e.IsActive && !e.IsArchived).OrderBy(e => e.Name)); }
public static IEnumerable <CRM_PersonOrganisation> BaseSet(MainDataContext db) { return(CRM_Person.BaseSet(db).SelectMany(c => c.CRM_PersonOrganisations)); }
public static IEnumerable <CRM_PersonSchool> BaseSet(MainDataContext db) { return(CRM_Person.BaseSet(db).SelectMany(c => c.CRM_PersonSchools)); }
public static IEnumerable <CRM_AnnualPassType> BaseSet(MainDataContext db) { return(db.CRM_AnnualPassTypes.OrderBy(o => o.Name)); }
public static IEnumerable <CRM_Fundraising> BaseSet(MainDataContext db) { return(db.CRM_Fundraisings.OrderBy(c => c.ID)); }
public static IEnumerable <CRM_Offer> BaseSet(MainDataContext db) { return(db.CRM_Offers.Where(o => !o.IsArchived).OrderBy(c => c.Name)); }
public static IEnumerable <CRM_KeyStage> BaseSet(MainDataContext db) { return(db.CRM_KeyStages.Where(c => !c.IsArchived).OrderBy(o => o.OrderNo)); }
public string ConstituentTypeOutput(MainDataContext db, string seperator) { return(CRM.Code.Helpers.JSONSet.FlattenList(this.ConstituentTypes(db).ToList(), seperator)); }
public static IEnumerable <CRM_FundraisingReason> BaseSet(MainDataContext db) { return(db.CRM_FundraisingReasons.Where(c => !c.IsArchived).OrderBy(c => c.OrderNo)); }
public static IEnumerable <CRM_Family> BaseSet(MainDataContext db) { return(db.CRM_Families); }
public static IEnumerable <CRM_SchoolType> BaseSet(MainDataContext db) { return(db.CRM_SchoolTypes.OrderBy(o => o.OrderNo)); }
public static IEnumerable <CRM_PaymentType> BaseSet(MainDataContext db) { return(db.CRM_PaymentTypes.Where(c => !c.IsArchived).OrderBy(c => c.OrderNo)); }
public static IEnumerable <CRM_FundraisingSplit> BaseSet(MainDataContext db) { return(db.CRM_FundraisingSplits.Where(r => !r.CRM_Fundraising.IsArchived).OrderByDescending(c => c.ID)); }
public static IQueryable <CRM_RelationCode> BaseSet(MainDataContext db) { return(from p in db.CRM_RelationCodes orderby p.Name select p); }
public void DeleteFromDatabase(MainDataContext db, Models.Admin AdminUser) { CRM.Code.History.History.RecordLinqDelete(AdminUser, this); db.CRM_CalendarVenues.DeleteOnSubmit(this); db.SubmitChanges(); }
public static IEnumerable <CRM_Calendar> BaseSet(MainDataContext db) { return(db.CRM_Calendars); }
public static IEnumerable <CRM_OrganisationType> BaseSet(MainDataContext db) { return(db.CRM_OrganisationTypes.Where(o => o.IsActive && !o.IsArchived).OrderBy(o => o.Name)); }
public static IEnumerable <CRM_Organisation> BaseSet(MainDataContext db) { return(db.CRM_Organisations); }
public static IEnumerable <CRM_Person> BaseSet(MainDataContext db) { return(db.CRM_Persons.Where(r => !r.IsArchived)); }
public static IEnumerable <CRM_Role> BaseSet(MainDataContext db) { return(db.CRM_Roles.OrderBy(c => c.Name)); }
public static IEnumerable <CRM_LEA> BaseSet(MainDataContext db) { return(db.CRM_LEAs.OrderBy(o => o.Name)); }