Beispiel #1
0
        public void GetData(int ministryID = 0)
        {
            int id = 0;

            Dictionary <string, string> StatusList;

            StatusList         = ConstantRepository.GetConstantByCategory("Status");
            ViewBag.StatusList = new SelectList(StatusList, "Key", "Value", id);

            Dictionary <int, string> MinistryMemberList;

            MinistryMemberList         = MinistryMemberRepository.GetMinistryMemberList(ministryID);
            ViewBag.MinistryMemberList = new SelectList(MinistryMemberList, "Key", "Value", id);

            Dictionary <int, string> ProgramEventList;

            ProgramEventList         = ProgramEventRepository.GetEventList();
            ViewBag.ProgramEventList = new SelectList(ProgramEventList, "Key", "Value", id);

            Dictionary <int, string> CalendarList;

            CalendarList         = CalendarRepository.GetCalendarList();
            ViewBag.CalendarList = new SelectList(CalendarList, "Key", "Value", id);

            Dictionary <int, string> MinistryList;

            MinistryList         = MinistryRepository.GetMinistryList();
            ViewBag.MinistryList = new SelectList(MinistryList, "Key", "Value", id);

            Dictionary <string, string> MeetingVenueList;

            MeetingVenueList         = ConstantRepository.GetConstantByCategory("Church Venue");
            ViewBag.MeetingVenueList = new SelectList(MeetingVenueList, "Key", "Value", id);

            Dictionary <string, string> timeIntervals = new Dictionary <string, string>();
            TimeSpan startTime = new TimeSpan(0, 0, 0);
            DateTime startDate = new DateTime(DateTime.MinValue.Ticks); // Date to be used to get shortTime format.

            for (int i = 0; i < 48; i++)
            {
                int      minutesToBeAdded = 30 * i; // Increasing minutes by 30 minutes interval
                TimeSpan timeToBeAdded    = new TimeSpan(0, minutesToBeAdded, 0);
                TimeSpan t      = startTime.Add(timeToBeAdded);
                DateTime result = startDate + t;
                timeIntervals.Add(result.ToShortTimeString(), result.ToShortTimeString());      // Use Date.ToShortTimeString() method to get the desired format
            }
            ViewBag.TimeIncrementList = new SelectList(timeIntervals, "Key", "Value", id);
        }
Beispiel #2
0
        public void GetData(int ministryID = 0)
        {
            int id = 0;

            if (ministryID > 0)
            {
                Dictionary <int, string> MinistryMemberList;
                MinistryMemberList         = MinistryMemberRepository.GetMinistryMemberList(ministryID);
                ViewBag.MinistryMemberList = new SelectList(MinistryMemberList, "Key", "Value", id);
            }

            Dictionary <string, string> StatusList;

            StatusList         = ConstantRepository.GetConstantByCategory("Meeting Status");
            ViewBag.StatusList = new SelectList(StatusList, "Key", "Value", id);

            Dictionary <int, string> MinistryList;

            if (ministryID > 0)
            {
                MinistryList = new Dictionary <int, string>();
                string MinistryName = MinistryRepository.GetMinistryByID(ministryID).MinistryName;
                MinistryList.Add(ministryID, MinistryName);
            }
            else
            {
                MinistryList = MinistryRepository.GetMinistryList();
            }
            ViewBag.MinistryList = new SelectList(MinistryList, "Key", "Value", id);

/*
 *          Dictionary<int, string> MeetingList;
 *          MeetingList = MeetingRepository.GetMeetingList();
 *          ViewBag.MeetingList = new SelectList(MeetingList, "Key", "Value", id);
 */
            Dictionary <string, string> MeetingVenueList;

            MeetingVenueList = ConstantRepository.GetConstantByCategory("Church Venue");
            // MeetingVenueList.Add("Conference Call","Conference Call");
            ViewBag.MeetingVenueList = new SelectList(MeetingVenueList, "Key", "Value", id);

            Dictionary <string, string> timeIntervals = new Dictionary <string, string>();
            TimeSpan startTime = new TimeSpan(0, 0, 0);
            DateTime startDate = new DateTime(DateTime.MinValue.Ticks); // Date to be used to get shortTime format.

            for (int i = 0; i < 48; i++)
            {
                int      minutesToBeAdded = 30 * i; // Increasing minutes by 30 minutes interval
                TimeSpan timeToBeAdded    = new TimeSpan(0, minutesToBeAdded, 0);
                TimeSpan t      = startTime.Add(timeToBeAdded);
                DateTime result = startDate + t;
                timeIntervals.Add(result.ToShortTimeString(), result.ToShortTimeString());      // Use Date.ToShortTimeString() method to get the desired format
            }
            ViewBag.TimeIncrementList = new SelectList(timeIntervals, "Key", "Value", id);
        }
