Ejemplo n.º 1
0
        public void NewArticle()
        {
            var awaiter = Article.Save().GetAwaiter();

            awaiter.OnCompleted(() =>
            {
                Dispatcher.CurrentDispatcher.Invoke(async() =>
                {
                    ((ArticleUserControl)CtrlUserControl).UnlockUserControl();

                    Article = new CtrlArticle();
                    await Article.Save();
                    CtrlValidationHelper.ApplyValidationError(Article, CtrlUserControl);
                });
            });
        }
Ejemplo n.º 2
0
        public void SaveArticle()
        {
            var awaiter = Article.Save().GetAwaiter();

            awaiter.OnCompleted(() =>
            {
                Dispatcher.CurrentDispatcher.Invoke(() =>
                {
                    CtrlValidationHelper.ApplyValidationError(Article, CtrlUserControl);
                    if (Article.IsValid())
                    {
                        ((ArticleUserControl)CtrlUserControl).LockUserControl();
                    }
                });
            });
        }