ab56a9bcf7
SVN-Revision: r240
151 lines
4.9 KiB
C#
151 lines
4.9 KiB
C#
/******************************
|
|
* 说明:Lskj.PubPageDetail 入口函数
|
|
* 创建人:龚宇超
|
|
* 创建日期:2018-04-03
|
|
* 修改人:
|
|
* 修改日期:
|
|
* 修改备注:
|
|
* 版本:1.0.0.0
|
|
******************************/
|
|
using Lskj.Business;
|
|
using Lskj.Business.Impl;
|
|
using Lskj.Core;
|
|
using Lskj.Model;
|
|
using Lskj.Util;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Lskj.PubPdfSign
|
|
{
|
|
/// <summary>
|
|
/// c#库被调用统一接口类
|
|
/// </summary>
|
|
public sealed class DllBaseClass : IForm
|
|
{
|
|
public DllBaseClass()
|
|
{
|
|
}
|
|
public DllBaseClass(string[] obj)
|
|
{
|
|
try
|
|
{
|
|
DynamicPdfSignModel pdfSignModel = new DynamicPdfSignModel(obj);
|
|
CreateSignTempTable();
|
|
CreateSignLocationTable();
|
|
if (string.IsNullOrEmpty(pdfSignModel.Type) || (pdfSignModel.Type + "").Equals("0"))
|
|
{
|
|
FrmDesign main = new FrmDesign();
|
|
this.SubForm = main;
|
|
main.PdfSignModel = pdfSignModel;
|
|
|
|
}
|
|
else if ((pdfSignModel.Type + "").Equals("1") || (pdfSignModel.Type + "").Equals("2"))
|
|
{
|
|
FrmAddSign main = new FrmAddSign();
|
|
this.SubForm = main;
|
|
main.PdfSignModel = pdfSignModel;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogUtil.WriteError("Lskj.PubPdfSign.dll--参数错误-->" + obj.ToString(), ex);
|
|
}
|
|
}
|
|
private void CreateSignTempTable()
|
|
{
|
|
Dictionary<string, string> tableColDic = new Dictionary<string, string>();
|
|
tableColDic.Add("versionName", "varchar(200)");
|
|
tableColDic.Add("pdfUrl", "varchar(1000)");
|
|
BaseImpl.CheckTable(tableColDic, "P_SignTempTable");
|
|
}
|
|
private void CreateSignLocationTable()
|
|
{
|
|
Dictionary<string, string> tableColDic = new Dictionary<string, string>();
|
|
tableColDic.Add("mainId", "int");
|
|
tableColDic.Add("stepCode", "varchar(100)");
|
|
tableColDic.Add("pageNum", "int");
|
|
tableColDic.Add("absoluteY", "numeric(18,2)");
|
|
tableColDic.Add("absoluteX", "numeric(18,2)");
|
|
tableColDic.Add("pdfImageWidth", "numeric(18,2)");
|
|
tableColDic.Add("pdfImageHeight", "numeric(18,2)");
|
|
BaseImpl.CheckTable(tableColDic, "P_SignLocationTable");
|
|
}
|
|
/// <summary>
|
|
/// 窗口
|
|
/// </summary>
|
|
public Form SubForm { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 入口模型
|
|
/// </summary>
|
|
public class DynamicPdfSignModel : DynamicModel
|
|
{
|
|
/// <summary>
|
|
/// 审批模块号
|
|
/// </summary>
|
|
/// <value>The primary value.</value>
|
|
public string TypeCode { get; private set; }
|
|
/// <summary>
|
|
/// 审批步骤号
|
|
/// </summary>
|
|
/// <value>The primary value.</value>
|
|
public string StepCode { get; private set; }
|
|
/// <summary>
|
|
/// 单据主键
|
|
/// </summary>
|
|
public string PrimaryValue { get; private set; }
|
|
/// <summary>
|
|
/// 签章版本号
|
|
/// </summary>
|
|
public string VersionCode { get; private set; }
|
|
/// <summary>
|
|
/// 类型
|
|
/// </summary>
|
|
/// <value>0设计,1签章预览, 2签章预览并上传</value>
|
|
public string Type { get; private set; }
|
|
/// <summary>
|
|
/// 是否是已完成单据
|
|
/// </summary>
|
|
/// <value>0否,1是</value>
|
|
public string IsFinishPage { get; private set; }
|
|
/// <summary>
|
|
/// 其他参数
|
|
/// </summary>
|
|
/// <value>The parameters.</value>
|
|
public string[] Params;
|
|
/// <summary>
|
|
/// 初始化默认参数(1.标题、2、用户ID、3.用户名、4.权限、5.模块编号、6.菜单ID)
|
|
/// </summary>
|
|
/// <param name="args">The arguments.</param>
|
|
public DynamicPdfSignModel(string[] args)
|
|
: base(args)
|
|
{
|
|
if (args.Length > 4)
|
|
this.TypeCode = args[4];
|
|
if (args.Length > 5)
|
|
base.ModuleCode = args[5];
|
|
if (args.Length > 6)
|
|
this.StepCode = args[6];
|
|
if (args.Length > 7)
|
|
this.PrimaryValue = args[7];
|
|
if (args.Length > 8)
|
|
this.VersionCode = args[8];
|
|
if (args.Length > 9)
|
|
this.Type = args[9];
|
|
if (args.Length > 10)
|
|
this.IsFinishPage = args[10];
|
|
if (args.Length > 11)
|
|
{
|
|
this.Params = new string[11];
|
|
for (int i = 11; i < args.Length; i++)
|
|
{
|
|
Params[i - 11] = args[i];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|