/****************************** * 说明:动态链接库对象 * 创建人:龚宇超 * 创建日期: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 DataCaches; /// /// 主表行数据 /// public DataRow MaintabFocusedRow; /// /// 获取主表行数据 /// /// public virtual DataRow GetMaintabFocusedRow() { return this.MaintabFocusedRow; } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2017-11-22 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// The model. /// System.String[]. public virtual string[] OtherParams() { return this.Params; } /// /// 初始化默认参数(1.标题、2、用户ID、3.用户名、4.权限、5.模块编号、6.菜单ID) /// /// The arguments. public DynamicModel(string[] args) { this.FormText = args[0]; this.UserId = args[1]; this.UserName = args[2]; this.Privilege = args[3]; this.ModuleCode = args[4]; this.ModuleId = 0; this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } /// /// 基础档案动态链接库参数 /// public class DynamicModuleModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// 主表选中行 /// public DataRow MaintabFocusedRow; /// /// 左侧树结构 /// /// The left cond. public string LeftCond { get; private set; } public override bool IsBaseModule { get { return true; } } /// /// 获取选中行数据 /// /// public override DataRow GetMaintabFocusedRow() { return this.MaintabFocusedRow; } /// /// 处理其他参数 /// /// public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicModuleModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.LeftCond = args.Length > 7 ? args[7] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length - 1; i++) { Params[i - 8] = args[i]; } } if (!string.IsNullOrEmpty(args[args.Length - 1])) { try { JObject rowObject = JsonConvert.DeserializeObject(args[args.Length - 1]); JArray jArray = new JArray(); jArray.Add(rowObject); DataTable dataTable = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(jArray)); this.MaintabFocusedRow = dataTable.Rows[0]; } catch (Exception) { } } } } /// /// 基础档案上下结构动态链接库参数 /// public class DynamicModuleDetailModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// 主表选中行 /// private DataRow MaintabFocusedRow; /// /// 左侧树结构 /// /// The left cond. public string LeftCond { get; set; } /// /// 是否为基础档案 /// /// true if this instance is base module; otherwise, false. public override bool IsBaseModule { get { return true; } } /// /// 获取选中行数据 /// /// public override DataRow GetMaintabFocusedRow() { return this.MaintabFocusedRow; } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicModuleDetailModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.LeftCond = args.Length > 7 ? args[7] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } if (!string.IsNullOrEmpty(args[args.Length - 1])) { try { JObject rowObject = JsonConvert.DeserializeObject(args[args.Length - 1]); JArray jArray = new JArray(); jArray.Add(rowObject); DataTable dataTable = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(jArray)); this.MaintabFocusedRow = dataTable.Rows[0]; } catch (Exception) { } } } } /// /// 添加界面动态链接库参数 /// public class DynamicAddModel : DynamicModel { /// /// 是否可以 /// public string IsView { get; private set; } /// /// 主键值 /// /// The object identifier. public string ObjectId { get; private set; } /// /// 选中树结构Key /// /// The parent key. public string ParentKey { get; private set; } /// /// 选中树结构Value /// /// The parent value. public string ParentValue { get; private set; } /// /// 关联Key /// /// The union key. public string UnionKey { get; private set; } /// /// 关联值 /// /// The union value. public string UnionValue { get; private set; } /// /// 控件默认带入值 /// /// The control SQL. public string ControlSql { get; private set; } /// /// Gets the search object. /// /// The search object. public string SearchObject { get; private set; } /// /// Gets the data object. /// /// The data object. public string DataObj { get; private set; } /// /// 保存模式 /// /// The state of the save. public string SaveState { get; private set; } /// /// 是否为基础档案 /// /// true if this instance is base module; otherwise, false. public override bool IsBaseModule { get { return true; } } /// /// 初始化添加界面动态链接库参数 /// /// The arguments. public DynamicAddModel(string[] args) : base(args) { if (args.Length > 5 && !string.IsNullOrWhiteSpace(args[5]) && !"0".Equals(args[5])) { base.ModuleCode = args[5]; } this.IsView = args.Length > 6 ? args[6] : string.Empty; this.ObjectId = args.Length > 7 ? args[7] : string.Empty; this.ParentKey = args.Length > 8 ? args[8] : string.Empty; this.ParentValue = args.Length > 9 ? args[9] : string.Empty; this.ControlSql = args.Length > 10 && !string.IsNullOrWhiteSpace(args[10]) ? args[10].TrimStart('#') : string.Empty; this.SaveState = args.Length > 11 ? args[11] : string.Empty; this.SearchObject = args.Length > 13 ? args[13] : string.Empty; this.DataObj = args.Length > 14 ? args[14] : string.Empty; // UnionKey、UnionValue 此2个值通过程序传递,外部调用无法传递 this.UnionKey = args.Length > 15 ? args[15] : string.Empty; this.UnionValue = args.Length > 16 ? args[16] : string.Empty; if (!string.IsNullOrEmpty(args[args.Length - 1])) { try { JObject rowObject = JsonConvert.DeserializeObject(args[args.Length - 1]); JArray jArray = new JArray(); jArray.Add(rowObject); DataTable dataTable = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(jArray)); this.MaintabFocusedRow = dataTable.Rows[0]; } catch (Exception) { } } } } /// /// 报表界面动态链接库参数 /// public class DynamicReportModel : DynamicModel { /// /// 其他参数 /// private string[] Params; /// /// 自动查询 /// public bool AutoQuery { get; private set; } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化报表动态链接库参数 /// /// The arguments. public DynamicReportModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.AutoQuery = args.Length > 7 && args[7].Equals("1"); if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } } /// /// 单据动态链接库参数 /// public class DynamicBillModel : DynamicModel { private string[] Params; /// /// 单据编号 /// public string BillOrderNo; /// /// 单据表头主表sql /// public string BillMasterSql; /// /// 单据明细sql /// public string BillDetailSql; /// /// 显示来源id(不配置就显示全部) /// public string SourceDetailsID; /// /// 单据上方名称 /// public string DocumentName; /// /// 是否隐藏来源和来源明细 /// public bool HideSource; /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } public DynamicBillModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } if (args.Length > 7) { Params = new string[args.Length]; for (int i = 7; i < args.Length; i++) { if (i - 7 >= 10) continue; Params[i - 7] = args[i]; } } this.BillMasterSql = args.Length > 12 ? args[12] : string.Empty; this.BillDetailSql = args.Length > 13 ? args[13] : string.Empty; this.BillOrderNo = args.Length > 14 ? args[14] : string.Empty; this.SourceDetailsID = args.Length > 15 ? args[15] : string.Empty; this.DocumentName = args.Length > 16 ? args[16] : string.Empty; if (args.Length > 17) { HideSource = "1".Equals(args[17] + ""); } } } /// /// 单据Brp动态链接库参数 /// public class DynamicBillBrpModel : DynamicBillModel { public DynamicBillBrpModel(string[] args) : base(args) { } } /// /// 审批动态连接参数 /// public class DynamicBaseAccraditionModel : DynamicModel { /// /// 初始化审批模块动态连接参数 /// /// The arguments. public DynamicBaseAccraditionModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrEmpty(args[6])) { base.ModuleCode = args[6]; } } } /// /// 基础审批弹出界面连接参数 /// public class DynamicBaseAccraditionPopModel : DynamicModel { /// /// 审批步骤码 /// public string StepCode; /// /// 点击对象Id /// public string PrimaryValue; /// /// 确认id /// public string ConfirmId; /// /// 终审状态 /// public string StepOver; /// /// 审批弹出界面连接参数 /// /// public DynamicBaseAccraditionPopModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[6])) base.ModuleCode = args[6]; if (args.Length > 7) { this.StepCode = args[7]; this.PrimaryValue = args[8]; this.ConfirmId = args[9]; this.StepOver = args[10]; } } } /// /// 单据审批模型 /// public class DynamicPubAccraditionModel : DynamicModel { public DynamicPubAccraditionModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrEmpty(args[6])) { base.ModuleCode = args[6]; } } } /// /// 单据审批弹出模型 /// public class DynamicPubAccraditionPopModel : DynamicModel { /// /// 审批步骤码 /// public string StepCode; /// /// 单据Id /// public string BillDocumentId; /// /// 确认 /// public string ConfirmId; /// /// 终审状态 /// public string StepOver; public DynamicPubAccraditionPopModel(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) base.ModuleId = int.Parse(args[5]); if (!string.IsNullOrEmpty(args[6])) base.ModuleCode = args[6]; if (args.Length > 7) { this.StepCode = args[7]; this.BillDocumentId = args[8]; this.ConfirmId = args[9]; this.StepOver = args[10]; } } } /// /// 基础档案审核连接参数 /// public class DynamicBaseInfoModel : DynamicModel { /// /// 对象主键值 /// public string PrimaryValue; /// /// 附件浏览权限 /// public bool IsView; /// /// 基础档案审批 /// /// The arguments. public DynamicBaseInfoModel(string[] args) : base(args) { if (args.Length > 5) this.IsView = "1".Equals(args[5]); if (args.Length > 6 && !string.IsNullOrEmpty(args[6])) base.ModuleCode = args[6]; if (args.Length > 7) this.PrimaryValue = args[7]; if (args.Length > 8) this.FormText = args[8]; } } /// /// PubSpec入库参数 /// public class DynamicSpecModel : DynamicModel { public DynamicSpecModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } } } /// /// 附件管理入口参数 /// public class DynamicPhotoViewModel : DynamicModel { /// /// 是否为浏览(true浏览权限、false.可操作) /// public bool IsView; /// /// 是否显示关联按钮 /// public bool IsUnionImage; /// /// 主键值 /// public string ParmaryValue; /// /// 目录ID /// public string DirId; /// /// 关联按钮关联的列 /// public string UnionColName; /// /// 左侧树节点值 /// public string SpeciesValue; /// /// 终审打开附件 /// public bool Completed; public DynamicPhotoViewModel(string[] args) : base(args) { this.ParmaryValue = args[5]; this.IsView = "1".Equals(args[6]); this.DirId = args[7]; if (args.Length > 8 && !string.IsNullOrEmpty(args[8])) base.ModuleCode = args[8]; this.IsUnionImage = args.Length > 9 ? "1".Equals(args[9]) : false; this.UnionColName = args.Length > 10 ? args[10] : string.Empty; this.SpeciesValue = args.Length > 11 ? args[11] : string.Empty; this.Completed = args.Length > 12 ? "1".Equals(args[12]) : false; } } /// /// 单据BillInfo入口参数 /// public class DynamicBillInfoModel : DynamicModel { /// /// 审批步骤码 /// public string StepCode; /// /// 单据Id /// public string BillDocumentId; /// /// 表单标题 /// public string FormTitle; public DynamicBillInfoModel(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleCode = args[5]; } if (args.Length > 5) { this.BillDocumentId = args[6]; this.FormTitle = args[7]; this.StepCode = args[8]; } } } /// /// 单据条码生成入口参数 /// public class DynamicBarCodeModel : DynamicModel { /// /// 单据Id /// public string BillDocumentId; /// /// 表单标题 /// public string FormTitle; /// /// 关联单表模块 /// public string MoudelId; /// /// 增加存储过程 /// public string AddbtnSql; /// /// 单表生成条码 /// /// public string BillbtnSql; /// /// 关闭智能条码触发 /// /// public string ClosebtnSql; /// /// 执行AddbtnSql时,下方表格是否必须有选中行 /// /// public string Required;//AddFlag;是否显示增加界面 /// /// 是否显示增加界面 /// /// public string isRedFlag; /// /// 是否显示增加界面 /// /// public string isVisibelFlag; /// /// 左侧表格选中行条件 /// public string SelectionCriteria; /// /// 取消提示 (提示 成功) /// public bool CancelPrompt; /// /// 配置动态列时,左侧表格获取的模块编号字段 /// public string ModuleNumber; /// /// 左侧表条件 /// public string LeftCondition; /// /// 生成条码按钮默认开启字段(左侧表选中行的如果有这个字段,值返回 0 开 ,1不开) /// public string DefaultEnabled; public DynamicBarCodeModel(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleCode = args[5]; } if (args.Length > 5) { this.BillDocumentId = args[6]; this.FormTitle = args[7]; this.BillbtnSql = args[8]; this.MoudelId = args[9]; this.AddbtnSql = args[10]; this.ClosebtnSql = args[11]; this.Required = args[12]; this.isRedFlag = args[13]; //参数如果超过10个,用^分割的方式记录到参数10中 string[] ags = args[14].Split('^'); this.isVisibelFlag = ags[0]; if (ags.Length > 1) { this.SelectionCriteria = ags[1]; } if (ags.Length > 2) { this.CancelPrompt = "1".Equals(ags[2] + ""); } if (ags.Length > 3) { this.ModuleNumber = ags[3]; } if (ags.Length > 4) { this.LeftCondition = ags[4]; } if (ags.Length > 5) { this.DefaultEnabled = ags[5]; } } } } /// /// 附件管理入口参数 /// public class DynamicFileManagerModel : DynamicModel { /// /// 主键值 /// public string ParmaryValue; /// /// 目录ID /// public string DirId; /// ///浏览权限 /// public bool IsView; /// /// 是否显示关联按钮 /// public bool IsUnionImage; /// /// 关联按钮关联的列 /// public string UnionColName; /// /// 左侧树节点值 /// public string SpeciesValue; public DynamicFileManagerModel(string[] args) : base(args) { this.ParmaryValue = args[5]; this.IsView = "1".Equals(args[6]); this.DirId = args[7]; if (!string.IsNullOrEmpty(args[8])) { base.ModuleCode = args[8]; } this.IsUnionImage = args.Length > 9 ? "1".Equals(args[9]) : false; this.UnionColName = args.Length > 10 ? args[10] : string.Empty; this.SpeciesValue = args.Length > 11 ? args[11] : string.Empty; } } /// /// 生产过程入口参数 /// public class DynamicProductionModel : DynamicModel { /// /// 主键 /// public string ParmaryValue; public bool SearchControlEnable; public DynamicProductionModel(string[] args) : base(args) { base.ModuleId = Convert.ToInt32(args[5]); if (args.Length > 6) { base.ModuleCode = args[6]; this.ParmaryValue = args[7]; if (args.Length > 8) this.SearchControlEnable = "1".Equals(args[8]); } } } /// /// 帮助文档 /// public class DynamicHelpModel : DynamicModel { /// /// 目录ID /// public int DirId; public DynamicHelpModel(string[] args) : base(args) { if (args.Length > 5) base.ModuleCode = args[5]; if (args.Length > 6) DirId = string.IsNullOrEmpty(args[6]) ? 0 : Convert.ToInt32(args[6]); } } /// /// 甘特图日程计划 /// public class DynamicGanttModel : DynamicModel { public string AppointId; public DynamicGanttModel(string[] args) : base(args) { if (args.Length > 5) AppointId = args[5]; } } /// /// 基础档案底部添加操作 /// public class DynamicModuleDetailModelInfo : DynamicModel { /// /// 扩展参数 /// private string[] Params; /// /// 控件参数 /// /// The control SQL. public string ControlSql { get; private set; } /// /// 模块保存方式(0=保存后新增,1=复制新增,2=成功后关闭) /// /// The state of the menu save. public int MenuSaveState { get; private set; } /// /// 是否为基础档案 /// /// true if this instance is base module; otherwise, false. public override bool IsBaseModule { get { return true; } } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return Params; } /// /// 初始化默认参数(1.标题、2、用户ID、3.用户名、4.权限、5.模块编号、6.菜单ID) /// /// The arguments. public DynamicModuleDetailModelInfo(string[] args) : base(args) { if (args.Length > 5) base.ModuleId = string.IsNullOrEmpty(args[5]) ? 0 : Convert.ToInt32(args[5]); if (args.Length > 6) base.ModuleCode = args[6]; if (args.Length > 7) this.ControlSql = args[7]; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } if (args.Length > 15) this.MenuSaveState = string.IsNullOrEmpty(args[15]) ? 0 : Convert.ToInt32(args[15]); } } /// /// 多标签界面 /// public class DynamicPageDetailModel : DynamicModel { /// /// 传入关键值 /// /// The primary value. public string PrimaryValue { get; private set; } /// /// 控件参数 /// /// The control SQL. public string ControlSql { get; private set; } /// /// 初始化默认参数(1.标题、2、用户ID、3.用户名、4.权限、5.模块编号、6.菜单ID) /// /// The arguments. public DynamicPageDetailModel(string[] args) : base(args) { if (args.Length > 5 && base.Privilege == "3") base.ModuleCode = args[5]; if (args.Length > 6) this.PrimaryValue = args[6]; if (args.Length > 7) base.FormText = args[7]; if (args.Length > 8) this.ControlSql = args[8]; } } /// /// 浏览器dll /// public class DynamicBrowserModel : DynamicModel { /// /// 初始化默认参数(1.标题、2、用户ID、3.用户名、4.权限、5.模块编号、6.菜单ID) /// /// The arguments. public DynamicBrowserModel(string[] args) : base(args) { if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) base.ModuleCode = args[6]; if (args.Length > 7) base.FormText = args[7]; } } /// /// 单据条码输入 /// public class DynamicBillInputBarModel : DynamicModel { /// /// 父模块编号 /// public string ParentDLLCoid; /// /// 单据编号 /// public string BilldocumentId; /// /// 明细Id /// public string DetailId; /// /// 产品编号 /// public string ProductId; /// /// 浏览 /// public bool IsView; /// /// 条码数 /// public int CodeCount; /// /// 是否编辑 /// public bool IsEdit = false; public DynamicBillInputBarModel(string[] args) : base(args) { this.ParentDLLCoid = args[4]; base.ModuleCode = args[5]; this.BilldocumentId = args[6]; this.DetailId = args[7]; this.ProductId = args[8]; this.IsView = string.IsNullOrEmpty(args[9]) || "0".Equals(args[9]) ? true : false; this.CodeCount = string.IsNullOrEmpty(args[10]) ? 0 : (int)Convert.ToDouble(args[10]); if (args.Length > 11 && !string.IsNullOrEmpty(args[11])) this.IsEdit = true; } } /// /// Excel模板 /// public class DynamicExcelModel : DynamicModel { public DynamicExcelModel(string[] args) : base(args) { if (args.Length > 5) base.ModuleId = string.IsNullOrEmpty(args[5]) ? 0 : Convert.ToInt32(args[5]); if (args.Length > 6) base.ModuleCode = args[6]; } } /// /// Pdf签名模板 /// public class DynamicPdfViewerModel : DynamicModel { /// /// 单据编号 /// public string BillDocumentId; /// /// 进度编号 /// public string stepCode; /// /// 单据明细ID /// public string BillDeatilId; /// /// PDF附件ID /// public int PdfFileId; /// /// Initializes a new instance of the class. /// /// The arguments. public DynamicPdfViewerModel(string[] args) : base(args) { if (args.Length > 6) { this.BillDocumentId = args[5]; this.stepCode = args[6]; this.BillDeatilId = args[7]; this.PdfFileId = string.IsNullOrEmpty(args[8]) ? 0 : Convert.ToInt32(args[8]); } } } /// /// 高拍仪 /// public class DynamicCmCapture : DynamicModel { /// /// 目录ID /// public string DirId; /// /// 目录树节点ID /// public string SpesiesNo; public DynamicCmCapture(string[] args) : base(args) { this.DirId = args[5]; this.SpesiesNo = args[6]; } } /// /// 审批流模版入口对象 /// public class DynamicWorkflowModel : DynamicModel { public DynamicWorkflowModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } } } /// /// 权限设置入口对象 /// public class DynamicPowerModel : DynamicModel { public DynamicPowerModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } } } /// /// 基础档案审批流模版入口对象 /// public class DynamicBaseWorkflowModel : DynamicModel { public DynamicBaseWorkflowModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } } } /// /// 图形模块入口对象 /// public class DynamicPubchartModel : DynamicModel { public DynamicPubchartModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } } } /// ///基础模块上下添加模板 /// public class DynamicPubModelAdd : DynamicModel { /// /// 是否是多表格 /// /// The parameters. public bool isBandGrid = false; /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// 左侧树结构 /// /// The left cond. public string LeftCond { get; set; } /// /// 是否为基础档案 /// /// true if this instance is base module; otherwise, false. public override bool IsBaseModule { get { return false; } } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicPubModelAdd(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.LeftCond = args.Length > 7 ? args[7] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } } /// /// 基础档案审批流模版入口对象 /// public class DynamicPubBrowerModel : DynamicModel { /// /// url参数 /// public string UrlParame; public string BetweenDLLCoid; /// /// 是否是右键下载 /// /// public int downLoadFlag; public int RightKeyFlag; public int isView; public int isPostFlag; public string postData; public double PerWidth;//百分比宽 public double PerHeight;//百分比高 public bool isCalSize = false;//是否自定义控件高宽 //public string Delimiter;//批量下载时,多个url的分割符 public DynamicPubBrowerModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrEmpty(args[6])) { this.UrlParame = args[6]; } if (args.Length > 7) { this.BetweenDLLCoid = args[7]; } if (args.Length > 8 && !string.IsNullOrEmpty(args[8])) { this.downLoadFlag = Convert.ToInt32(args[8]); } if (args.Length > 9 && !string.IsNullOrEmpty(args[9])) { this.RightKeyFlag = Convert.ToInt32(args[9]); } if (args.Length > 10 && !string.IsNullOrEmpty(args[10])) { this.isView = Convert.ToInt32(args[10]); } if (args.Length > 11 && !string.IsNullOrEmpty(args[11])) { this.isPostFlag = 1; this.postData = args[11]; } //if (args.Length > 12 && !string.IsNullOrEmpty(args[12])) //{ // this.Delimiter = args[12]; //} if (args.Length > 14 && !string.IsNullOrEmpty(args[13]) && !string.IsNullOrEmpty(args[14])) { PerWidth = (int.Parse(args[13].Replace("%", "")) * 0.01); PerHeight = (int.Parse(args[14].Replace("%", "")) * 0.01); isCalSize = true; } } } /// /// 基础档案审批流模版入口对象新 /// public class DynamicPubNewBrowerModel : DynamicModel { /// /// url参数 /// public string UrlParame; public string BetweenDLLCoid; /// /// 是否是右键下载 /// /// public int downLoadFlag; public int RightKeyFlag; public int isView; public int isPostFlag; public double PerWidth;//百分比宽 public double PerHeight;//百分比高 public bool isCalSize = false;//是否自定义控件高宽 public DynamicPubNewBrowerModel(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { this.UrlParame = args[6]; } if (args.Length > 7) { this.BetweenDLLCoid = args[7]; } if (args.Length > 8 && !string.IsNullOrEmpty(args[8])) { this.downLoadFlag = Convert.ToInt32(args[8]); } if (args.Length > 9 && !string.IsNullOrEmpty(args[9])) { this.RightKeyFlag = Convert.ToInt32(args[9]); } if (args.Length > 10 && !string.IsNullOrEmpty(args[10])) { this.isView = Convert.ToInt32(args[9]); } if (args.Length > 11 && !string.IsNullOrEmpty(args[11])) { this.isPostFlag = 1; } if (args.Length > 14 && !string.IsNullOrEmpty(args[13]) && !string.IsNullOrEmpty(args[14])) { PerWidth = (int.Parse(args[13].Replace("%", "")) * 0.01); PerHeight = (int.Parse(args[14].Replace("%", "")) * 0.01); isCalSize = true; } } } /// /// 审批流模版入口对象 /// public class DynamicAutoWordFile : DynamicModel { /// /// 判断是否是单据 /// public string Var; public DynamicAutoWordFile(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { Var = args[5]; } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } } } /// /// 打印word模板 /// public class DynamicAutoCreate : DynamicModel { /// /// 首页模板地址 /// public string MainTempPath; /// /// 菜单模板地址 /// public string MenuTempPath; /// /// 菜单模板配置集合 /// public string MenuTempArray; /// /// sql配置 /// public string MasterSql; public DynamicAutoCreate(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { this.MainTempPath = args[5]; } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { this.MenuTempPath = args[6]; } if (args.Length > 7 && !string.IsNullOrWhiteSpace(args[7])) { this.MenuTempArray = args.Length > 7 ? args[7] : string.Empty; } if (args.Length > 8 && !string.IsNullOrWhiteSpace(args[8])) { this.MasterSql = args.Length > 8 ? args[8] : string.Empty; } } } /// /// 公共详情界面 /// public class DynamicPubDetailed : DynamicModel { /// 其他参数 /// /// The parameters. private string[] Params; /// /// 左侧树结构 /// /// The left cond. public string LeftCond { get; private set; } public override bool IsBaseModule { get { return true; } } public override string[] OtherParams() { return this.Params; } public DynamicPubDetailed(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.LeftCond = args.Length > 7 ? args[7] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } } /// /// 基础档案动态链接库参数 /// public class DynamicBaseSelectModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// Amount值 /// /// The left cond. public string AmountValue { get; private set; } public override bool IsBaseModule { get { return true; } } public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicBaseSelectModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.AmountValue = args.Length > 7 ? args[7] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } } /// /// 单据动态链接库参数 /// public class DynamicMesStartModel : DynamicModel { private string[] Params; /// /// 单据编号 /// public string BillOrderNo; /// /// 单据表头主表sql /// public string BillMasterSql; /// /// 单据明细sql /// public string BillDetailSql; /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } public DynamicMesStartModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } if (args.Length > 7) { Params = new string[args.Length]; for (int i = 7; i < args.Length; i++) { Params[i - 7] = args[i]; } } this.BillMasterSql = args.Length > 12 ? args[12] : string.Empty; this.BillDetailSql = args.Length > 13 ? args[13] : string.Empty; this.BillOrderNo = args.Length > 14 ? args[14] : string.Empty; } } /// /// 拉样入口参数 /// public class DynamicLaYangModel : DynamicModel { /// /// 工单号 /// public string gdbillid; public string sqlValue; public string execParam; public DynamicLaYangModel(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleCode = args[5]; } if (args.Length > 5) { this.gdbillid = args[6]; this.sqlValue = args[7]; this.execParam = args[8]; } } } /// /// 产量报工入口参数 /// public class DynamicWorkReportModel : DynamicModel { /// /// planListid /// public string planlistid; public DynamicWorkReportModel(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleCode = args[5]; } if (args.Length > 5) { this.planlistid = args[6]; } } } /// /// 基础表格入口参数 /// public class DynamicBaseTableModel : DynamicModel { public string Key; public DynamicBaseTableModel(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleCode = args[5]; } if (args.Length > 5) { this.Key = args[6]; } } } /// /// 动态打印 /// public class DynamicPrint : DynamicModel { /// /// 连接参数 /// public string Data; public string StitchingAddress; public DynamicPrint(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { this.Data = args[6]; } if (args.Length > 7 && !string.IsNullOrWhiteSpace(args[7])) { this.StitchingAddress = args[7]; } } } /// /// 动态图片筛选 /// public class DynamicPicture : DynamicModel { /// /// 连接参数 /// public string Data; public DynamicPicture(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } } } /// /// 配置FastReport打印 /// public class DynamicFastReport : DynamicModel { /// /// 打印sql /// public string tmpSql; /// /// 打印sql1 /// public string tmpSql1; /// /// 打印sql2 /// public string tmpSql2; /// /// 打印名称 /// public string printFile; /// /// 打印类型 /// public int printStyle; /// /// 打印多份 /// public int MultipleCopies; public DynamicFastReport(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { this.tmpSql = args[6]; } if (args.Length > 7 && !string.IsNullOrWhiteSpace(args[7])) { this.tmpSql1 = args[7]; } if (args.Length > 8 && !string.IsNullOrWhiteSpace(args[8])) { this.tmpSql2 = args[8]; } if (args.Length > 9 && !string.IsNullOrWhiteSpace(args[9])) { this.printFile = args[9]; } if (args.Length > 10 && !string.IsNullOrWhiteSpace(args[10])) { this.printStyle = int.Parse(args[10]); } if (args.Length > 11 && !string.IsNullOrWhiteSpace(args[11])) { this.MultipleCopies = int.Parse(args[11]); } } } /// /// 配置PPT参数 /// public class DynamicCreatPPT : DynamicModel { /// /// 主sql配置全局变量 /// public string tmpMainSql; /// /// 配置模板ppt上的表格sql /// public string tmpTableSql; /// /// 配置模板上添加图片sql /// public string tmpImageSql; /// /// 配置ppt模板的名称 /// public string pptFile; public DynamicCreatPPT(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { this.pptFile = args[5]; } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { this.tmpMainSql = args[6]; } if (args.Length > 7 && !string.IsNullOrWhiteSpace(args[7])) { this.tmpTableSql = args[7]; } if (args.Length > 8 && !string.IsNullOrWhiteSpace(args[8])) { this.tmpImageSql = args[8]; } } } /// /// 新版配置打印报表余料功能 /// public class DynamicMesProduct : DynamicModel { /// /// 主键 /// public string ParmaryValue = string.Empty; public bool SearchControlEnable; public string unioParentKey; public string unioParentValue; public DynamicMesProduct(string[] args) : base(args) { if (args.Length > 6) { base.ModuleCode = args[6]; this.unioParentKey = args[7]; this.unioParentValue = args[8]; } } } /// /// 版辊dll模块 /// public class DynamicBgModel : DynamicModel { /// /// 主键 /// public string Goperatorname = ""; public string Gproductid = ""; public string Gjtid = "0"; public string GjtName = ""; public string DyBgModel = ""; public string Clientid = "0"; public string BgArg6 = ""; public string planlistid = ""; public string textBox = ""; public string gridIndex = ""; public int rowCount = 0; public DynamicBgModel(string[] args) : base(args) { if (args.Length > 6) { base.FormText = args[2]; Gjtid = args[5]; GjtName = args[6]; Gproductid = args[7]; DyBgModel = args[8]; Clientid = args[9]; BgArg6 = args[10]; planlistid = args[13]; //this.unioParentKey = args[7]; //this.unioParentValue = args[8]; } } } //public class DynamicModelLookUp : DynamicModel //{ // public string personnelId; // public int leftType; // public string rightSql = ""; // public DynamicModelLookUp(string[] args) // : base(args) // { // if (args.Length > 5) // { // this.personnelId = args[5]; // this.leftType = int.Parse(args[6]); // this.rightSql = args[7]; // } // } //} /// /// 备注框设置 /// public class DynamicNoteSettings : DynamicModel { //表名,关键字段名,关键字段值,关键信息说明,备注字段标签,备注字段名,执行脚本(成功后执行) public string tableName; public string keyFieldName; public string KeyFieldValue; public string keyInformationDescription; public string noteFieldLabel; public string noteFieldName; public string afterPerform; public DynamicNoteSettings(string[] args) : base(args) { tableName = args[5]; keyFieldName = args[6]; KeyFieldValue = args[7]; keyInformationDescription = args[8]; noteFieldLabel = args[9]; noteFieldName = args[10]; afterPerform = args[11]; } } /// /// 生产动态配置dll /// public class DynamicProductModel : DynamicModel { public string controlSql; public DynamicProductModel(string[] args) : base(args) { if (args.Length > 6) { base.ModuleCode = args[6]; controlSql = args[7]; } } } /// /// mrp功能链接模块 /// public class DynamicMrpAnalyzeModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// 左侧树结构 /// /// The left cond. public string LeftCond { get; set; } /// /// 是否为基础档案 /// /// true if this instance is base module; otherwise, false. public override bool IsBaseModule { get { return true; } } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicMrpAnalyzeModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.LeftCond = args.Length > 7 ? args[7] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } } /// ///图档功能链接模块 /// public class DynamicArtworkModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// 左侧树结构 /// /// The left cond. public string StepCode { get; set; } /// /// 是否为基础档案 /// /// true if this instance is base module; otherwise, false. public override bool IsBaseModule { get { return true; } } ///// ///// 主键名称 ///// ///// The left cond. //public string PrimaryKey { get; set; } ///// ///// 主键值 ///// ///// The left cond. //public string PrimaryValue { get; set; } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicArtworkModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.StepCode = args.Length > 7 ? args[7] : string.Empty; //this.PrimaryKey = args.Length > 8? args[8] : string.Empty; //this.PrimaryValue = args.Length > 9 ? args[9] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } } /// ///智能编码功能链接模块 /// public class DynamicProductSysMgeModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// 左侧树结构 /// /// The left cond. public string LeftCond { get; set; } /// /// 是否为基础档案 /// /// true if this instance is base module; otherwise, false. public override bool IsBaseModule { get { return true; } } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicProductSysMgeModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.LeftCond = args.Length > 7 ? args[7] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } } /// /// 智能编码模块链接模块 /// public class DynamicProductSmartModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// 方案Id /// /// The left cond. public string ProjectName { get; set; } /// /// 新增或修改标记 /// /// The left cond. public string IsAddOrUpdate { get; set; } /// /// 修改时对应的模块主键值 /// /// The left cond. public string PrimaryValue { get; set; } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化动态链接库参数 /// /// The arguments. public DynamicProductSmartModel(string[] args) : base(args) { if (args.Length > 5 && !string.IsNullOrWhiteSpace(args[5])) { base.ModuleCode = args[5]; } this.ProjectName = args.Length > 6 ? args[6] : ""; this.IsAddOrUpdate = args.Length > 7 ? args[7] : ""; this.PrimaryValue = args.Length > 8 ? args[8] : ""; if (args.Length > 5) { this.Params = new string[args.Length - 5]; for (int i = 5; i < args.Length; i++) { Params[i - 5] = args[i]; } } } } /// ///CAD功能链接模块 /// public class DynamicCadViewerModel : DynamicModel { /// /// 其他参数 /// /// The parameters. private string[] Params; /// /// 文件Url /// /// The left cond. public string filePathUrl { get; set; } /// /// 说明:传入特殊参数处理 /// 创建人:龚宇超 /// 创建日期:2018-04-03 /// 修改人: /// 修改日期: /// 修改备注: /// 版本:1.0 /// /// System.String[]. public override string[] OtherParams() { return this.Params; } /// /// 初始化基础档案动态链接库参数 /// /// The arguments. public DynamicCadViewerModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } this.filePathUrl = args.Length > 7 ? args[7] : string.Empty; if (args.Length > 8) { this.Params = new string[args.Length]; for (int i = 8; i < args.Length; i++) { Params[i - 8] = args[i]; } } } } /// /// PubSpecialImport入库参数 /// public class DynamicPubSpecialImport : DynamicModel { public string MenuName = ""; public string FirstRowIndex = ""; public string SpecialValueIndex = ""; public string SheetName = ""; /// /// 读取筛选条件 /// public string ReadTableCond = ""; /// /// 忽略合并明细列标题行 /// public bool CustomerServiceApp = false; /// /// 显示模式,如果为1则隐藏配置界面 /// public string ShowType = ""; /// /// 绑定程序列是单据还是单表(为1是单表) /// public string isBase = ""; public DynamicPubSpecialImport(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. MenuName = args[0]; if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } if (args.Length > 7 && !string.IsNullOrWhiteSpace(args[7])) { FirstRowIndex = args[7] + ""; } if (args.Length > 8 && !string.IsNullOrWhiteSpace(args[8])) { SpecialValueIndex = args[8] + ""; } if (args.Length > 9 && !string.IsNullOrWhiteSpace(args[9])) { SheetName = args[9] + ""; } if (args.Length > 10 && !string.IsNullOrWhiteSpace(args[10])) { ReadTableCond = args[10] + ""; } if (args.Length > 11 && !string.IsNullOrWhiteSpace(args[11])) { CustomerServiceApp = (args[11] + "").Equals("1"); } if (args.Length > 12 && !string.IsNullOrWhiteSpace(args[12])) { ShowType = args[12] + ""; } if (args.Length > 13 && !string.IsNullOrWhiteSpace(args[13])) { isBase = args[13] + ""; } } } /// /// 公共调用外部exe右键参数 /// public class DynamicPubInvokeExeModel : DynamicModel { /// /// 参数地址 /// public string url; /// /// 参数名字 /// public string name; /// /// idValue /// public string idValue; /// /// 配置关联sql /// /// public string ControlSql; public DynamicPubInvokeExeModel(string[] args) : base(args) { if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 5) { this.ModuleCode = args[6]; } if (args.Length > 6) { this.ControlSql = args[7]; } } } /// /// 凭证推送参数 /// public class DynamicVoucher : DynamicModel { /// /// planListid /// public string planlistid; public DynamicVoucher(string[] args) : base(args) { //if (!string.IsNullOrEmpty(args[5])) //{ // base.ModuleCode = args[5]; //} } } public class DynamicFrmProductSchedModel : DynamicModel { public override string[] OtherParams() { return this.Params; } /// /// 初始化默认参数(1.标题、2、用户ID、3.用户名、4.权限、5.模块编号、6.菜单ID) /// /// The arguments. public DynamicFrmProductSchedModel(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } if (args.Length > 10) { this.Params = new string[args.Length]; for (int i = 10; i < args.Length; i++) { Params[i - 10] = args[i]; } } if (!string.IsNullOrEmpty(args[args.Length - 1])) { try { JObject rowObject = JsonConvert.DeserializeObject(args[args.Length - 1]); JArray jArray = new JArray(); jArray.Add(rowObject); DataTable dataTable = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(jArray)); this.MaintabFocusedRow = dataTable.Rows[0]; } catch (Exception) { } } } } /// /// 导入dll /// public class DynamicImport : DynamicModel { /// /// 主键名称 /// public string PrimaryKey { get; set; } public DynamicImport(string[] args) : base(args) { // 右键菜单打开的模块没有moduleId,部分特殊模块没有moduleId比如添加界面. if (!string.IsNullOrEmpty(args[5])) { base.ModuleId = Convert.ToInt32(args[5]); } if (args.Length > 6 && !string.IsNullOrWhiteSpace(args[6])) { base.ModuleCode = args[6]; } if (args.Length > 7 ) { this.PrimaryKey = args[7]; } } } }