100 lines
4.1 KiB
C#
100 lines
4.1 KiB
C#
/******************************
|
|
* 说明:基础档案审批入口
|
|
* 创建人:龚宇超
|
|
* 创建日期:2017-12-12
|
|
* 修改人:
|
|
* 修改日期:
|
|
* 修改备注:
|
|
* 版本:1.0.0.0
|
|
******************************/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Lskj.Util;
|
|
using System.Windows.Forms;
|
|
using Lskj.Model;
|
|
using Lskj.Business;
|
|
using Lskj.BaseAccraditation;
|
|
using Lskj.Control;
|
|
using Lskj.Data;
|
|
using System.Data;
|
|
using Lskj.Business.Impl;
|
|
using System.Collections;
|
|
|
|
namespace Lskj.BaseAccraditation
|
|
{
|
|
/// <summary>
|
|
/// 基础档案审批模板入口
|
|
/// </summary>
|
|
public class DllBaseClass : IForm
|
|
{
|
|
public DllBaseClass()
|
|
{
|
|
|
|
}
|
|
|
|
public DllBaseClass(string[] obj)
|
|
{
|
|
try
|
|
{
|
|
if (obj.Length >= 8 && !string.IsNullOrEmpty(obj[5]) && !string.IsNullOrEmpty(obj[6]) && !string.IsNullOrEmpty(obj[7]))
|
|
{
|
|
DynamicBaseAccraditionPopModel DynamicBaseModel = new DynamicBaseAccraditionPopModel(obj);
|
|
DataRow modelRow = MainImpl.GetSystemdllTab(DynamicBaseModel.ModuleCode);//获取单个模块信息
|
|
if (modelRow == null)
|
|
{
|
|
throw new Exception(string.Format("模块信息{0}不存在", DynamicBaseModel.ModuleCode));
|
|
}
|
|
BaseAccraditationModel baseAccraditationModel = new BaseAccraditationModel(modelRow);
|
|
if (!string.IsNullOrWhiteSpace(baseAccraditationModel.FilePreviewCode))
|
|
{
|
|
string[] defaultArgs = string.Format(ModuleArgs.DefaultArgs, DynamicBaseModel.FormText, ERPInfo.Instance.UserId, ERPInfo.Instance.UserName, DynamicBaseModel.Privilege, DynamicBaseModel.ModuleCode).Split('~');
|
|
////模块Id/stepcode/点击数据键值/权限
|
|
string[] menuArgsNew = { "", baseAccraditationModel.FilePreviewCode + "", DynamicBaseModel.StepCode, DynamicBaseModel.PrimaryValue };
|
|
string[] str = defaultArgs.Concat(menuArgsNew).ToArray();
|
|
IForm form = FormHelper.LoadDllForm("Lskj.PubArtworkPreview.dll", str);
|
|
if (form == null)
|
|
{
|
|
MessageUtil.Show(ResourceKeys.DyncmicDllNotFount);
|
|
return;
|
|
}
|
|
if (form.SubForm == null)
|
|
{
|
|
MessageUtil.Show(ResourceKeys.DyncmicDllInitFault);
|
|
return;
|
|
}
|
|
form.SubForm.WindowState = FormWindowState.Maximized;
|
|
form.SubForm.StartPosition = FormStartPosition.CenterScreen;
|
|
form.SubForm.Text = "图档审核";
|
|
this.SubForm = form.SubForm;
|
|
return;
|
|
}
|
|
FrmBaseAccraditation popupForm = new FrmBaseAccraditation();
|
|
popupForm.SysModel = DynamicBaseModel;
|
|
popupForm.Opacity = 0;
|
|
popupForm.SysModel.DataCaches = new Dictionary<object, Hashtable>();
|
|
if (SystemInfo.Instance.OptimizationSpeed) popupForm.GetDataCaches(popupForm.SysModel.DataCaches);
|
|
this.SubForm = popupForm;
|
|
|
|
}
|
|
else
|
|
{
|
|
FrmMain main = new FrmMain();
|
|
this.SubForm = main;
|
|
main.SysModel = new DynamicBaseAccraditionModel(obj);
|
|
main.SysModel.DataCaches = new Dictionary<object, Hashtable>();
|
|
if (SystemInfo.Instance.OptimizationSpeed) main.GetDataCaches(main.SysModel.DataCaches);
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogUtil.WriteError("Lskj.BaseAccraditation.dll--参数错误-->" + obj.ToString(), ex);
|
|
}
|
|
|
|
}
|
|
|
|
public Form SubForm { get; set; }
|
|
}
|
|
}
|