using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PMS.BusinessModels.EasyUI
{
///
/// 列属性
///
public class ColumnAttribute
{
///
/// 列属性
///
/// 数据列和显示列名称
public ColumnAttribute(string dataColumn)
{
this.DataColumn = dataColumn.Trim().Replace("\r", "").Replace("\n", "");
this.TextColumn = dataColumn.Trim().Replace("\r", "").Replace("\n", "");
this.ReservedDecimal = -1;
this.FormatString = string.Empty;
}
///
/// 列属性
///
/// 数据列名称
/// 显示列名称
public ColumnAttribute(string dataColumn, string textColumn)
{
this.DataColumn = dataColumn.Trim().Replace("\r", "").Replace("\n", "");
this.TextColumn = textColumn.Trim().Replace("\r", "").Replace("\n", "");
this.ReservedDecimal = -1;
this.FormatString = string.Empty;
}
///
/// 列属性
///
/// 数据列名称
/// 显示列名称
/// 显示图标样式
public ColumnAttribute(string dataColumn, string textColumn, string iconString = "")
{
this.DataColumn = dataColumn.Trim().Replace("\r", "").Replace("\n", "");
this.TextColumn = textColumn.Trim().Replace("\r", "").Replace("\n", "");
this.IconString = iconString.Trim().Replace("\r", "").Replace("\n", "");
this.ReservedDecimal = -1;
this.FormatString = string.Empty;
}
///
/// 列属性
///
/// 数据列名称
/// 显示列名称
/// 小数位数
/// 格式化字符串
public ColumnAttribute(string dataColumn, string textColumn, int reservedDecimal, string formatString)
{
this.DataColumn = dataColumn.Trim().Replace("\r", "").Replace("\n", "");
this.TextColumn = textColumn.Trim().Replace("\r", "").Replace("\n", "");
this.ReservedDecimal = reservedDecimal;
this.FormatString = formatString;
}
///
/// 列属性
///
///
public ColumnAttribute(ColumnAttribute columnAttr)
{
this.DataColumn = columnAttr.DataColumn;
this.TextColumn = columnAttr.TextColumn;
}
///
/// 数据列
///
public string DataColumn { get; set; }
///
/// 显示列
///
public string TextColumn { get; set; }
///
/// 小数保留位数 保留原数时请使用-1
///
public int ReservedDecimal { get; set; }
///
/// 格式化字段串(数据值使用{Value})
///
public string FormatString { get; set; }
///
/// 显示的图标
///
public string IconString { get; set; }
}
}