示例#1
0
文件: Notes.cs 项目: MestlZZ/awabi
 public void Update( Note note )
 {
     if (note == null)
         return;
     db.Entry( note ).State = EntityState.Modified;
     db.SaveChanges();
 }
示例#2
0
 public static bool IsInBase( Note note )
 {
     IList<UniversityInfo> univers = UniversityBusiness.GetListUniversityInfo( note.UniversityID );
     if (univers.Count > 0)
         return true;
     return false;
 }
示例#3
0
 public static void Add(Note note)
 {
     if (note != null)
     {
         Notes db = new Notes();
         db.Save( note );
     }
 }
示例#4
0
文件: Notes.cs 项目: MestlZZ/awabi
 public void Save( Note note )
 {
     if (note == null)
         return;
         note.Id = GetLastId();
         db.Notes.Add( note );
         db.SaveChanges();
 }
示例#5
0
 public ActionResult UpdateInfo( Note note )
 {
     if (note.ExpensesTravel != 0 && note.ExpensesFood != 0)
         if (ModelState.IsValid)
         {
             NotesBusiness.Add( note );
         }
     return View();
 }
示例#6
0
 public ActionResult StudentPage(Note note)
 {
     ViewBag.Title = "Відправка форми";
     note.MinimalTaitionFee = note.MaximalTaitionFee;
     if(note.ExpensesTravel != 0 && note.ExpensesFood !=0)
         if (ModelState.IsValid)
         {
             if(NotesBusiness.IsInBase( note ) == false)
                 NotesBusiness.Add(note);
             return RedirectToAction( "Success", new { Id = note.UniversityID } );
         }
     return View();
 }
示例#7
0
文件: Notes.cs 项目: MestlZZ/awabi
 public Note IsInBase( Note note )
 {
     return db.Notes.Find( note );
 }