public static string GetStateNameFromUniversity(string id) { var univers = UniversityBusiness.Get(id); if (univers == null) { return(null); } var state = GetState(univers.StateID); return(state.Name); }
public static IList <Note> GetListFromState(string stateId) { Notes db = new Notes(); var notes = db.GetList(); System.Collections.Generic.List <Note> uNotes = new System.Collections.Generic.List <Note>(); University univer; foreach (var note in notes) { univer = UniversityBusiness.Get(note.UniversityID); if (univer.StateID == stateId) { uNotes.Add(note); } } return(uNotes); }