public SimpleAjaxResult Ready() { var user = this.SecurityHelper.GetCurrentUser().CurrentUser as ShopUser; var rollback = RollbackService.GetById(Id); try { var cmd = new DeleteRollbackCommand(this.Id); UnityContainer.BuildUp(cmd); cmd.Execute(user); return(new SimpleAjaxResult()); } catch (Exception ex) { return(new SimpleAjaxResult(ex.Message)); } }
public void Ready() { _hasError = true; Rollback = RollbackService.GetById(Id); State = ModelHelper.GetBoundText(Rollback, x => x.State); var currentUser = SecurityHelper.GetCurrentUser().CurrentUser; var shop = ShopService.GetById(Rollback.ShopId); var shopDealLog = ShopDealLogService.GetById(Rollback.ShopDealLogId); this.SubmitTime = Rollback.SubmitTime; this.DealSubmitTime = shopDealLog.SubmitTime; this.Amount = shopDealLog.Amount; this.AccountName = shopDealLog.AccountName; this.PosName = shopDealLog.SourcePosName; this.ShopName = shop.Name; this.ShopDisplayName = shop.DisplayName; SerialServerNo = shopDealLog.SerialServerNo; DealType = ModelHelper.GetBoundText(shopDealLog, x => DealType); _hasError = false; }