Esempio n. 1
0
 public static void Add(Note note)
 {
     if (note != null)
     {
         Notes db = new Notes();
         db.Save( note );
     }
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
0
 public static IList<Note> GetList()
 {
     Notes db = new Notes();
     return db.GetList();
 }
Esempio n. 6
0
 public static Note Get(string id)
 {
     Notes db = new Notes();
     return db.Get(id);
 }
Esempio n. 7
0
 public static void Delete(string id)
 {
     Notes db = new Notes();
     db.Delete(id);
 }