public ActionResult Delete(DeleteLiquidate model) { SimpleAjaxResult result = model.Ready(); IMessageProvider msg = null; if (!result.Success) { var vm = _unityContainer.Resolve <LiquidateModel>(); vm.Id = model.Id; vm.Ready(); msg = new SimpleMessageProvider(MessageType.Error, new[] { result.Message }); return(View("view", new EcardModelItem <LiquidateModel>(vm, msg))); } else { return(RedirectToAction("List")); } }
public ActionResult Done([Bind(Prefix = "Item")] DoneLiquidate model) { SimpleAjaxResult result = model.Ready(); var vm = _unityContainer.Resolve <LiquidateModel>(); vm.Id = model.LiquidateId; vm.Ready(); IMessageProvider msg = null; if (!result.Success) { msg = new SimpleMessageProvider(MessageType.Error, new[] { result.Message }); return(View("view", new EcardModelItem <LiquidateModel>(vm, msg))); } else { msg = new SimpleMessageProvider(MessageType.Message, new[] { "结算成功" }); return(View("view", new EcardModelItem <LiquidateModel>(vm, msg))); } }