コード例 #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 ActionResult <List <Useraccounts> > GetUsers()
 {
     using (var context = new INFOMATICSMEETINGContext())
     {
         var users = InfomaticsDataLayer.DBOperations.GetUsers();
         return(users);
     }
 }
コード例 #3
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);
        }
コード例 #4
0
        public static List <Livemeeting> GetLivemeetings()
        {
            List <Livemeeting> livemeetingslist = null;

            try
            {
                using (var context = new INFOMATICSMEETINGContext())
                {
                    livemeetingslist = context.Livemeeting.ToList();
                }
            }
            catch (Exception ex)
            {
                // write in error log
            }
            return(livemeetingslist);
        }
コード例 #5
0
        public static List <Useraccounts> GetUsers()
        {
            List <Useraccounts> users = null;

            try
            {
                using (var context = new INFOMATICSMEETINGContext())
                {
                    users = context.Useraccounts.ToList();
                }
            }
            catch (Exception ex)
            {
                // write in error log
            }
            return(users);
        }
コード例 #6
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);
        }
コード例 #7
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);
        }
コード例 #8
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);
        }
コード例 #9
0
        public ActionResult <List <Livemeeting> > GetLiveMeetingDetails()
        {
            List <Livemeeting> LiveMeetingList = null;

            try
            {
                using (var context = new INFOMATICSMEETINGContext())
                {
                    LiveMeetingList = InfomaticsDataLayer.DBOperations.GetLivemeetings();
                    if (LiveMeetingList == null)
                    {
                        return(NotFound());
                    }
                }
            }
            catch (Exception ex)
            {
                // write in error log
            }
            return(LiveMeetingList);
        }