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

            List<Absence> absenceList = null;

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

            if (AbsenceEvent != null)
            {
                AbsenceEventArgs eventArgs = new AbsenceEventArgs(absenceList);
                eventArgs.LoadEventArgs(e);

                AbsenceEvent(this, eventArgs);
            }
        }
        public void AbsenceLoadedEvent(object sender, AbsenceEventArgs e)
        {
            if (AbsenceProvider.RC_CREATE == e.RequestCode && e.IsSuccess)
            {
                DialogHelper.Close();

                DialogHelper.Show("请假条已成功提交");

                DialogHelper.Dispatcher.Invoke(delegate
                {
                    BackToPreviousCommand.Execute(null);
                });

                return;
            }

            DialogHelper.Show("添加失败,请重试");
        }
 public void AbsenceLoadedEvent(object sender, AbsenceEventArgs e)
 {
     if (e.IsSuccess)
     {
         switch (e.RequestCode)
         {
             case AbsenceProvider.RC_GET_ALL:
                 NormalAbsenceList = e.AbsenceList != null ? new ObservableCollection<Absence>(e.AbsenceList) : null;
                 break;
             case AbsenceProvider.RC_GET_ALL_CHANGEABLE:
                 ChangeableAbsenceList = e.AbsenceList != null ? new ObservableCollection<Absence>(e.AbsenceList) : null;
                 break;
             case AbsenceProvider.RC_CREATE:
                 DialogHelper.Dispatcher.Invoke(delegate
                 {
                     GetAllChangeableAbsence();
                 });
                 break;
             default:
                 break;
         }
     }
 }