コード例 #1
0
ファイル: RollbackController.cs プロジェクト: a864610877/src
        public ActionResult Delete([Bind(Prefix = "Item")] DeleteRollback model)
        {
            var result = model.Ready();

            IMessageProvider msg = null;

            if (!result.Success)
            {
                var vm = _unityContainer.Resolve <RollbackModel>();
                vm.Id = model.Id;
                vm.Ready();

                msg = new SimpleMessageProvider(MessageType.Error, new[] { result.Message });
                return(View("view", new EcardModelItem <RollbackModel>(vm, msg)));
            }
            else
            {
                return(RedirectToAction("List"));
            }
        }
コード例 #2
0
 public ActionResult DeleteRollback(DeleteRollback model)
 {
     return(Json(model.Ready(), JsonRequestBehavior.AllowGet));
 }