public override void ProviderLoaded(object sender, ProviderLoadedEventArgs e)
        {
            base.ProviderLoaded(sender, e);

            List<CourseAttendance> courseAttendanceList = null;

            if (e.IsSuccess)
            {
                switch (e.RequestCode)
                {
                    case RC_GET_ALL:
                        courseAttendanceList = Parser.SerializeList<CourseAttendance>();
                        break;
                    default:
                        break;
                }
            }

            if (CourseAbsenceEvent != null)
            {
                CourseAttendanceEventArgs eventArgs = new CourseAttendanceEventArgs(courseAttendanceList);
                eventArgs.LoadEventArgs(e);

                CourseAbsenceEvent(this, eventArgs);
            }
        }
Esempio n. 2
0
 public void CourseAttendanceLoadedEvent(object sender, CourseAttendanceEventArgs e)
 {
     if (e.IsSuccess)
     {
         switch (e.RequestCode)
         {
             case AttendanceProvider.RC_GET_ALL:
                 CourseAttendanceList = e.CourseAttendanceList != null ?
                     new ObservableCollection<CourseAttendance>(e.CourseAttendanceList) : null;
                 break;
             default:
                 break;
         }
     }
 }
        public void CourseAttendancetLoadedEvent(object sender, CourseAttendanceEventArgs e)
        {
            DialogHelper.Close();

            if (e.IsSuccess)
            {
                (Parent.ViewModel as AttendanceViewModel).GetAllCourseAttendance();

                DialogHelper.Show("考勤已创建");
                DialogHelper.Dispatcher.Invoke(delegate
                {
                    BackToPreviousCommand.Execute(null);
                });
            }
        }