public InterestRateAdjustmentModel New(int interestRateAdjustmentSetId, PrimeInterestRate interestRateType, DateTime adjustmentDate, double interestRate) { var now = DateTime.Now; var interestRateAdjustment = new InterestRateAdjustmentModel(); interestRateAdjustment.Guid = Guid.NewGuid().ToString(); interestRateAdjustment.InterestRateAdjustmentSetId = interestRateAdjustmentSetId; interestRateAdjustment.InterestRateType = interestRateType; interestRateAdjustment.AdjustmentDate = adjustmentDate; interestRateAdjustment.InterestRate = interestRate; interestRateAdjustment.InterestRateName = CommUtils.ToCnString(interestRateType); interestRateAdjustment.CreateTime = now; interestRateAdjustment.CreateUserName = UserInfo.UserName; interestRateAdjustment.LastModifyTime = now; interestRateAdjustment.LastModifyUserName = UserInfo.UserName; interestRateAdjustment.RecordStatus = RecordStatus.Valid; interestRateAdjustment.Id = Insert(interestRateAdjustment.GetTableObject()); return(interestRateAdjustment); }
public static string ToCnString(PrimeInterestRate interestRateType) { return(m_dictPrimeInterestRateName.ContainsKey(interestRateType) ? m_dictPrimeInterestRateName[interestRateType] : "-"); }