public void ToUppercaseRMBTest() { Assert.AreEqual("叁拾贰元整", DecimalUtility.ToUppercaseRMB(32M)); Assert.AreEqual("叁拾贰元伍角肆分", DecimalUtility.ToUppercaseRMB(32.54M)); Assert.AreEqual("叁拾贰元伍角", DecimalUtility.ToUppercaseRMB(32.5M)); Assert.AreEqual("叁拾贰元肆分", DecimalUtility.ToUppercaseRMB(32.04678M)); }
private IQueryable <PCPettyCash> Queryable() { System.DateTime? startDate = DateTimeHelper.GetDateTime(this.txtStartDate.Text); System.DateTime? endDate = DateTimeHelper.GetDateTime(this.txtEndDate.Text); decimal? startCash = DecimalUtility.ConvertDecimal(this.txtStartCash.Text); decimal? endCash = DecimalUtility.ConvertDecimal(this.txtEndCash.Text); string matter = this.txtMatter.Text.Trim(); IQueryable <PCPettyCash> queryable = from p in this.pcSer where p.State == "0" select p; if (startDate.HasValue) { queryable = from p in queryable where p.ApplicationDate >= startDate.Value select p; } if (endDate.HasValue) { queryable = from p in queryable where p.ApplicationDate < endDate.Value.AddDays(1.0) select p; } if (startCash.HasValue) { queryable = from p in queryable where p.Cash >= startCash.Value select p; } if (endCash.HasValue) { queryable = from p in queryable where p.Cash <= endCash.Value select p; } if (!string.IsNullOrWhiteSpace(matter)) { queryable = from p in queryable where p.Matter.Contains(matter) select p; } if (this.userCode != "00000000") { queryable = from p in queryable where p.Applicant == this.userCode select p; } return(queryable); }