示例#1
0
        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);
        }
示例#2
0
        public bool Delete(Livemeeting liveMeeting)
        {
            bool isDeleted = false;

            try
            {
                isDeleted = InfomaticsDataLayer.DBOperations.UpdateLiveMeetings(liveMeeting);
            }
            catch (Exception ex)
            {
                //write in error log
            }
            return(isDeleted);
        }
示例#3
0
        public int AddPost(Livemeeting livemeeting)
        {
            int livemeetingId = 0;

            try
            {
                livemeetingId = InfomaticsDataLayer.DBOperations.AddLiveMeetings(livemeeting);
            }
            catch (Exception ex)
            {
                // write in error log
            }
            return(livemeetingId);
        }
示例#4
0
        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);
        }
示例#5
0
        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);
        }
示例#6
0
        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);
        }
示例#7
0
        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);
        }