/******************************
* 说明:基础模块(P_SystemDllTab)实体对象
* 创建人:龚宇超
* 创建日期:2017-11-21
* 修改人:
* 修改日期:
* 修改备注:
* 版本:1.0.0.0
******************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace Lskj.MyControl
{
///
/// 基础模块(P_SystemDllTab)实体对象
///
public class ModuleModel
{
#region private property
private int _menuDirId;
private int _menuType;
private int _printType;
private bool _canEdit;
private bool _hasReport;
private bool _addEnable;
private bool _addCopyEnabled;
private bool _deleteEnable;
private bool _modifyEnable;
private bool _importEnable;
private bool _exportEnable;
private bool _searchEnable;
private bool _saveApplyEnable;
private bool _modifyClose;
private bool _anyAdd;
private string _menuName;
private string _menuText;
private string _menuSql;
private string _menuTable;
private string _menuAddName;
private string _menuBmpSpec;
private string _formKey;
private string _condKey;
private string _modifyCond;
private string _deleteCond;
private string _addCond;
private string _dragCond;
private string _exportCond;
private string _overBackOper;
private string _overBackCond;
private string _printSql;
private string _printSql1;
private string _printSql2;
private string _printFile;
private string _printCond;
private string _basePrintSql;
private string _basePrintSql1;
private string _basePrintSql2;
private string _addCaption;
private string _modifyCaption;
private string _applyCaption;
private string _backSelected;
#endregion
#region public property
///
/// 附件目录ID
///
/// The menu dir identifier.
public int MenuDirId
{
get { return _menuDirId; }
}
///
/// 模块类型(1.左侧树.2.左侧表格.3.无)
///
/// The type of the menu.
public int MenuType
{
get { return _menuType; }
}
///
/// 打印模版类型
///
/// The type of the print.
public int PrintType
{
get { return this._printType; }
}
///
/// 表格是否可以编辑
///
/// true if this instance can edit; otherwise, false.
public bool CanEdit
{
get { return _canEdit; }
}
///
/// 是否为报表
///
/// The has report.
public bool HasReport { get { return _hasReport; } }
///
/// 添加按钮是否可用
///
/// true if [add enable]; otherwise, false.
public bool AddEnable
{
get { return _addEnable; }
}
///
/// Gets or sets a value indicating whether [add copy enabled].
///
/// true if [add copy enabled]; otherwise, false.
public bool AddCopyEnabled
{
get { return _addCopyEnabled; }
}
///
/// 删除按钮是否可用
///
/// true if [delete enable]; otherwise, false.
public bool DeleteEnable
{
get { return _deleteEnable; }
}
///
/// 修改按钮是否可用
///
/// true if [modify enable]; otherwise, false.
public bool ModifyEnable
{
get { return _modifyEnable; }
}
///
/// 导入按钮是否可用
///
/// true if [import enable]; otherwise, false.
public bool ImportEnable
{
get { return _importEnable; }
}
///
/// 导出按钮是否可用
///
/// true if [export enable]; otherwise, false.
public bool ExportEnable
{
get { return _exportEnable; }
}
///
/// 查询按钮是否可用
///
/// true if [search enable]; otherwise, false.
public bool SearchEnable
{
get { return _hasReport ? true : _searchEnable; }
}
///
/// 保存提交按钮是否可用
///
/// true if [save apply enable]; otherwise, false.
public bool SaveApplyEnable
{
get { return _saveApplyEnable; }
}
///
/// 无视左侧树结构、左侧表格,添加数据
///
/// true if [any add]; otherwise, false.
public bool AnyAdd
{
get { return this._anyAdd; }
}
///
/// 修改保存后是否关闭窗口,默认关闭.false:不关闭,true:关闭
///
/// true if [modify close]; otherwise, false.
public bool ModifyClose
{
get { return _modifyClose; }
}
///
/// 模块名称
///
/// The name of the menu.
public string MenuName
{
get { return _menuName; }
}
///
/// 模块标题
///
/// The menu text.
public string MenuText
{
get { return _menuText; }
}
///
/// 模块sql
///
/// The menu SQL.
public string MenuSql
{
get { return _menuSql; }
set { this._menuSql = value; }
}
///
/// 模块表名
///
/// The menu table.
public string MenuTable
{
get { return _menuTable; }
}
///
/// 模块添加界面展示方式
///
/// The name of the menu add.
public string MenuAddName
{
get { return _menuAddName; }
}
///
/// 附件目录编号
///
/// The menu BMP spec.
public string MenuBmpSpec
{
get { return _menuBmpSpec; }
}
///
/// 当前模块key
///
/// The form key.
public string FormKey
{
get { return _formKey; }
}
///
/// 当前模块查询条件key
///
/// The cond key.
public string CondKey
{
get { return _condKey; }
}
///
/// 修改条件
///
/// The modify cond.
public string ModifyCond
{
get { return _modifyCond; }
}
///
/// 删除条件
///
/// The delete cond.
public string DeleteCond
{
get { return _deleteCond; }
}
///
/// 添加条件
///
/// The add cond.
public string AddCond
{
get { return _addCond; }
}
///
/// 拖动条件
///
/// The drag cond.
public string DragCond
{
get { return _dragCond; }
}
///
/// 导出条件
///
/// The export cond.
public string ExportCond
{
get { return _exportCond; }
}
///
/// 审核回退可操作人
///
/// The over back oper.
public string OverBackOper
{
get { return _overBackOper; }
}
///
/// 审核可回退条件
///
/// The over back cond.
public string OverBackCond
{
get { return _overBackCond; }
}
///
/// 打印SQL
///
/// The print SQL.
public string PrintSql
{
get { return _printSql; }
}
///
/// 打印SQL1
///
/// The print SQL1.
public string PrintSql1
{
get { return _printSql1; }
}
///
/// 打印SQL2.
///
/// The print SQL2.
public string PrintSql2
{
get { return _printSql2; }
}
///
/// 打印文件
///
/// The print file.
public string PrintFile
{
get { return _printFile; }
}
///
/// 打印条件
///
/// The print cond.
public string PrintCond
{
get { return _printCond; }
}
///
/// 修改界面打印sql
///
/// The base print SQL.
public string BasePrintSql
{
get { return _basePrintSql; }
}
///
/// 修改界面打印sql1
///
/// The base print SQL1.
public string BasePrintSql1
{
get { return _basePrintSql1; }
}
///
/// 修改界面打印sql2
///
/// The base print SQL2.
public string BasePrintSql2
{
get { return _basePrintSql2; }
}
///
/// 添加按钮显示文本
///
/// The add caption.
public string AddCaption
{
get { return _addCaption; }
}
///
/// 修改按钮显示文本
///
/// The modify caption.
public string ModifyCaption
{
get { return _modifyCaption; }
}
///
/// 提交按钮显示文本
///
/// The apply caption.
public string ApplyCaption
{
get { return _applyCaption; }
}
///
/// 返退标记
///
/// The back selected.
public string BackSelected
{
get { return _backSelected; }
}
///
/// 模块主键
///
public string ParmaryKey;
///
/// 列前缀
///
public string PrefixKey;
#endregion
///
/// 基础模块(P_SystemDllTab)实体对象
///
/// The row item.
public ModuleModel(DataRow rowItem)
{
if (rowItem == null) return;
this._menuDirId = string.IsNullOrEmpty(rowItem["dirId"] + "") ? 0 : Convert.ToInt32(rowItem["dirId"] + "");
this._menuType = string.IsNullOrEmpty(rowItem["dllType"] + "") ? 3 : Convert.ToInt32(rowItem["dllType"] + "");
this._printType = string.IsNullOrEmpty(rowItem["printType"] + "") ? 1 : Convert.ToInt32(rowItem["printType"] + "");
this._canEdit = "1".Equals(rowItem["selfEdit"] + "");
this._addEnable = "1".Equals(rowItem["addEnable"] + "");
this._addCopyEnabled = rowItem.Table.Columns.Contains("addCopyEnabled") ? "1".Equals(rowItem["addCopyEnabled"] + "") : true;
this._deleteEnable = "1".Equals(rowItem["deleteEnable"] + "");
this._modifyEnable = "1".Equals(rowItem["modifyEnable"] + "");
this._importEnable = "1".Equals(rowItem["importEnable"] + "");
this._exportEnable = "1".Equals(rowItem["exportEnable"] + "");
this._searchEnable = rowItem.Table.Columns.Contains("searchEnable") ? "1".Equals(rowItem["searchEnable"] + "") : true;
this._saveApplyEnable = rowItem.Table.Columns.Contains("saveApplyEnabled") ? "1".Equals(rowItem["saveApplyEnabled"] + "") : false;
this._modifyClose = rowItem.Table.Columns.Contains("ModifyClose") ? string.IsNullOrEmpty(rowItem["ModifyClose"] + "") || "1".Equals(rowItem["ModifyClose"] + "") : true;
this._anyAdd = rowItem.Table.Columns.Contains("AnyAdd") ? "true".Equals((rowItem["AnyAdd"] + "").ToLower()) : false;
this._menuName = rowItem["dllName"] + "";
this._menuText = rowItem["toolsName"] + "";
this._menuSql = rowItem["SQL"] + "";
this._menuTable = rowItem["SQLDT1"] + "";
this._menuAddName = rowItem["AddDllName"] + "";
this._menuBmpSpec = rowItem["BmpSpec"] + "";
this._formKey = rowItem["formKey"] + "";
this._condKey = rowItem["condKey"] + "";
this._modifyCond = rowItem["modifyCond"] + "";
this._deleteCond = rowItem["deleteCond"] + "";
this._addCond = rowItem["addCond"] + "";
this._hasReport = "1".Equals(rowItem["isReport"] + "");
this._dragCond = rowItem.Table.Columns.Contains("dragCond") ? rowItem["dragCond"] + "" : string.Empty;
this._exportCond = rowItem.Table.Columns.Contains("exportCond") ? rowItem["exportCond"] + "" : string.Empty;
this._overBackOper = rowItem.Table.Columns.Contains("overBackOper") ? rowItem["overBackOper"] + "" : string.Empty;
this._overBackCond = rowItem.Table.Columns.Contains("overBackCond") ? rowItem["overBackCond"] + "" : string.Empty;
this._printSql = rowItem["printSql"] + "";
this._printSql1 = rowItem["printSql1"] + "";
this._printSql2 = rowItem["printSql2"] + "";
this._printFile = rowItem["printFile"] + "";
this._printCond = rowItem.Table.Columns.Contains("printCond") ? rowItem["printCond"] + "" : "";
this._backSelected = rowItem.Table.Columns.Contains("backSelected") ? rowItem["backSelected"] + "" : "0";
this._basePrintSql = rowItem.Table.Columns.Contains("basePrintSql") ? rowItem["basePrintSql"] + "" : string.Empty;
this._basePrintSql1 = rowItem.Table.Columns.Contains("basePrintSql1") ? rowItem["basePrintSql1"] + "" : string.Empty;
this._basePrintSql2 = rowItem.Table.Columns.Contains("asePrintSql2") ? rowItem["_basePrintSql2"] + "" : string.Empty;
this._addCaption = rowItem.Table.Columns.Contains("addCaption") ? rowItem["addCaption"] + "" : string.Empty;
this._modifyCaption = rowItem.Table.Columns.Contains("modifyCaption") ? rowItem["modifyCaption"] + "" : string.Empty;
this._applyCaption = rowItem.Table.Columns.Contains("applyCaption") ? rowItem["applyCaption"] + "" : string.Empty;
}
}
}