Sfoglia il codice sorgente

修改数据库引用

章政 7 anni fa
parent
commit
862c611220

+ 1 - 1
UAS-MES/CustomControl/AccordionMenu/AccordionMenu.cs

@@ -54,7 +54,7 @@ namespace UAS_MES.CustomControl.AccordionMenu
             this.Width = m_nPanFunWidth;
 
             //查询该用户所在的组别有权限查看的模块
-            dh = new DataHelper();
+            dh = SystemInf.dh;
 
             if (User.UserAccountType == "admin")
             {

+ 2 - 1
UAS-MES/CustomControl/Pagination/Pagination.cs

@@ -4,6 +4,7 @@ using System.Data;
 using System.IO;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 
 namespace UAS_MES.CustomControl.Pagination
 {
@@ -52,7 +53,7 @@ namespace UAS_MES.CustomControl.Pagination
         bool AddEnable1;
         DataGridView Dgv;
         DataTable dt;
-        DataHelper dh = new DataHelper();
+        DataHelper dh = SystemInf.dh;
 
         public bool DeleteEnable
         {

+ 2 - 1
UAS-MES/CustomControl/Pagination/PaginationDbFind.cs

@@ -4,6 +4,7 @@ using System.Data;
 using System.IO;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 
 namespace UAS_MES.CustomControl.Pagination
 {
@@ -52,7 +53,7 @@ namespace UAS_MES.CustomControl.Pagination
         bool AddEnable1;
         DataGridView Dgv;
         DataTable dt;
-        DataHelper dh = new DataHelper();
+        DataHelper dh = SystemInf.dh;
 
         public bool DeleteEnable
         {

+ 2 - 1
UAS-MES/CustomControl/TextBoxWithIcon/BlurSearch.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.CustomControl.TextBoxWithIcon
 {
     public partial class BlurSearch : UserControl
     {
-        DataHelper dh = new DataHelper();
+        DataHelper dh = SystemInf.dh;
 
         public delegate void OnTextChange(object sender, EventArgs e);
 

+ 2 - 1
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -4,6 +4,7 @@ using System.Data;
 using System.Windows.Forms;
 using UAS_MES.CustomControl.CustomCheckBox;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.CustomControl.TextBoxWithIcon
@@ -264,7 +265,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
 
         public void GetData(bool LeaveOrEnter)
         {
-            DataHelper dh = new DataHelper();
+            DataHelper dh = SystemInf.dh;
             string sql = "";
             //将查询到的结果返回界面
             if (TextBox.Text != "")

+ 2 - 1
UAS-MES/CustomControl/TextBoxWithIcon/SearchTextBox.cs

@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Data;
 using System.Windows.Forms;
 using UAS_MES.DataOperate;
+using UAS_MES.Entity;
 using UAS_MES.PublicMethod;
 
 namespace UAS_MES.CustomControl.TextBoxWithIcon
@@ -322,7 +323,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
 
         public void GetData()
         {
-            DataHelper dh = new DataHelper();
+            DataHelper dh = SystemInf.dh;
             string sql = "";
             //将查询到的结果返回界面
             if (TextBox.Text != "")

+ 2 - 1
UAS-MES/FunctionCode/Query/Query_ProductTraceBack.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
@@ -26,7 +27,7 @@ namespace UAS_MES.Query
         private void 产品制程追溯_Load(object sender, EventArgs e)
         {
             asc.controllInitializeSize(this);
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             ma_code.TableName = "make left join product on ma_prodcode=pr_code";
             ma_code.SelectField = "ma_code # 工单号,ma_prodcode # 产品编号,ma_qty # 工单数量,pr_detail # 产品名称";
             ma_code.FormName = Name;

+ 2 - 1
UAS-MES/FunctionCode/SystemSetting/SystemSetting_SysNav.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.SystemSetting
@@ -23,7 +24,7 @@ namespace UAS_MES.SystemSetting
 
         private void 导航管理_Load(object sender, EventArgs e)
         {
-            dh = new DataHelper();
+            dh = SystemInf.dh;
             dt = (DataTable)dh.ExecuteSql("select sn_id,sn_displayname,sn_detno,sn_using,sn_module from cs$sysnavation order by sn_module", "select");
             BaseUtil.FillDgvWithDataTable(SysNavDGV, dt);
             asc.controllInitializeSize(this);

+ 1 - 1
UAS-MES/PublicMethod/LogicHandler.cs

@@ -12,7 +12,7 @@ namespace UAS_MES.PublicMethod
     {
         public LogicHandler() { }
 
-        static DataHelper dh = new DataHelper();
+        static DataHelper dh = SystemInf.dh;
         //用于拼接SQL
         static StringBuilder sql = new StringBuilder();
         //用于存放批量执行的SQL

+ 1 - 1
UAS-MES/PublicMethod/Print.cs

@@ -12,7 +12,7 @@ namespace UAS_MES.PublicMethod
 {
     class Print
     {
-        static DataHelper dh = new DataHelper();
+        static DataHelper dh = SystemInf.dh;
         //CodeSoft打印的驱动和文件
         static Document doc;
         ////CodeSoft的打印机