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

            return(ud);
        }
Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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;
        }
Esempio n. 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;
        }