Esempio n. 1
0
        public async void SetCurrentJournal(int exam_date_id, Action <Fault> complete)
        {
            CurrentJournal    = ListJournals.Where(x => x.exam_date_id == exam_date_id).SingleOrDefault();
            ListPPEForJournal = new ObservableCollection <PPE>(ListPPE.Where(x => x.class_num == CurrentJournal.class_number));
            TaskResult res = await UpdateCurrentJournalContent(exam_date_id);

            complete(res.fault);
        }
Esempio n. 2
0
        public Task <TaskResult> SetCurrentListPPEExam(int exam_date_id)
        {
            Task <TaskResult> res = null;

            res = ServiceRunTask(service =>
            {
                int area_id = -1;
                if (isUserMOUO)
                {
                    area_id = (int)user_info.area_id;
                }
                CurrentListPPEExam = new ObservableCollection <PPEExam>(
                    from p in service.GetListPPEExam(exam_date_id, area_id)
                    orderby p.area_id, p.ppe_code
                    select p);
                CurrentJournalForPPE = ListJournals.Where(x => x.exam_date_id == exam_date_id).SingleOrDefault();
                CurrentPPEJournal    = ListJournals.Where(x => x.exam_date_id == exam_date_id).SingleOrDefault();
                return(CurrentListPPEExam);
            });
            return(res);
        }