Beispiel #1
0
        public ActionResult AddMitingEntry(MitingEntry data, int DiaryId)
        {
            EntryManager entry = new EntryManager(_context);

            data.ID = 0;
            entry.AddEntry(data, DiaryId);
            return(RedirectToAction("Show_Entry", new { ID = DiaryId }));
        }
Beispiel #2
0
 public ActionResult Edit_Miting_Entry(MitingEntry data, int DiaryID)
 {
     _context.MitingEntries.Find(data.ID).Name        = data.Name;
     _context.MitingEntries.Find(data.ID).Description = data.Description;
     _context.MitingEntries.Find(data.ID).Time        = data.Time;
     _context.MitingEntries.Find(data.ID).Place       = data.Place;
     _context.SaveChanges();
     return(RedirectToAction("Show_Entry", new { ID = DiaryID }));
 }
Beispiel #3
0
 public void AddEntry(MitingEntry entry, int IdDiary)
 {
     entry.Type = "Edit_Miting_Entry";
     _context.MitingEntries.Add(entry);
     _context.SaveChanges();
     _context.Entries.Add(new EntriesBelonging {
         Type = 2, EntryID =
             _context.MitingEntries.ToList().Last().ID, DiaryID = IdDiary
     });
     _context.SaveChanges();
 }