Exemplo n.º 1
0
        /// <summary>
        /// Processes any page data via workflow
        /// </summary>
        public override async Task <WorkerResult> Process(object sender, RoutedEventArgs e)
        {
            var returnValue = new WorkerResult();

            bool success = await MyViewModel.DeleteAsync();

            BindModel(MyViewModel.MyModel);
            if (success == false)
            {
                returnValue.FailedRules.Add("1026", "Failed to delete");
            }

            return(returnValue);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Processes any page data via workflow
        /// </summary>
        public override async Task <WorkerResult> Process()
        {
            var returnValue = new WorkerResult();

            MyViewModel.MyModel = await MyViewModel.DeleteAsync(MyViewModel.MyModel);

            BindModel(MyViewModel.MyModel);
            if (!MyViewModel.MyModel.IsNew)
            {
                returnValue.FailedRules.Add("1026", "Failed to delete");
            }

            return(returnValue);
        }