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