예제 #1
0
        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[] { }
            };
        }
    }
예제 #2
0
 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);
 }
예제 #4
0
 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);
 }
예제 #6
0
 public static IEnumerable <CRM_Communication> BaseSet(MainDataContext db)
 {
     return(db.CRM_Communications);
 }
예제 #7
0
 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));
 }
예제 #9
0
 public static IEnumerable <CRM_PersonSchool> BaseSet(MainDataContext db)
 {
     return(CRM_Person.BaseSet(db).SelectMany(c => c.CRM_PersonSchools));
 }
예제 #10
0
 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));
 }
예제 #14
0
 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));
 }
예제 #19
0
 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);
 }
예제 #21
0
 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);
 }
예제 #23
0
 public static IEnumerable <CRM_OrganisationType> BaseSet(MainDataContext db)
 {
     return(db.CRM_OrganisationTypes.Where(o => o.IsActive && !o.IsArchived).OrderBy(o => o.Name));
 }
예제 #24
0
 public static IEnumerable <CRM_Organisation> BaseSet(MainDataContext db)
 {
     return(db.CRM_Organisations);
 }
예제 #25
0
 public static IEnumerable <CRM_Person> BaseSet(MainDataContext db)
 {
     return(db.CRM_Persons.Where(r => !r.IsArchived));
 }
예제 #26
0
 public static IEnumerable <CRM_Role> BaseSet(MainDataContext db)
 {
     return(db.CRM_Roles.OrderBy(c => c.Name));
 }
예제 #27
0
 public static IEnumerable <CRM_LEA> BaseSet(MainDataContext db)
 {
     return(db.CRM_LEAs.OrderBy(o => o.Name));
 }