提交当前本机最新程序
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
using Lskj.Business;
|
||||
using Lskj.Model;
|
||||
using Lskj.Util;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.PubCodeDesign
|
||||
{
|
||||
/// <summary>
|
||||
/// c#库被调用统一接口类
|
||||
/// </summary>
|
||||
public sealed class DllBaseClass : IForm
|
||||
{
|
||||
public DllBaseClass()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DllBaseClass(string[] obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
FrmMain main = new FrmMain();
|
||||
DynamicCodeDesign moduleModel = new DynamicCodeDesign(obj);// 基础档案上下结构动态链接库参数
|
||||
main.Model = moduleModel;
|
||||
this.SubForm = main;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogUtil.WriteError("Lskj.PubChart.dll--参数错误-->" + obj.ToString(), ex);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 窗口
|
||||
/// </summary>
|
||||
public Form SubForm { get; set; }
|
||||
}
|
||||
public class DynamicCodeDesign : DynamicModel
|
||||
{
|
||||
public string ExecType = "0";
|
||||
public DynamicCodeDesign(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 && !string.IsNullOrWhiteSpace(args[7]))
|
||||
{
|
||||
ExecType = args[7];
|
||||
}
|
||||
if (!string.IsNullOrEmpty(args[args.Length - 1]))
|
||||
{
|
||||
try
|
||||
{
|
||||
JObject rowObject = JsonConvert.DeserializeObject<JObject>(args[args.Length - 1]);
|
||||
JArray jArray = new JArray();
|
||||
jArray.Add(rowObject);
|
||||
DataTable dataTable = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(jArray));
|
||||
this.MaintabFocusedRow = dataTable.Rows[0];
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user