Ejemplo n.º 1
0
 public ActionResult Edit(Meeting meeting)
 {
     if (ModelState.IsValid)
     {
         _meetingsService.Update(meeting);
         return RedirectToAction("Index");
     }
     return View(meeting);
 }
Ejemplo n.º 2
0
        public MeetingDto CreateMeetingDto(Meeting meeting)
        {
            var resultDto = new MeetingDto
                                {
                                    Id = meeting.Id,
                                    Title = meeting.Title,
                                    Notes = meeting.Notes,
                                    Location = meeting.Location,
                                    SpeakerName = meeting.SpeakerName,
                                    SpeakerBioLink = meeting.SpeakerBioLink,
                                    MeetingStartTime = meeting.StartDateTime.ToString(CultureInfo.CurrentCulture),
                                    MeetingEndTime = meeting.EndDateTime.ToString(CultureInfo.CurrentCulture)
                                };

            return resultDto;
        }
Ejemplo n.º 3
0
 public Meeting Update(Meeting meeting)
 {
     _context.Entry(meeting).State = EntityState.Modified;
     _context.SaveChanges();
     return meeting;
 }
Ejemplo n.º 4
0
 public Meeting Add(Meeting newMeeting)
 {
     _context.Meetings.Add(newMeeting);
     _context.SaveChanges();
     return newMeeting;
 }