ab56a9bcf7
SVN-Revision: r240
76 lines
2.3 KiB
C#
76 lines
2.3 KiB
C#
using Lskj.Control;
|
|
using Lskj.Core;
|
|
using Lskj.Model;
|
|
using Lskj.Util;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Lskj.QuickModule
|
|
{
|
|
public partial class FormMain : BaseForm
|
|
{
|
|
public FormMain(string[] args)
|
|
{
|
|
InitializeComponent();
|
|
InitControls(args);
|
|
}
|
|
|
|
public void InitControls(string[] args)
|
|
{
|
|
this.ReloadGridData();
|
|
//IForm iform = FormHelper.LoadDllForm("Lskj.Report.dll", new string[] { "快捷键F4弹出物料选择", "1", "管理员", "1","3213224","4017" });
|
|
ERPInfo.Instance.Password = args[args.Length - 1];
|
|
ERPInfo.Instance.UserName = args[args.Length - 2];
|
|
ERPInfo.Instance.UserId = args[args.Length - 3];
|
|
string dllname = args[args.Length - 4];
|
|
|
|
List<string> argsNew = args.ToList();
|
|
argsNew.RemoveRange(argsNew.Count - 4,4);
|
|
IForm iform = FormHelper.LoadDllForm(dllname, argsNew.ToArray());
|
|
iform.SubForm.WindowState = FormWindowState.Normal; ;
|
|
Form form = iform.SubForm; //表示组成应用程序的用户界面的窗口或对话框。
|
|
form.TopLevel = false;
|
|
form.Dock = DockStyle.Fill;//客户需要缩放
|
|
form.AutoSize = true;
|
|
this.Text = form.Text;
|
|
form.FormBorderStyle = FormBorderStyle.None;
|
|
|
|
this.Height = form.Height;
|
|
this.Width = form.Width;
|
|
this.TopMost = true;
|
|
form.Parent = this;
|
|
form.Show();
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>说明:链接数据库</para>
|
|
/// <para>创建人:龚宇超</para>
|
|
/// <para>创建日期:2019-09-10 </para>
|
|
/// <para>修改人:</para>
|
|
/// <para>修改日期:</para>
|
|
/// <para>修改备注:</para>
|
|
/// <para>版本:1.0</para>
|
|
/// </summary>
|
|
void ReloadGridData()
|
|
{
|
|
try
|
|
{
|
|
DBConfig.Instance.ReadConfig();
|
|
DBConfig.Instance.CreateConnection();
|
|
}
|
|
catch (Exception)
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|