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

            MyViewModel.MyModel = await MyViewModel.CreateAsync();

            BindModel(MyViewModel.MyModel);
            if (MyViewModel.MyModel.ID == TypeExtension.DefaultInteger)
            {
                returnValue.FailedRules.Add("1025", "Failed to create");
            }

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

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

            BindModel(MyViewModel.MyModel);
            if (MyViewModel.MyModel.IsNew)
            {
                returnValue.FailedRules.Add("1025", "Failed to create");
            }

            return(returnValue);
        }