public NRestResult <UserCreditBalance> SaveUserCreditBalance(UserCreditBalance value) { NRestResult <UserCreditBalance> ret; NRestClient client = NRestClient.CreateLocalClient(); if (null == client) { ret = new NRestResult <UserCreditBalance>(); ret.RestInvalidConfig(); return(ret); } if (null != value) { ret = client.Execute <UserCreditBalance>( RouteConsts.Credit.SaveUserCreditBalance.Url, value); } else { ret = new NRestResult <UserCreditBalance>(); ret.ParameterIsNull(); ret.data = null; } return(ret); }
public void Setup(TSB tsb, UserCreditBalance credit) { manager.Setup(tsb, credit); if (manager.UserBalance.UserCreditId == 0) { panelSearch.Visibility = Visibility.Visible; } else { panelSearch.Visibility = Visibility.Collapsed; } LoadPlazaGroups(); this.DataContext = manager.UserBalance; manager.UserBalance.Description = "ยอดยืมปัจจุบัน"; manager.UserBalance.HasRemark = false; manager.Transaction.Description = "ยืมเงิน"; manager.ResultBalance.Description = "ยอดด่านคงเหลือ"; manager.ResultBalance.HasRemark = false; srcEntry.DataContext = manager.UserBalance; usrEntry.DataContext = manager.Transaction; sumEntry.DataContext = manager.ResultBalance; }
public void Setup(TSB tsb, UserCreditBalance credit) { manager.Setup(tsb, credit); this.DataContext = manager.UserBalance; if (null != manager.UserBalance) { manager.UserBalance.Description = manager.UserBalance.FullNameTH; manager.UserBalance.HasRemark = false; manager.Transaction.Description = "คืนเงิน"; } srcEntry.DataContext = manager.UserBalance; usrEntry.DataContext = manager.Transaction; }
public NDbResult <List <UserCreditBalance> > GetActiveUserCreditBalances([FromBody] TSB value) { NDbResult <List <UserCreditBalance> > result; if (null == value) { result = new NDbResult <List <UserCreditBalance> >(); result.ParameterIsNull(); } else { result = UserCreditBalance.GetActiveUserCreditBalances(value); } return(result); }
public NDbResult <UserCreditBalance> SaveUserCreditBalance( [FromBody] UserCreditBalance value) { NDbResult <UserCreditBalance> result; if (null == value) { result = new NDbResult <UserCreditBalance>(); result.ParameterIsNull(); } else { result = UserCreditBalance.SaveUserCreditBalance(value); } return(result); }
public NDbResult <UserCreditBalance> GetNoRevenueEntryUserCreditBalanceById( [FromBody] Search.UserCredits.GetActiveById value) { NDbResult <UserCreditBalance> result; if (null == value) { result = new NDbResult <UserCreditBalance>(); result.ParameterIsNull(); } else { result = UserCreditBalance.GetNoRevenueEntryUserCreditBalanceById( value.UserId, value.PlazaGroupId); } return(result); }
public void Setup(TSB tsb, UserCreditBalance current) { this.TSB = tsb; this.UserBalance = current; this.IsNew = (null == this.UserBalance); if (this.IsNew) { this.UserBalance = new UserCreditBalance(); } this.Transaction = new UserCreditTransaction(); this.TSBBalance = ops.Credits.GetTSBBalance(tsb).Value(); this.ResultBalance = new TSBCreditBalance(); this.TSBBalance.AssignTo(this.ResultBalance); // Hook Event to recalcuate when transaction's property changed. this.Transaction.PropertyChanged += Transaction_PropertyChanged; }