Beispiel #1
0
        public async Task <IActionResult> GetAll()
        {
            var worships = await _worshipData.GetWorships();

            var worshipType = await _codeMasterData.GetCodeList("WORSHIP_TYPE");

            worships.ForEach(x =>
            {
                x.WORSHIP_NAME = worshipType.Where(n => x.WORSHIP_TYPE == n.CODE_ID).FirstOrDefault()?.CODE_DESCR;
            });
            //return View(worships);
            return(Json(new { data = worships }));
        }
Beispiel #2
0
        public async Task <IActionResult> AttendanceList(string worshipId)
        {
            var attendanceList = new AttendanceListModel();
            var attendance     = await _attendanceData.GetAttendanceByWorship(worshipId);

            var worship = await _worshipData.GetWorshipById(worshipId);

            var worshipType = await _codeMasterData.GetCodeList("WORSHIP_TYPE");

            worship.WORSHIP_NAME = worshipType.Where(n => worship.WORSHIP_TYPE == n.CODE_ID).FirstOrDefault()?.CODE_DESCR;

            attendanceList.AttendanceList = attendance;
            attendanceList.Worship        = worship;

            return(Json(new { data = attendanceList }));
        }
Beispiel #3
0
        public async Task <IActionResult> Index()
        {
            var members = await _memberData.GetMembers();

            var groupType = await _codeMasterData.GetCodeList("GROUP_CD");

            var teamType = await _codeMasterData.GetCodeList("TEAM_CD");

            members.ForEach(x =>
            {
                x.GROUP_NAME = groupType.Where(g => x.GROUP_CD == g.CODE_ID).FirstOrDefault()?.CODE_DESCR;
                x.TEAM_NAME  = teamType.Where(t => x.TEAM_CD == t.CODE_ID).FirstOrDefault()?.CODE_DESCR;
            });
            return(View(members));
        }
Beispiel #4
0
        public async Task <IActionResult> Index(string categoryId)
        {
            var codeList = await _codeMasterData.GetCodeList(categoryId);

            return(View(codeList));
        }