示例#1
0
        public override void ProviderLoaded(object sender, ProviderLoadedEventArgs e)
        {
            base.ProviderLoaded(sender, e);

            List<Attendance> attendanceList = null;

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

            if (AbsenceEvent != null)
            {
                AttendanceEventArgs eventArgs = new AttendanceEventArgs(attendanceList);
                eventArgs.LoadEventArgs(e);

                AbsenceEvent(this, eventArgs);
            }
        }
 public void AttendanceLoadedEvent(object sender, AttendanceEventArgs e)
 {
     if (e.IsSuccess)
     {
         switch (e.RequestCode)
         {
             case AttendanceProvider.RC_GET_ALL:
                 AttendanceList = e.AttendanceList != null ? new ObservableCollection<Attendance>(e.AttendanceList) : null;
                 break;
             default:
                 break;
         }
     }
 }