基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
+111
View File
@@ -0,0 +1,111 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;
namespace NewMyFormDesigner
{
static class Program
{
/// <summary>{FB58ED9E-DD23-4CD9-98AB-4059609ADB87}
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
try
{
MyFormDesigner myFormDesigner = new MyFormDesigner();
//myFormDesigner.FrmKey = "{80d30957-bca9-4ad4-8cf6-2e947e92b89b}";
//myFormDesigner.SelectSQL = @"select b.orderid,b.id as fieldid,fieldname,username1 as username,
// fieldsqltag as fieldtypeid,defaultdate as defaultValue
// from p_systemDlltab a
// left join p_systemwordbooktab b on a.DllCoid=b.tab where a.formkey='{80d30957-bca9-4ad4-8cf6-2e947e92b89b}' and fieldsqltag<>3 and username1 is not null and isnull(addVisible,0)=0";
//myFormDesigner.updateSQL = @"update p_systemwordbooktab set controlleft=b.controlleft ,controlTop=b.controlTop, controlHeight=b.controlHeight,controlWidth=b.controlWidth, tabOrder=b.tabOrder from p_systemControlLocation b where p_systemwordbooktab.formKey=b.formKey and p_systemwordbooktab.id=b.fieldId and b.formkey='{80d30957-bca9-4ad4-8cf6-2e947e92b89b}'";
//myFormDesigner.ServerName = "222.209.207.65,37892";
//myFormDesigner.DatabaseName = "lserp_xdsy";
//myFormDesigner.AccountNumber = "lserpAdmin";
//myFormDesigner.Password = "";//XDerp20210411%
//MessageBox.Show(args.Length + "");
//MessageBox.Show(args[0]);
//System.Windows.Forms.Clipboard.SetText(args[0]);
//MessageBox.Show(args[1]);
//System.Windows.Forms.Clipboard.SetText(args[1]);
//MessageBox.Show(args[2]);
//System.Windows.Forms.Clipboard.SetText(args[2]);
//MessageBox.Show(args[3]);
//--------------------------------------------
myFormDesigner.FrmKey = args[0];
myFormDesigner.SelectSQL = args[1];
myFormDesigner.updateSQL = args[2];
if (args.Length >= 4)
{
string LinkString = args[3] + "";
string[] Links = LinkString.Split('^');
if (Links.Length >= 4)
{
myFormDesigner.ServerName = Links[0];
myFormDesigner.DatabaseName = Links[1];
myFormDesigner.AccountNumber = Links[2];
myFormDesigner.Password = Links[3];
}
}
if (args.Length > 3 && !string.IsNullOrEmpty(args[3]))
{
// 打开基础档案设计界面
if ("1".Equals(args[3]))
{
myFormDesigner.SelectSQL = @"select b.orderid,b.id as fieldid,fieldname,username1 as username,
fieldsqltag as fieldtypeid,defaultdate as defaultValue
from p_systemDlltab a
left join p_systemwordbooktab b on a.DllCoid=b.tab where a.formkey='" + myFormDesigner.FrmKey + "' and fieldsqltag<>3 and username1 is not null and isnull(addVisible,0)=0";
myFormDesigner.updateSQL = @"update p_systemwordbooktab set controlleft=b.controlleft ,controlTop=b.controlTop, controlHeight=b.controlHeight,controlWidth=b.controlWidth, tabOrder=b.tabOrder
from p_systemControlLocation b where p_systemwordbooktab.formKey=b.formKey and p_systemwordbooktab.id=b.fieldId and b.formkey='" + myFormDesigner.FrmKey + "'";
}
else if ("2".Equals(args[3]))
{
// 打开单据设计界面
myFormDesigner.SelectSQL = @"select b.orderid,b.id as fieldid,sysname,username as username,
fieldTypeId as fieldtypeid,defaultValue as defaultValue
from p_systembilltype a
left join P_systembillinfo b on a.typecode=b.typecode where a.formkey='" + myFormDesigner.FrmKey + "' and fieldTypeId<>3 and userName is not null";
myFormDesigner.updateSQL = @"update P_systembillinfo set controlleft=b.controlleft ,controlTop=b.controlTop, controlHeight=b.controlHeight,controlWidth=b.controlWidth, tabOrder=b.tabOrder
from p_systemControlLocation b where P_systembillinfo.formKey=b.formKey and P_systembillinfo.id=b.fieldId and b.formkey='" + myFormDesigner.FrmKey + "'";
}
}
//MessageBox.Show(args[0]);
//System.Windows.Forms.Clipboard.SetText(args[0]);
//MessageBox.Show(args[1]);
//System.Windows.Forms.Clipboard.SetText(args[1]);
//MessageBox.Show(args[2]);
//System.Windows.Forms.Clipboard.SetText(args[2]);
File.WriteAllLines("myformDesinger.txt", args);
Application.Run(myFormDesigner);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
}