public static void Add(Note note) { if (note != null) { Notes db = new Notes(); db.Save( note ); } }
public static IList<Note> GetListFromUniversity(string univerId) { Notes db = new Notes(); var notes = db.GetList(); System.Collections.Generic.List<Note> uNotes = new System.Collections.Generic.List<Note>(); foreach (var note in notes) { if (note.UniversityID == univerId) { uNotes.Add(note); } } return uNotes; }
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; }
public static void WorkWithNote() { Notes db = new Notes(); var notes = GetList(); foreach (var note in notes) { note.MaximalTaitionFee = Math.Round( note.MaximalTaitionFee, 2 ); note.MinimalTaitionFee = Math.Round( note.MinimalTaitionFee, 2 ); db.Update(note); } }
public static IList<Note> GetList() { Notes db = new Notes(); return db.GetList(); }
public static Note Get(string id) { Notes db = new Notes(); return db.Get(id); }
public static void Delete(string id) { Notes db = new Notes(); db.Delete(id); }