Пример #1
0
        // GET: Dashboard
        public ActionResult Index()
        {
            DashboardDto dashboard = new DashboardDto();

            WCFProxy.Using((delegate(IDashboardService client)
            {
                dashboard = client.getDashboard();
            }));
            return(View(dashboard));
        }
Пример #2
0
        public ActionResult SubmitEvent(EventsDto eventDto)
        {
            MessageDTO message = new MessageDTO();

            WCFProxy.Using((delegate(IEventsAndNewsService client)
            {
                message = client.addUpdateEvents(eventDto);
            }));

            return(Json(message.message, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        public ActionResult TodayAttendance()
        {
            List <ClassAttendanceDto> classAttendance = new List <ClassAttendanceDto>();

            WCFProxy.Using((delegate(IAttendanceService client)
            {
                classAttendance = client.getClassAttendence(0, 0);
            }));

            return(View(classAttendance));
        }
Пример #4
0
        public ActionResult SubmitHoliday(HolidaysDto holiday)
        {
            MessageDTO message = new MessageDTO();

            WCFProxy.Using((delegate(IClassSetupService client)
            {
                message = client.addUpdateHolidayDetail(holiday);
            }));

            return(Json(message.message, JsonRequestBehavior.AllowGet));
        }
Пример #5
0
        public ActionResult SubmitExamTimeTable(ExamTimeTableDto examTimeTable)
        {
            MessageDTO message = new MessageDTO();

            WCFProxy.Using((delegate(IClassSetupService client)
            {
                message = client.addUpdateExamTimeTable(examTimeTable);
            }));

            return(Json(message.message, JsonRequestBehavior.AllowGet));
        }
Пример #6
0
        public ActionResult SubmitStudent(StudentDto student)
        {
            MessageDTO message = new MessageDTO();

            WCFProxy.Using((delegate(IClassSetupService client)
            {
                message = client.addUpdateStudentDetail(student);
            }));

            return(Json(message.message, JsonRequestBehavior.AllowGet));
        }
Пример #7
0
        public ActionResult SubmitDivision(ClassRoomDto divisions)
        {
            MessageDTO message = new MessageDTO();

            WCFProxy.Using((delegate(IClassSetupService client)
            {
                message = client.addUpdateStandrdDivision(divisions);
            }));

            return(Json(message.message, JsonRequestBehavior.AllowGet));
        }
Пример #8
0
        public ActionResult ExamTimeTable()
        {
            Pagination paginateModel = new Pagination()
            {
                PageNumber = 1, PageSize = 500, Skip = 0, SortColumn = "", TotalCount = 0
            };
            ClassRoomCollection classRoomsCollection = new ClassRoomCollection();

            WCFProxy.Using((delegate(IClassSetupService client)
            {
                classRoomsCollection = client.getStandardDivision(null, null, 1, paginateModel);
            }));
            ViewBag.SchoolId  = 1;
            ViewBag.ClassList = classRoomsCollection.ClassRoom;
            ExamTimeTableDto examTimeTableDto = new ExamTimeTableDto();

            return(View(examTimeTableDto));
        }
Пример #9
0
        public JsonResult GetEvents(DataTableAjaxPostModel model)
        {
            Pagination paginateModel = model.ToPagination();
            int        recordsTotal  = 0;

            List <EventsDto> eventsCollection = new List <EventsDto>();

            WCFProxy.Using((delegate(IEventsAndNewsService client)
            {
                eventsCollection = client.getEvents(1, paginateModel, out recordsTotal);
            }));

            return(Json(new
            {
                // this is what datatables wants sending back
                draw = model.draw,
                recordsTotal = recordsTotal,
                recordsFiltered = recordsTotal,
                data = eventsCollection
            }, JsonRequestBehavior.AllowGet));
        }
Пример #10
0
        public JsonResult GetStudents(DataTableAjaxPostModel model)
        {
            Pagination        paginateModel     = model.ToPagination();
            int               recordsTotal      = 0;
            StudentCollection studentCollection = new StudentCollection();

            WCFProxy.Using((delegate(IClassSetupService client)
            {
                studentCollection = client.getStudent(1, 1, paginateModel);
            }));

            recordsTotal = studentCollection.TotalCount;
            var data = studentCollection.StudentList.Skip(paginateModel.Skip).Take(paginateModel.PageSize).ToList();

            return(Json(new
            {
                // this is what datatables wants sending back
                draw = model.draw,
                recordsTotal = recordsTotal,
                recordsFiltered = recordsTotal,
                data = data
            }, JsonRequestBehavior.AllowGet));
        }
Пример #11
0
        public JsonResult GetHolidays(DataTableAjaxPostModel model)
        {
            Pagination         paginateModel = model.ToPagination();
            int                recordsTotal  = 0;
            List <HolidaysDto> holidaysList  = new List <HolidaysDto>();

            WCFProxy.Using((delegate(IClassSetupService client)
            {
                holidaysList = client.getHolidayDetail(1);
            }));

            recordsTotal = holidaysList.Count();
            var data = holidaysList.Skip(paginateModel.Skip).Take(paginateModel.PageSize).ToList();

            return(Json(new
            {
                // this is what datatables wants sending back
                draw = model.draw,
                recordsTotal = recordsTotal,
                recordsFiltered = recordsTotal,
                data = data
            }, JsonRequestBehavior.AllowGet));
        }