// return true if NOT already on Hearing, Mediation, Appeals or Retrenchment protected Boolean notHMARChecker(Faculty user, Election election) { FacultySenateDBEntities db = new FacultySenateDBEntities(); if ((from mem in db.CommitteeMembers where mem.Id == user.Id && election.TermStartDate < mem.EndDate && (mem.CommitteeSeat.Committee.Name == "Faculty Hearing Committee" || mem.CommitteeSeat.Committee.Name == "Faculty Mediation Committee" || mem.CommitteeSeat.Committee.Name == "Retrenchment Appeals Committee" || mem.CommitteeSeat.Committee.Name == "Faculty Retrenchment Committee") select mem).Count() >= 1) { return(false); } return(true); }
protected Boolean notHMARChecker(Faculty user, Election election, List <String> reasons) { FacultySenateDBEntities db = new FacultySenateDBEntities(); if ((from mem in db.CommitteeMembers where mem.Id == user.Id && election.TermStartDate < mem.EndDate && (mem.CommitteeSeat.Committee.Name == "Faculty Hearing Committee" || mem.CommitteeSeat.Committee.Name == "Faculty Mediation Committee" || mem.CommitteeSeat.Committee.Name == "Retrenchment Appeals Committee" || mem.CommitteeSeat.Committee.Name == "Faculty Retrenchment Committee") select mem).Count() >= 1) { reasons.Add("May not serve concurrently on Hearing, Mediation, Retrenchment, and/or Appeals"); return(false); } return(true); }
public override Boolean getEligibility(Faculty user, Election election) { if (user.Tenure != true) { FacultySenateDBEntities db = new FacultySenateDBEntities(); if ((from mem in db.CommitteeMembers where mem.CommitteeSeat.Committee.Name == "Retrenchment Appeals Committee" && election.TermStartDate < mem.EndDate && mem.Faculty.Tenure == true select mem).Count() < 3) { return(false); } } if (!notHMARChecker(user, election)) { return(false); } return(true); }