public virtual void UpdateAccountPeriodInfo(AccountPeriodInfo entity) { DataCommand cmd = DataCommandManager.GetDataCommand("UpdateAccountPeriodInfo"); cmd.SetParameterValue <AccountPeriodInfo>(entity); cmd.ExecuteNonQuery(); }
public virtual AccountPeriodInfo AdjustCollectionPeriodAndRating(AccountPeriodInfo entity) { if (!entity.AvailableCreditLimit.HasValue) { throw new BizException(ResouceManager.GetMessageString("Customer.CustomerInfo", "AdjustCollectionPeriodAndRating_CreditLimit_NoNull")); } AccountPeriodInfo accountInfo = GetCustomerAccountPeriod(entity.CustomerSysNo.Value); if (accountInfo != null) { entity.CustomerSysNo = accountInfo.CustomerSysNo; decimal availableCreditLimit = 0; if (!accountInfo.AvailableCreditLimit.HasValue) { accountInfo.AvailableCreditLimit = 0; } availableCreditLimit = accountInfo.AvailableCreditLimit.Value + entity.AvailableCreditLimit.Value; if (availableCreditLimit < 0) { throw new BizException(ResouceManager.GetMessageString("Customer.CustomerInfo", "AdjustCollectionPeriodAndRating_CreditLimit_Negative")); } entity.AvailableCreditLimit = availableCreditLimit; } da.UpdateAvailableCreditLimit(entity.CustomerSysNo.Value, entity.AvailableCreditLimit.Value); return(entity); }
public void SetCollectionPeriodAndRating(CustomerAccountPeriodVM vm, EventHandler <RestClientEventArgs <AccountPeriodInfo> > callback) { string relativeUrl = "/CustomerService/CustomerExtend/SetCollectionPeriodAndRating"; AccountPeriodInfo msg = vm.ConvertVM <CustomerAccountPeriodVM, AccountPeriodInfo>(); restClient.Update <AccountPeriodInfo>(relativeUrl, msg, callback); }
public virtual void UpdateAccountPeriodInfo(AccountPeriodInfo entity) { da.UpdateAccountPeriodInfo(entity); ExternalDomainBroker.CreateOperationLog("SetCreditLimit Customer" , BizLogType.Basic_Customer_SetCreditLimit , entity.CustomerSysNo.Value , "8601"); }
public virtual void AddCreditLimit(int customerSysNo, decimal receivableAmount) { AccountPeriodInfo entity = da.GetAccountPeriodInfoByCustomerSysNo(customerSysNo); if (entity != null) { entity.AvailableCreditLimit += receivableAmount; if (entity.AvailableCreditLimit < 0) { throw new BizException(ResouceManager.GetMessageString("Customer.CustomerInfo", "SetCreditLimit_CreditLimit_Negative")); } } SetCreditLimit(entity.CustomerSysNo.Value, entity.AvailableCreditLimit.Value); }
public virtual void CreateAccountPeriodInfo(AccountPeriodInfo entity) { da.CreateAccountPeriodInfo(entity); }
/// <summary> /// 更新账期信息 /// </summary> /// <param name="entity"></param> public virtual void UpdateAccountPeriodInfo(AccountPeriodInfo entity) { ObjectFactory <AccountPeridProcessor> .Instance.UpdateAccountPeriodInfo(entity); }
public void SetCollectionPeriodAndRating(AccountPeriodInfo entity) { ObjectFactory <CustomerAppService> .Instance.UpdateAccountPeriodInfo(entity); }