Browse Source

修改统一使用登录时的DataHelper,减少无用链接数

章政 8 years ago
parent
commit
8170341af3
55 changed files with 60 additions and 174 deletions
  1. 1 1
      UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs
  2. 1 1
      UAS-MES/FunctionCode/Make/Make_BigBoxWeight.cs
  3. 1 1
      UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs
  4. 1 1
      UAS-MES/FunctionCode/Make/Make_CheckNoRelpace.cs
  5. 1 1
      UAS-MES/FunctionCode/Make/Make_CollectBTMAC.cs
  6. 1 1
      UAS-MES/FunctionCode/Make/Make_CollectNetCode.cs
  7. 1 1
      UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  8. 1 1
      UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs
  9. 1 1
      UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs
  10. 1 1
      UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.cs
  11. 1 1
      UAS-MES/FunctionCode/Make/Make_Decompose.cs
  12. 1 1
      UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs
  13. 1 1
      UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs
  14. 1 1
      UAS-MES/FunctionCode/Make/Make_GetReMakeSN.cs
  15. 1 1
      UAS-MES/FunctionCode/Make/Make_ImeiCheck.cs
  16. 1 1
      UAS-MES/FunctionCode/Make/Make_LabelCheck.cs
  17. 1 1
      UAS-MES/FunctionCode/Make/Make_MakeCancelDown.cs
  18. 1 1
      UAS-MES/FunctionCode/Make/Make_MakeDown.cs
  19. 1 1
      UAS-MES/FunctionCode/Make/Make_NewBadCode.cs
  20. 1 1
      UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.cs
  21. 1 1
      UAS-MES/FunctionCode/Make/Make_NewBigBox.cs
  22. 1 1
      UAS-MES/FunctionCode/Make/Make_NewMatainInf.cs
  23. 1 1
      UAS-MES/FunctionCode/Make/Make_PackageCollection.cs
  24. 1 1
      UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs
  25. 1 1
      UAS-MES/FunctionCode/Make/Make_PalletCollection.cs
  26. 1 1
      UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs
  27. 2 1
      UAS-MES/FunctionCode/Make/Make_PalletWeightRecord.cs
  28. 1 1
      UAS-MES/FunctionCode/Make/Make_PositionStock.cs
  29. 1 1
      UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs
  30. 1 1
      UAS-MES/FunctionCode/Make/Make_Repair.cs
  31. 1 1
      UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs
  32. 1 1
      UAS-MES/FunctionCode/Make/Make_SeqTransform.cs
  33. 1 1
      UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs
  34. 1 1
      UAS-MES/FunctionCode/Make/Make_TestCollection.cs
  35. 1 1
      UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.cs
  36. 1 1
      UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs
  37. 1 1
      UAS-MES/FunctionCode/OQC/OQC_CheckNoSplit.cs
  38. 1 1
      UAS-MES/FunctionCode/OQC/OQC_Inspection.cs
  39. 1 2
      UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs
  40. 1 1
      UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs
  41. 1 1
      UAS-MES/FunctionCode/Packing/Packing_CartonSplit.cs
  42. 1 1
      UAS-MES/FunctionCode/Packing/Packing_CartonTransfer.cs
  43. 1 1
      UAS-MES/FunctionCode/Packing/Packing_ProdWeightSet.cs
  44. 0 120
      UAS-MES/FunctionCode/Query/Quert_RealTime.resx
  45. 2 1
      UAS-MES/FunctionCode/Query/Query_ExeProgress.cs
  46. 2 1
      UAS-MES/FunctionCode/Query/Query_MakeInf.cs
  47. 2 1
      UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs
  48. 1 1
      UAS-MES/FunctionCode/Special/Special_BoxSplit.cs
  49. 2 1
      UAS-MES/FunctionCode/Special/Special_CancelCollection.cs
  50. 1 1
      UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs
  51. 1 1
      UAS-MES/FunctionCode/Warehouse/Warehouse_NewPiInOut.cs
  52. 2 1
      UAS-MES/FunctionCode/Warehouse/Warehouse_ProdDetail.cs
  53. 1 1
      UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.cs
  54. 1 0
      UAS-MES/Login.cs
  55. 1 1
      UAS-MES/PublicForm/ChangePwd.cs

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -72,7 +72,7 @@ namespace UAS_MES.Make
             SetLoadingWindow stw = new SetLoadingWindow(thread, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void Clean_Click(object sender, EventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_BigBoxWeight.cs

@@ -77,7 +77,7 @@ namespace UAS_MES.Make
             printcount = 0;
             weightsum.Text = printcount + "";
             StartWeight.PerformClick();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
 

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CartonBoxWeigh.cs

@@ -75,7 +75,7 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             StartWeight.PerformClick();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CheckNoRelpace.cs

@@ -21,7 +21,7 @@ namespace UAS_MES.Make
 
         private void Make_CheckNoRelpace_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void ReplaceCheckNo_Click(object sender, EventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CollectBTMAC.cs

@@ -49,7 +49,7 @@ namespace UAS_MES.Make
             asc.controllInitializeSize(this);
             printcount = 0;
             sncode.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CollectNetCode.cs

@@ -41,7 +41,7 @@ namespace UAS_MES.Make
         {
             asc.controllInitializeSize(this);
             sncode.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -72,7 +72,7 @@ namespace UAS_MES.Make
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
             OperateResult.AppendText(">>请输入TSN\n", Color.Black);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -72,7 +72,7 @@ namespace UAS_MES.Make
             Lock.GetMakeCodeCtl(ma_code);
             ma_code.SetLockCheckBox(Lock);
             code.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -61,7 +61,7 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             StartWeight.PerformClick();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -63,7 +63,7 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             pr_code.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
         private void InPrint()
         {

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -58,7 +58,7 @@ namespace UAS_MES.Make
             OperateResult.AppendText(">>请输入序列号\n");
             count = 0;
             deccount.Text = count + "";
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void sn_code_KeyDown(object sender, KeyEventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_FeedingCollection.cs

@@ -75,7 +75,7 @@ namespace UAS_MES.Make
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DBChange;
             code.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -54,7 +54,7 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             sncode.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -73,7 +73,7 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             sn_code.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void Ma_code_DbChange(object sender, EventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_ImeiCheck.cs

@@ -48,7 +48,7 @@ namespace UAS_MES.Make
             //打开界面提示用户:请输入SN 
             OperateResult.AppendText(">>请输入SN\n", Color.Black);
             sql = new LogStringBuilder();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_LabelCheck.cs

@@ -54,7 +54,7 @@ namespace UAS_MES.Make
             //打开界面提示用户:请输入SN 
             OperateResult.AppendText(">>请采集SN\n", Color.Black);
             sql = new LogStringBuilder();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_MakeCancelDown.cs

@@ -37,7 +37,7 @@ namespace UAS_MES.Make
             asc.controllInitializeSize(this);
             md_code_rb.Focus();
             ChooseAll.ChooseAll(LabelDataGridView);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void Make_MakeCancelDown_SizeChanged(object sender, EventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_MakeDown.cs

@@ -49,7 +49,7 @@ namespace UAS_MES.Make
         private void Make_MakeDown_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             sn_code.Focus();
             make_count.Text = count.ToString();
             string[] param = new string[] { caller, make_count.Text, _macode };

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_NewBadCode.cs

@@ -55,7 +55,7 @@ namespace UAS_MES.Make
 
         private void Make_NewBadCode_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             ms_makecode.Text = macode;
             ms_sncode.Text = sncode;
             string pr_code = dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_sncode='" + sncode + "' and ms_makecode='" + macode + "'").ToString();

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_NewBadCode_DE.cs

@@ -59,7 +59,7 @@ namespace UAS_MES.Make
 
         private void Make_NewBadCode_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             ms_makecode.Text = macode;
             ms_sncode.Text = sncode;
             string pr_code = dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_sncode='" + sncode + "' and ms_makecode='" + macode + "'").ToString();

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_NewBigBox.cs

@@ -37,7 +37,7 @@ namespace UAS_MES.Make
 
         private void 新增栈板_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             pr_code.FormName = Name;
             pr_code.SetValueField = new string[] { "pr_code", "pr_bigboxinnerqty" };
             pr_code.TableName = "product";

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_NewMatainInf.cs

@@ -72,7 +72,7 @@ namespace UAS_MES.Make
 
         private void Make_NewMatainInf_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             string pr_code = dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_sncode='" + sncode + "'").ToString();
             string pk_code = dh.getFieldDataByCondition("product left join productkind on pk_name=pr_kind", "pk_code", "pr_code='" + pr_code + "'").ToString();
             //加载不良原因组数据

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -68,7 +68,7 @@ namespace UAS_MES.Make
             }
             catch (Exception) { }
             sn_code.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -107,7 +107,7 @@ namespace UAS_MES.Make
             }
             sn_code.Focus();
             md = new ModeBusTCPServer();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -71,7 +71,7 @@ namespace UAS_MES.Make
             stw.ShowDialog();
             OutBoxLength.Text = BaseUtil.GetCacheData("PalletLength").ToString();
             PalletPreFix.Text = BaseUtil.GetCacheData("PalletPreFix").ToString();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PalletWeigh.cs

@@ -62,7 +62,7 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             startWeigh.PerformClick();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             palletcode.Focus();
         }
 

+ 2 - 1
UAS-MES/FunctionCode/Make/Make_PalletWeightRecord.cs

@@ -7,12 +7,13 @@ using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 
 namespace UAS_MES.Make
 {
     public partial class Make_PalletWeightRecord : Form
     {
-        DataHelper dh = new DataHelper();
+        DataHelper dh =  SystemInf.dh;
 
         public Make_PalletWeightRecord()
         {

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_PositionStock.cs

@@ -46,7 +46,7 @@ namespace UAS_MES.Make
             sc_stepcode.Text = User.CurrentStepCode;
             ma_code.SetLockCheckBox(Lock);
             Lock.GetMakeCodeCtl(ma_code);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void Ma_code_DbChange(object sender, EventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_RePrintLabel.cs

@@ -66,7 +66,7 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             inputText.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void InPrint()

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_Repair.cs

@@ -80,7 +80,7 @@ namespace UAS_MES.Make
             bd_soncode.DbChange += Prodcode_DbChange;
 
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             GetSNCode.Focus();
         }
 

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -72,7 +72,7 @@ namespace UAS_MES.Make
             code.Focus();
             //提示用户“>>请输入TSN号”
             OperateResult.AppendText(">>请输入TSN号\n", Color.Black);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_SeqTransform.cs

@@ -454,7 +454,7 @@ namespace UAS_MES.Make
         private void Make_SeqTransform_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             sncode.Focus();
             OperateResult.AppendText(">>请输入TSN号\n", Color.Black);
             StepCount.StepCode = User.CurrentStepCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs

@@ -78,7 +78,7 @@ namespace UAS_MES.Make
             SetLoadingWindow stw = new SetLoadingWindow(thread, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             thread = new Thread(getSerialData);
             try
             {

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -71,7 +71,7 @@ namespace UAS_MES.Make
             ma_code.SetValueField = new string[] { "ma_code", "ma_prodcode", "ma_qty", "pr_detail", "ma_softversion", "ma_salecode", "nvl(pr_sendchecktype,'LineCode')pr_sendchecktype" };
             ma_code.Condition = "ma_statuscode='STARTED'";
             ma_code.DbChange += Ma_code_DbChange;
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_UpdateCollectCode.cs

@@ -53,7 +53,7 @@ namespace UAS_MES.Make
         private void Make_UpdateCollectCode_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             OperateResult.AppendText(">>请先勾选需要更新的项,通过采集栏输入SN,更新项具体数据\n", Color.Black);
             inputValue.Focus();
         }

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_BatchResultJudge.cs

@@ -28,7 +28,7 @@ namespace UAS_MES.OQC
 
         private void 抽检批维护_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             ob_checkno.Focus();
             asc.controllInitializeSize(this);
         }

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_CheckNoSplit.cs

@@ -31,7 +31,7 @@ namespace UAS_MES.OQC
         private void OQC_CheckNoSplit_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void OQC_CheckNoSplit_SizeChanged(object sender, EventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_Inspection.cs

@@ -29,7 +29,7 @@ namespace UAS_MES.OQC
         private void 生成送检批_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             //工单号放大镜配置
             ma_code.TableName = "make";
             ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号";

+ 1 - 2
UAS-MES/FunctionCode/OQC/OQC_PlanMaintain.cs

@@ -26,8 +26,7 @@ namespace UAS_MES.OQC
         private void 抽样计划维护_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
-
+            dh = SystemInf.dh;
             pr_code.TableName = "QUA_Project";
             pr_code.SelectField = "pr_code # 方案编号,pr_name # 方案名称,pr_class # 检验单类型,pr_standard # 方案标准,pr_startdate # 生效日期,pr_enddate #失效日期 ,pr_status # 状态";
             pr_code.SetValueField = new string[] { "pr_code" };

+ 1 - 1
UAS-MES/FunctionCode/OQC/OQC_SamplingDataCollection.cs

@@ -37,7 +37,7 @@ namespace UAS_MES.OQC
         {
             asc.controllInitializeSize(this);
             BaseUtil.SetDgvColumnComboxData((DataGridViewComboBoxColumn)CheckTypeDGV.Columns["oi_leveldefect"], "oi_leveldefect", "display", "value", LevelDefect);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void 抽样数据采集_SizeChanged(object sender, EventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Packing/Packing_CartonSplit.cs

@@ -43,7 +43,7 @@ namespace UAS_MES.Packing
             asc.controllInitializeSize(this);
             OperateResult.AppendText(">>请输入箱号\n", Color.Black);
             pa_outboxcode.Focus();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void pa_outboxcode_KeyDown(object sender, KeyEventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Packing/Packing_CartonTransfer.cs

@@ -48,7 +48,7 @@ namespace UAS_MES.Packing
         private void Packing_CartonTransfer_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             movepack.Focus();
             OperateResult.AppendText(">>请输入目标箱号\n", Color.Black);
         }

+ 1 - 1
UAS-MES/FunctionCode/Packing/Packing_ProdWeightSet.cs

@@ -64,7 +64,7 @@ namespace UAS_MES.Packing
             ma_code.SetValueField = new string[] { "ma_code","pr_code","pr_detail","pr_spec" };
             ma_code.DbChange += Ma_code_DbChange;
 
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             //开始称重
             startWeigh.PerformClick();
         }

+ 0 - 120
UAS-MES/FunctionCode/Query/Quert_RealTime.resx

@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 2 - 1
UAS-MES/FunctionCode/Query/Query_ExeProgress.cs

@@ -8,6 +8,7 @@ using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Query
@@ -44,7 +45,7 @@ namespace UAS_MES.Query
 
         private void Query_ExeProgress_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             ScreenWidth = this.Width;
             ScreenHeight = this.Height;
             asc.controllInitializeSize(this);

+ 2 - 1
UAS-MES/FunctionCode/Query/Query_MakeInf.cs

@@ -8,6 +8,7 @@ using System.Text;
 using System.Windows.Forms;
 using UAS_MES.CustomControl.TextBoxWithIcon;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Query
@@ -26,7 +27,7 @@ namespace UAS_MES.Query
         private void Query_MakeInf_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void Query_MakeInf_SizeChanged(object sender, EventArgs e)

+ 2 - 1
UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs

@@ -7,6 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Query
@@ -30,7 +31,7 @@ namespace UAS_MES.Query
         private void Query_OnlineTraceBack_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             DataColumn status = new DataColumn("status");
             DataColumn statuscode = new DataColumn("statuscode");
             ComBoxData.Columns.Add(status);

+ 1 - 1
UAS-MES/FunctionCode/Special/Special_BoxSplit.cs

@@ -25,7 +25,7 @@ namespace UAS_MES.Special
 
         private void Special_BoxSplit_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
         }
 
         private void Split_Click(object sender, EventArgs e)

+ 2 - 1
UAS-MES/FunctionCode/Special/Special_CancelCollection.cs

@@ -7,6 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Special
@@ -14,7 +15,7 @@ namespace UAS_MES.Special
     public partial class Special_CancelCollection : Form
     {
 
-        DataHelper dh = new DataHelper();
+        DataHelper dh = SystemInf.dh;
 
         LogStringBuilder sql = new LogStringBuilder();
 

+ 1 - 1
UAS-MES/FunctionCode/Warehouse/Warehouse_FinishedProductOut.cs

@@ -52,7 +52,7 @@ namespace UAS_MES.Warehouse
             pi_inoutno.Condition = "pi_pdastatus<>'已出库' and pi_class='出货单'";
             pi_inoutno.DbChange += Pi_inoutno_DbChange;
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             needMakeIn = dh.GetConfig("needMakeIn", "MESSetting").ToString();
             input.Focus();
             OperateResult.AppendText("请输入栈板进行采集\n", Color.Black, input);

+ 1 - 1
UAS-MES/FunctionCode/Warehouse/Warehouse_NewPiInOut.cs

@@ -94,7 +94,7 @@ namespace UAS_MES.Warehouse
 
         private void Warehouse_NewPiInOut_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             caller = "ProdInOut";
             cu_code.TableName = "customer";
             cu_code.DBTitle = "出货单查询";

+ 2 - 1
UAS-MES/FunctionCode/Warehouse/Warehouse_ProdDetail.cs

@@ -8,6 +8,7 @@ using System.Runtime.InteropServices;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.Warehouse
@@ -35,7 +36,7 @@ namespace UAS_MES.Warehouse
 
         public Warehouse_ProdDetail(string pim_inoutno,string pd_piid)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             InitializeComponent();
             this.pim_inoutno = pim_inoutno;
             this.pd_piid = pd_piid;

+ 1 - 1
UAS-MES/FunctionCode/Warehouse/Warehouse_ProductMakeIn.cs

@@ -464,7 +464,7 @@ namespace UAS_MES.Warehouse
             asc.controllInitializeSize(this);
             getcount = 0;
             getqty.Text = getcount.ToString();
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             sql.Clear();
             sql.Append("select pim_id,pim_outboxcode,pim_mac,pim_prodcode,pr_detail,pr_spec from prodiomac ");
             sql.Append("left join product on pr_code=pim_prodcode where pr_detail is null");

+ 1 - 0
UAS-MES/Login.cs

@@ -98,6 +98,7 @@ namespace UAS_MES
             SystemInf.ScreenHeight = Screen.PrimaryScreen.WorkingArea.Height;
             //重新执行一遍构造函数使得重置之后的链接字符串生效
             dh = new DataHelper();
+            SystemInf.dh = dh;
             string ErrorMessage = "";
             //验证用户名和密码
             if (LogicHandler.CheckUserLogin(UserName.Text, PassWord.Text, out ErrorMessage))

+ 1 - 1
UAS-MES/PublicForm/ChangePwd.cs

@@ -62,7 +62,7 @@ namespace UAS_MES.PublicForm
 
         private void ChangePwd_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             UserName.Text = BaseUtil.GetCacheData("LastLoginUser").ToString();
             Confirm.Enabled = false;