string.Format()

 

汉字 四角码 eg:0,1,2,3,4,5,6,7,8,9

var zeroSijiao = ShuZiService.Fetch(new SqlInfo
{
ReturnFields = new List<string>
{
Define.ShuZiEntity.Field.Ncid,
Define.ShuZiEntity.Field.Bishuntext,
Define.ShuZiEntity.Field.Bihua,
Define.ShuZiEntity.Field.ShurufaSijiao,
Define.ShuZiEntity.Field.BushouCode,
Define.ShuZiEntity.Field.Bishun,
Define.ShuZiEntity.Field.Jiegou,
Define.ShuZiEntity.Field.Pinyin,
Define.ShuZiEntity.Field.Code
},
方法一:Where = string.Format("{0} <10000 and {0}!=0 and {0} is not null",Define.ShuZiEntity.Field.ShurufaSijiao)

方法二:Where = string.Format(" isnull({0},0) between {1} and {2}"
Where = string.Format("{0} between {1} and {2}" , Define.ShuZiEntity.Field.ShurufaSijiao 方法三:, sijiaoCode==0?1: sijiaoCode *10000 //等于0时 特殊情况 , sijiaoCode * 10000 , (sijiaoCode + 1) * 10000 - 1 ), Orderby = string.Format("{0} asc", Define.ShuZiEntity.Field.ShurufaSijiao) });

  

string.Format()

上一篇:vue (iview)根据权限控制columns 的某列显示与隐藏(通用)


下一篇:md5简单应用