示例#1
0
 static NumFmt()
 {
     ShiFou   = new NumFmt("是;否;否;", "val ? '是' : '否'");
     BaiFenBi = new NumFmt("0.00%", "(val * 100).toFixed(2) + '%'");
 }
示例#2
0
 /// <param name="field">TField 必须是 TEntity 的字段, 否则出错</param>
 public void Add <TField>(string header, Expression <Func <TEntity, TField> > field, NumFmt numFormat
                          , int width = 80, string align = "center")
 {
     ShareCols.Add(new ColModel {
         header       = header,
         NumberFormat = numFormat.ExcelFormmat,
         width        = width,
         align        = align,
         renderer     = numFormat.JsRenderer,
         Field        = field
     });
     ++Count;
 }