public override void ProviderLoaded(object sender, ProviderLoadedEventArgs e) { base.ProviderLoaded(sender, e); List<Course> courseList = null; switch (e.RequestCode) { case RC_GET_ALL: if (e.IsSuccess) { courseList = Parser.Serialize<List<Course>>(); } break; default: break; } if (CourseEvent != null) { CourseEventArgs courseEventArgs = new CourseEventArgs(courseList); courseEventArgs.LoadEventArgs(e); CourseEvent(this, courseEventArgs); } }
private void CourseLoadedEvent(object sender, CourseEventArgs e) { if (CourseProvider.Providers.Advance.CourseProvider.RC_CREATE == e.RequestCode && e.IsSuccess) { DialogHelper.Close(); DialogHelper.Show("成功添加课程"); DialogHelper.Dispatcher.Invoke(delegate { BackToPreviousCommand.Execute(null); }); return; } DialogHelper.Show("添加失败,请重试"); }