예제 #1
0
        public ActionResult LargeForm()
        {
            var model = new LargeFormInputModel
            {
                ChangePasswordOptions = ChangePasswordOption.All
            };

            return(View(model));
        }
예제 #2
0
        public IActionResult SaveForm(LargeFormInputModel input)
        {
            var outcome = (DateTime.Now.Second % 2) > 0;

            if (outcome)
            {
                return(Json(CommandResponse.Ok.AddMessage("Operation completed successfully")));
            }
            return(Json(CommandResponse.Fail.AddMessage("Couldn't complete the operation")));
        }
예제 #3
0
        public ActionResult LargeForm(LargeFormInputModel input)
        {
            // Do some work
            Thread.Sleep(2000);

            // Now return
            var success = DateTime.Now.Second % 2;

            if (success > 0)
            {
                return(Json(CommandResponse.Ok.AddMessage(Strings_UI.Generic_OperationSuccess)));
            }
            return(Json(CommandResponse.Fail.AddMessage(Strings_UI.Generic_OperationFailure)));
        }