public static bool UpdateLiveMeetings(Livemeeting livemeeting) { bool result = false; try { using (var context = new INFOMATICSMEETINGContext()) { var meetingList = context.Livemeeting.First <Livemeeting>(); meetingList.LiveMeetingSubject = livemeeting.LiveMeetingSubject; meetingList.LiveMeetingAgenda = livemeeting.LiveMeetingAgenda; meetingList.LiveMeetingAttendees = livemeeting.LiveMeetingAttendees; meetingList.LiveMeetingDate = livemeeting.LiveMeetingDate; meetingList.LiveMeetingStartTime = livemeeting.LiveMeetingStartTime; meetingList.LiveMeetingEndTime = livemeeting.LiveMeetingEndTime; meetingList.ModifedBy = livemeeting.ModifedBy; meetingList.ModifiedDate = livemeeting.ModifiedDate; context.SaveChanges(); result = true; } } catch (Exception ex) { result = false; } return(result); }
public bool Delete(Livemeeting liveMeeting) { bool isDeleted = false; try { isDeleted = InfomaticsDataLayer.DBOperations.UpdateLiveMeetings(liveMeeting); } catch (Exception ex) { //write in error log } return(isDeleted); }
public int AddPost(Livemeeting livemeeting) { int livemeetingId = 0; try { livemeetingId = InfomaticsDataLayer.DBOperations.AddLiveMeetings(livemeeting); } catch (Exception ex) { // write in error log } return(livemeetingId); }
public static Livemeeting GetLivemeeting(int liveMeetingId) { Livemeeting livemeetingslist = null; try { using (var context = new INFOMATICSMEETINGContext()) { livemeetingslist = context.Livemeeting.Where(c => c.LiveMeetingId == liveMeetingId).Single(); } } catch (Exception ex) { // write in error log } return(livemeetingslist); }
public static int AddLiveMeetings(Livemeeting liveMeeting) { int liveMeetingId = 0; try { using (var context = new INFOMATICSMEETINGContext()) { context.Livemeeting.Add(liveMeeting); context.SaveChanges(); liveMeetingId = liveMeeting.LiveMeetingId; } } catch (Exception ex) { // write in error log } return(liveMeetingId); }
public ActionResult <Livemeeting> GetLiveMeeting(int liveMeetingId) { Livemeeting liveMeeting = null; try { using (var context = new INFOMATICSMEETINGContext()) { liveMeeting = InfomaticsDataLayer.DBOperations.GetLivemeeting(liveMeetingId); if (liveMeeting == null) { return(NotFound()); } } } catch (Exception ex) { // write in error log } return(liveMeeting); }
public static bool DeleteLiveMeetings(Livemeeting livemeeting) { bool result = false; try { using (var context = new INFOMATICSMEETINGContext()) { var meetingList = context.Livemeeting.First <Livemeeting>(); meetingList.DeletedBy = livemeeting.DeletedBy; meetingList.DeletedDate = livemeeting.DeletedDate; context.SaveChanges(); result = true; } } catch (Exception ex) { result = false; } return(result); }