Beispiel #3
0
        public ActionResult MinistryPageAdmin(int ministryID)
        {
            GetData();
            DateTime aDate = DateTime.Now;
            int      days  = aDate.DayOfYear;

            ViewBag.BeginDate = aDate.AddDays(-days + 1).ToShortDateString();
            ViewBag.EndDate   = aDate.ToShortDateString();
            ministry ministry = MinistryRepository.GetMinistryByID(ministryID);

            int id = 0;
            Dictionary <int, string> MemberRoster;

            MemberRoster         = MinistryMemberRepository.GetMinistryMemberList(ministryID);
            ViewBag.MemberRoster = new SelectList(MemberRoster, "Key", "Value", id);

            //calendar dates
            int      year        = DateTime.Now.Year;
            string   bDateString = "1/1/" + year.ToString();
            DateTime bDate       = Convert.ToDateTime(bDateString).Date;

            ViewBag.CalendarBeginDate = bDate;

            string   eDateString = "12/31/" + year.ToString();
            DateTime eDate       = Convert.ToDateTime(eDateString).Date;

            ViewBag.CalendarEndDate = eDate;


            return(PartialView(ministry));
        }
Beispiel #4
0
        public void GetData(int ministryID = 0)
        {
            int id = 0;

            Dictionary <string, string> StatusList;

            StatusList         = ConstantRepository.GetConstantByCategory("Status");
            ViewBag.StatusList = new SelectList(StatusList, "Key", "Value", id);

            Dictionary <string, string> GoalTypeList;

            GoalTypeList         = ConstantRepository.GetConstantByCategory("Goal Type");
            ViewBag.GoalTypeList = new SelectList(GoalTypeList, "Key", "Value", id);

            Dictionary <int, string> MinistryList;

            MinistryList         = MinistryRepository.GetMinistryList();
            ViewBag.MinistryList = new SelectList(MinistryList, "Key", "Value", id);

            if (ministryID > 0)
            {
                Dictionary <int, string> MinistryMemberList;
                MinistryMemberList         = MinistryMemberRepository.GetMinistryMemberList(ministryID);
                ViewBag.MinistryMemberList = new SelectList(MinistryMemberList, "Key", "Value", id);
            }

            string ratio;
            Dictionary <string, string> CompletionRatioList = new Dictionary <string, string>();

            for (int i = 0; i <= 100; i += 5)
            {
                ratio = string.Format("{0}", i);
                CompletionRatioList.Add(ratio, ratio);
            }
            ViewBag.CompletionRatioList = new SelectList(CompletionRatioList, "Key", "Value", id);

            Dictionary <string, string> CompletionRatioList2 = new Dictionary <string, string>();
            string Quarter  = "Less than Quarter";
            string Half     = "Less than Half";
            string Thirds   = "Less than Third";
            string Full     = "Less than Full";
            string Complete = "Fully Complete";

            CompletionRatioList2.Add(Quarter, Quarter);
            CompletionRatioList2.Add(Half, Half);
            CompletionRatioList2.Add(Thirds, Thirds);
            CompletionRatioList2.Add(Full, Full);
            CompletionRatioList2.Add(Complete, Complete);
            ViewBag.CompletionRatioList2 = new SelectList(CompletionRatioList2, "Key", "Value", id);
        }
Beispiel #5
0
        public ActionResult AddAgenda(int MeetingID)
        {
            ViewBag.MeetingID = MeetingID;



            string code = string.Format("MeetingIDTask={0}", MeetingID);

            ViewBag.TaskActionItemCode = code;
            code = string.Format("MeetingIDAgenda={0}", MeetingID);
            ViewBag.AgendaActionItemCode = code;
            IEnumerable <task> ActionItems = ActionItemRepository.GetActionItemTaskList(code);

            ViewBag.ActionItems           = ActionItems;
            ViewBag.ActionItemRecordCount = ActionItems.Count();

            meeting meeting = MeetingRepository.GetMeetingByID(MeetingID);

            ViewBag.Heading = meeting.Title;

            int id = 0;
            Dictionary <int, string> GoalList;

            GoalList         = GoalRepository.GetGoalList(meeting.ministryID);
            ViewBag.GoalList = new SelectList(GoalList, "Key", "Value", id);

            Dictionary <int, string> MemberRoster;

            MemberRoster         = MinistryMemberRepository.GetMinistryMemberList(meeting.ministryID);
            ViewBag.MemberRoster = new SelectList(MemberRoster, "Key", "Value", id);

            ViewBag.CalendarID = meeting.CalendarID;


            return(PartialView());
        }