示例#1
0
 /// <summary>
 /// 表格列
 /// </summary>
 /// <param name="field">字段名</param>
 /// <param name="text">文本</param>
 /// <param name="width">宽度</param>
 public IDataGridColumn GridColumn(string field = "", string text = "", int?width = null)
 {
     return(EasyUiFactory.CreateDataGridColumn().Field(field).Text(text).Width(width));
 }
示例#2
0
 /// <summary>
 /// 创建表格列
 /// </summary>
 /// <typeparam name="TProperty">属性类型</typeparam>
 /// <param name="expression">属性表达式</param>
 /// <param name="width">宽度</param>
 /// <param name="isEdit">是否允许编辑</param>
 public IDataGridColumn GridColumn <TProperty>(Expression <Func <TEntity, TProperty> > expression, int?width = null, bool isEdit = false)
 {
     return(EasyUiFactory <TEntity> .CreateDataGridColumn(expression, _helper, isEdit).Width(width).Align());
 }
 /// <summary>
 /// 图标控件
 /// </summary>
 /// <typeparam name="TProperty">属性类型</typeparam>
 /// <param name="expression">属性表达式</param>
 /// <param name="dialogWidth">选择图标窗口宽度</param>
 /// <param name="dialogHeight">选择图标窗口高度</param>
 public IDataGridColumn Icon <TProperty>(Expression <Func <T, TProperty> > expression, int?dialogWidth = null, int?dialogHeight = null)
 {
     return(EasyUiFactory <T> .CreateDataGridColumn(expression, _helper, true).Lookup(CreateLookupOption(dialogWidth, dialogHeight))
            .Width(150).Align(AlignLeftRigthCenter.Center, AlignLeftRigthCenter.Center).FormatImage(16, 16, true));
 }
 /// <summary>
 /// 应用程序控件
 /// </summary>
 /// <typeparam name="TProperty">属性类型</typeparam>
 /// <param name="expression">属性表达式</param>
 public IDataGridColumn Application <TProperty>(Expression <Func <T, TProperty> > expression)
 {
     return(EasyUiFactory <T> .CreateDataGridColumn(expression, _helper, true).Combox("/Systems/Application/ApplicationsControl").Editable(false).Width(120).PanelHeight());
 }
 /// <summary>
 /// 字典控件
 /// </summary>
 /// <param name="expression">属性表达式</param>
 /// <param name="code">字典编码</param>
 public IDataGridColumn Dic <TProperty>(Expression <Func <T, TProperty> > expression, string code)
 {
     return(EasyUiFactory <T> .CreateDataGridColumn(expression, _helper, true).ComboTree("/Commons/Dic/DicControl?code=" + code).Editable(false).Width(150).PanelHeight());
 }