/******************************
* 说明:动态链接库对象
* 创建人:龚宇超
* 创建日期:2017-11-01
* 修改人:
* 修改日期:
* 修改备注:
* 版本:1.0.0.0
******************************/
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
namespace Lskj.Model
{
///
/// 动态链接库对象
///
public class DynamicModel
{
///
/// 菜单ID
///
/// The module identifier.
public int ModuleId { get; protected set; }
///
/// 窗口标题
///
/// The form text.
public string FormText { get; protected set; }
///
/// 权限(1.有操作权限.0.无权限.2.只读权限.3.右键配置权限全部开放)
///
/// The privilege.
public string Privilege { get; set; }
///
/// 模块编号
///
/// The module code.
public string ModuleCode { get; protected set; }
///
/// 用户ID
///
/// The user identifier.
public string UserId { get { return ERPInfo.Instance.UserId; } private set { ERPInfo.Instance.UserId = value; } }
///
/// 用户名称
///
/// The name of the user.
public string UserName { get { return ERPInfo.Instance.UserName; } private set { ERPInfo.Instance.UserName = value; } }
///
/// 是否是配置查询明细
///
/// The state of the save.
public bool IsDetailSearch { get; set; }
///
/// 说明:是否有操作权限
/// 创建人:龚宇超
/// 创建日期:2017-11-14
/// 修改人:
/// 修改日期:
/// 修改备注:
/// 版本:1.0
///
/// true if this instance has privilege; otherwise, false.
public bool HasOperPrivilege()
{
return "1".Equals(this.Privilege) || "3".Equals(this.Privilege);
}
///
/// 说明:是否有只读权限
/// 创建人:龚宇超
/// 创建日期:2017-11-14
/// 修改人:
/// 修改日期:
/// 修改备注:
/// 版本:1.0
///
/// true if [has read privilege]; otherwise, false.
public bool HasReadPrivilege()
{
return "2".Equals(this.Privilege);
}
///
/// 说明:是否有权限、包含只读和可操作权限
/// 创建人:龚宇超
/// 创建日期:2017-11-27
/// 修改人:
/// 修改日期:
/// 修改备注:
/// 版本:1.0
///
/// true if this instance has privilege; otherwise, false.
public bool HasPrivilege()
{
return HasOperPrivilege() || HasReadPrivilege();
}
///
/// The _grid enum object
///
private GridEnum _gridEnumObj;
///
/// 表格类型
///
/// The grid enum object.
public virtual GridEnum GridEnumObj
{
get
{
return this._gridEnumObj == null ? GridEnum.GridView : this._gridEnumObj;
}
set
{
this._gridEnumObj = value;
}
}
///
/// 是否为基础档案
///
/// true if this instance is base module; otherwise, false.
public virtual bool IsBaseModule { get { return false; } }
///
/// 其他参数
///
/// The parameters.
public string[] Params;
///
/// 缓存数据源
///
public Dictionary