예제 #1
0
        public UnavailableDate UnavailableDateByUnavailableDateId(int unavailableDateId)
        {
            UnavailableDate ud = (from u in repository.UnavailableDates
                                  where u.Id == unavailableDateId
                                  select u).Single();

            return(ud);
        }
예제 #2
0
        public void DeleteUnavailableDate(DateTime date, int memberId)
        {
            List <UnavailableDate> ud  = UnavailableDateByMemberId(memberId);
            UnavailableDate        ud1 = (from u in ud
                                          where u.DateUnavailable == date
                                          select u).Single();

            repository.UnavailableDates.Remove(ud1);
            repository.SaveChanges();
        }
예제 #3
0
        public UnavailableDate UpdateUnavailableDate(int unavailableDateId, int memberId, DateTime dateUnavailable, string reason, bool meetingCancelled)
        {
            UnavailableDate ud = UnavailableDateByUnavailableDateId(unavailableDateId);

            ud.MemberId         = memberId;
            ud.DateUnavailable  = dateUnavailable;
            ud.Reason           = reason;
            ud.MeetingCancelled = meetingCancelled;
            ud.UpdateDate       = DateTime.Now;

            repository.SaveChanges();
            return(ud);
        }
예제 #4
0
        public UnavailableDate CreateUnavailableDate(int memberId, DateTime dateUnavailable, string reason)
        {
            UnavailableDate ud = new UnavailableDate();

            ud.MemberId        = memberId;
            ud.DateUnavailable = dateUnavailable;
            ud.Reason          = reason;
            ud.CreateDate      = DateTime.Now;

            repository.UnavailableDates.Add(ud);
            repository.SaveChanges();
            return(ud);
        }
예제 #5
0
        public UnavailableDate CreateUnavailableDate(int memberId, DateTime dateUnavailable, bool meetingCancelled, string reason, int congregationId)
        {
            UnavailableDate ud = new UnavailableDate();

            ud.MemberId         = memberId;
            ud.DateUnavailable  = dateUnavailable;
            ud.MeetingCancelled = meetingCancelled;
            ud.CongregationId   = congregationId;
            ud.Reason           = reason;
            ud.CreateDate       = DateTime.Now;

            repository.UnavailableDates.Add(ud);
            repository.SaveChanges();
            return(ud);
        }
예제 #6
0
        public UnavailableDate CreateUnavailableDate(int memberId, DateTime dateUnavailable, bool meetingCancelled, string reason, int congregationId)
        {
            UnavailableDate ud = new UnavailableDate();
            ud.MemberId = memberId;
            ud.DateUnavailable = dateUnavailable;
            ud.MeetingCancelled = meetingCancelled;
            ud.CongregationId = congregationId;
            ud.Reason = reason;
            ud.CreateDate = DateTime.Now;

            repository.UnavailableDates.Add(ud);
            repository.SaveChanges();
            return ud;
        }
예제 #7
0
        public UnavailableDate CreateUnavailableDate(int memberId, DateTime dateUnavailable, string reason)
        {
            UnavailableDate ud = new UnavailableDate();
            ud.MemberId = memberId;
            ud.DateUnavailable = dateUnavailable;
            ud.Reason = reason;
            ud.CreateDate = DateTime.Now;

            repository.UnavailableDates.Add(ud);
            repository.SaveChanges();
            return ud;
        }