Browse Source

Merge branch 'master' of ssh://10.10.100.21/source/mes-client

Hcsy 7 years ago
parent
commit
20444cdf67

+ 15 - 0
UAS_CheckWork/App.config

@@ -1,6 +1,21 @@
 <?xml version="1.0" encoding="utf-8" ?>
 <configuration>
+    <configSections>
+        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+            <section name="UAS_CheckWork.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
+        </sectionGroup>
+    </configSections>
     <startup> 
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
     </startup>
+    <userSettings>
+        <UAS_CheckWork.Properties.Settings>
+            <setting name="IP" serializeAs="String">
+                <value />
+            </setting>
+            <setting name="Port" serializeAs="String">
+                <value />
+            </setting>
+        </UAS_CheckWork.Properties.Settings>
+    </userSettings>
 </configuration>

+ 57 - 44
UAS_CheckWork/Form1.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.txtPort = new System.Windows.Forms.TextBox();
@@ -35,9 +36,10 @@
             this.btnConnect = new System.Windows.Forms.Button();
             this.lblState = new System.Windows.Forms.Label();
             this.showDataGrid = new System.Windows.Forms.DataGridView();
+            this.人员编号 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.考勤时间 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.getAllData = new System.Windows.Forms.Button();
-            this.saveData = new System.Windows.Forms.Button();
-            this.allData = new System.Windows.Forms.BindingSource();
+            this.allData = new System.Windows.Forms.BindingSource(this.components);
             this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.showDataGrid)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.allData)).BeginInit();
@@ -46,45 +48,48 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(206, 31);
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(167, 17);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(44, 18);
+            this.label2.Size = new System.Drawing.Size(42, 21);
             this.label2.TabIndex = 14;
             this.label2.Text = "Port";
             // 
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(36, 31);
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(24, 16);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(26, 18);
+            this.label1.Size = new System.Drawing.Size(25, 21);
             this.label1.TabIndex = 13;
             this.label1.Text = "IP";
             // 
             // txtPort
             // 
-            this.txtPort.Location = new System.Drawing.Point(259, 26);
-            this.txtPort.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.txtPort.Location = new System.Drawing.Point(215, 17);
+            this.txtPort.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.txtPort.Name = "txtPort";
-            this.txtPort.Size = new System.Drawing.Size(54, 28);
+            this.txtPort.Size = new System.Drawing.Size(37, 21);
             this.txtPort.TabIndex = 12;
-            this.txtPort.Text = "4370";
             // 
             // txtIP
             // 
-            this.txtIP.Location = new System.Drawing.Point(66, 26);
-            this.txtIP.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.txtIP.Location = new System.Drawing.Point(58, 17);
+            this.txtIP.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.txtIP.Name = "txtIP";
-            this.txtIP.Size = new System.Drawing.Size(132, 28);
+            this.txtIP.Size = new System.Drawing.Size(99, 21);
             this.txtIP.TabIndex = 11;
-            this.txtIP.Text = "192.168.253.201";
             // 
             // btnConnect
             // 
-            this.btnConnect.Location = new System.Drawing.Point(392, 26);
-            this.btnConnect.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.btnConnect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.btnConnect.Location = new System.Drawing.Point(279, 15);
+            this.btnConnect.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.btnConnect.Name = "btnConnect";
-            this.btnConnect.Size = new System.Drawing.Size(78, 30);
+            this.btnConnect.Size = new System.Drawing.Size(50, 25);
             this.btnConnect.TabIndex = 10;
             this.btnConnect.Text = "连接";
             this.btnConnect.UseVisualStyleBackColor = true;
@@ -94,47 +99,55 @@
             // 
             this.lblState.AutoSize = true;
             this.lblState.ForeColor = System.Drawing.Color.Crimson;
-            this.lblState.Location = new System.Drawing.Point(544, 32);
+            this.lblState.Location = new System.Drawing.Point(359, 22);
+            this.lblState.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.lblState.Name = "lblState";
-            this.lblState.Size = new System.Drawing.Size(242, 18);
+            this.lblState.Size = new System.Drawing.Size(71, 12);
             this.lblState.TabIndex = 15;
-            this.lblState.Text = "Current State:Disconnected";
+            this.lblState.Text = "状态:未连接";
             // 
             // showDataGrid
             // 
             this.showDataGrid.AllowUserToAddRows = false;
             this.showDataGrid.AllowUserToDeleteRows = false;
             this.showDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.showDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.人员编号,
+            this.考勤时间});
             this.showDataGrid.Enabled = false;
-            this.showDataGrid.Location = new System.Drawing.Point(26, 191);
-            this.showDataGrid.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.showDataGrid.Location = new System.Drawing.Point(17, 59);
+            this.showDataGrid.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.showDataGrid.Name = "showDataGrid";
             this.showDataGrid.RowTemplate.Height = 30;
-            this.showDataGrid.Size = new System.Drawing.Size(1062, 464);
+            this.showDataGrid.Size = new System.Drawing.Size(795, 377);
             this.showDataGrid.TabIndex = 16;
             // 
+            // 人员编号
+            // 
+            this.人员编号.DataPropertyName = "cl_emcode";
+            this.人员编号.HeaderText = "人员编号";
+            this.人员编号.Name = "人员编号";
+            this.人员编号.Width = 150;
+            // 
+            // 考勤时间
+            // 
+            this.考勤时间.DataPropertyName = "cl_time";
+            this.考勤时间.HeaderText = "考勤时间";
+            this.考勤时间.Name = "考勤时间";
+            this.考勤时间.Width = 200;
+            // 
             // getAllData
             // 
-            this.getAllData.Location = new System.Drawing.Point(29, 97);
-            this.getAllData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.getAllData.BackColor = System.Drawing.SystemColors.ControlLightLight;
+            this.getAllData.Location = new System.Drawing.Point(560, 18);
+            this.getAllData.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.getAllData.Name = "getAllData";
-            this.getAllData.Size = new System.Drawing.Size(151, 37);
+            this.getAllData.Size = new System.Drawing.Size(102, 25);
             this.getAllData.TabIndex = 17;
-            this.getAllData.Text = "获取考勤数据";
-            this.getAllData.UseVisualStyleBackColor = true;
+            this.getAllData.Text = "同步考勤数据";
+            this.getAllData.UseVisualStyleBackColor = false;
             this.getAllData.Click += new System.EventHandler(this.getAllData_Click);
             // 
-            // saveData
-            // 
-            this.saveData.Location = new System.Drawing.Point(683, 97);
-            this.saveData.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.saveData.Name = "saveData";
-            this.saveData.Size = new System.Drawing.Size(145, 37);
-            this.saveData.TabIndex = 18;
-            this.saveData.Text = "保存数据";
-            this.saveData.UseVisualStyleBackColor = true;
-            this.saveData.Click += new System.EventHandler(this.saveData_Click);
-            // 
             // dataGridViewCheckBoxColumn1
             // 
             this.dataGridViewCheckBoxColumn1.HeaderText = "勾选";
@@ -142,10 +155,9 @@
             // 
             // Form1
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1113, 677);
-            this.Controls.Add(this.saveData);
+            this.ClientSize = new System.Drawing.Size(823, 451);
             this.Controls.Add(this.getAllData);
             this.Controls.Add(this.showDataGrid);
             this.Controls.Add(this.lblState);
@@ -154,7 +166,7 @@
             this.Controls.Add(this.txtPort);
             this.Controls.Add(this.txtIP);
             this.Controls.Add(this.btnConnect);
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.Name = "Form1";
             this.Text = "Form1";
             this.Load += new System.EventHandler(this.Form1_Load);
@@ -175,9 +187,10 @@
         private System.Windows.Forms.Label lblState;
         private System.Windows.Forms.DataGridView showDataGrid;
         private System.Windows.Forms.Button getAllData;
-        private System.Windows.Forms.Button saveData;
         private System.Windows.Forms.BindingSource allData;
         private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 人员编号;
+        private System.Windows.Forms.DataGridViewTextBoxColumn 考勤时间;
     }
 }
 

+ 61 - 55
UAS_CheckWork/Form1.cs

@@ -1,24 +1,17 @@
-using System;
+using Check.DataOperate;
+using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
 using System.Text;
 using System.Threading;
-using System.Threading.Tasks;
 using System.Windows.Forms;
-using UAS_MES.DataOperate;
 using UAS_MES.PublicForm;
 
 namespace UAS_CheckWork
 {
     public partial class Form1 : Form
     {
-        public Form1()
-        {
-            InitializeComponent();
-        }
+
         DataHelper dh;
         //Create Standalone SDK class dynamicly.
         public zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass();
@@ -26,8 +19,26 @@ namespace UAS_CheckWork
         private int iMachineNumber = 1;//the serial number of the device.After connecting the device ,this value will be changed.
         //开启线程
         Thread InitGetInfo;
+
+        public Form1()
+        {
+            InitializeComponent();
+            StartPosition = FormStartPosition.CenterScreen;
+        }
+
+        private void Form1_Load(object sender, EventArgs e)
+        {
+            CheckForIllegalCrossThreadCalls = false;//可跨线程
+            txtIP.Text = Properties.Settings.Default.IP;
+            txtPort.Text = Properties.Settings.Default.Port;
+            dh = new DataHelper();
+        }
+
         private void btnConnect_Click(object sender, EventArgs e)
         {
+            Properties.Settings.Default.IP = txtIP.Text;
+            Properties.Settings.Default.Port = txtPort.Text;
+            Properties.Settings.Default.Save();
             if (txtIP.Text.Trim() == "" || txtPort.Text.Trim() == "")
             {
                 MessageBox.Show("请先输入IP和端口", "Error");
@@ -69,31 +80,16 @@ namespace UAS_CheckWork
                 MessageBox.Show("请先连接设备", "Error");
                 return;
             }
-            int idwErrorCode = 0;
-            if (axCZKEM1.ReadAllUserID(iMachineNumber))
-            {
-                string sdwEnrollNumber = "";
-                string sName = "";
-                string sPassword = "";
-                int iPrivilege = 1;
-                bool bEnabled = false;
-                while (axCZKEM1.SSR_GetAllUserInfo(iMachineNumber, out sdwEnrollNumber, out sName, out sPassword, out iPrivilege, out bEnabled))
-                {
-                    Console.WriteLine("人员编号" + sdwEnrollNumber);
-                    Console.WriteLine("人员名称" + sName);
-                    Console.WriteLine("人员密码" + sPassword);
-                    Console.WriteLine("privilege" + iPrivilege);
-                    Console.WriteLine("可用?" + bEnabled);
-                }
-            }
-            else
-            {
-                axCZKEM1.GetLastError(ref idwErrorCode);
-                MessageBox.Show("Unable to get data,ErrorCode=" + idwErrorCode.ToString(), "Error");
-            }
+       
+            InitGetInfo = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitGetInfo, "正在同步数据...");
+            stw.StartPosition = FormStartPosition.CenterParent;
+            stw.ShowDialog();
+        }
 
-           
-            //axCZKEM1.EnableDevice(iMachineNumber, false);
+        private void InPrint()
+        {
+            int idwErrorCode = 0;
             //获取所有的考勤记录
             if (axCZKEM1.ReadGeneralLogData(iMachineNumber))
             {
@@ -111,16 +107,30 @@ namespace UAS_CheckWork
                 int minute = 0;//记录考勤分钟
                 int second = 0;//记录考勤秒
                 int workCode = 0; //记录workCode
+                List<string> cl_cardcode = new List<string>();
+                List<string> cl_time = new List<string>();
+                StringBuilder sql = new StringBuilder();
+                sql.Append("insert into cardlog (cl_id,cl_cardcode,cl_time) values (cardlog_seq.nextval,:cl_emcode,TO_DATE(:cl_time,'yyyy-MM-dd hh24:mi:ss'))");
+                int count = 0;
                 while (axCZKEM1.SSR_GetGeneralLogData(iMachineNumber, out enrollNumber, out verifyCode, out inoutMode, out year, out month, out day, out hour, out minute, out second, ref workCode))
                 {
+                    cl_cardcode.Add(enrollNumber);
+                    cl_time.Add(year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second);
+                    if (count % 1000 == 0)
+                    {
+                        dh.BatchInsert(sql.ToString(), new string[] { "cl_cardcode", "cl_time" }, cl_cardcode.ToArray(), cl_time.ToArray());
+                        cl_cardcode.Clear();
+                        cl_time.Clear();
+                    }
+                    count = count + 1;
                     //将数据加入DataTable中
                     DataRow dr = dt.NewRow();
                     dr["cl_emcode"] = enrollNumber;
                     dr["cl_time"] = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
                     dt.Rows.Add(dr);
                 }
+                dh.BatchInsert(sql.ToString(), new string[] { "cl_cardcode", "cl_time" }, cl_cardcode.ToArray(), cl_time.ToArray());
                 allData.DataSource = dt;
-                //显示
                 showDataGrid.DataSource = (DataTable)allData.DataSource;
             }
             else
@@ -128,33 +138,29 @@ namespace UAS_CheckWork
                 axCZKEM1.GetLastError(ref idwErrorCode);
                 MessageBox.Show("Unable to get data,ErrorCode=" + idwErrorCode.ToString(), "Error");
             }
-
-        }
-        private void Form1_Load(object sender, EventArgs e)
-        {
-            dh = new DataHelper();
         }
 
+    
+
         private void saveData_Click(object sender, EventArgs e)
         {
             //点击保存数据
-            string lastTime = dh.getFieldDataByCondition("cardlog", "TO_CHAR(max(wl_indate),'yyyy-MM-dd hh24:mi:ss')","").ToString();
+            string lastTime = dh.getFieldDataByCondition("cardlog", "TO_CHAR(max(wl_indate),'yyyy-MM-dd hh24:mi:ss')", "1=1").ToString();
             //筛选数据
-            filterDataTable((DataTable)allData.DataSource, "");
-        }
-
-        private DataTable filterDataTable(DataTable dt, String condition)
-        {
-            if (dt == null)
-                return new DataTable();
-            //获取筛选条件中的列名,值
-            DataRow[] dataRows = dt.Select(condition);
-            DataTable ndt = dt.Clone();
-            for (int i = 0; i < dataRows.Length; i++)
+            DataTable fd = dh.filterDataTable((DataTable)allData.DataSource, "cl_time > '" + lastTime + "'");
+            //插入数据库
+            //新增的数据
+            List<string> cl_emcode = new List<string>();
+            List<string> cl_time = new List<string>();
+            for (int i = 0; i < fd.Rows.Count; i++)
             {
-                ndt.Rows.Add(dataRows[i].ItemArray);
+                cl_emcode.Add(fd.Rows[i]["cl_emcode"].ToString());
+                cl_time.Add(fd.Rows[i]["cl_time"].ToString());
             }
-            return ndt;
+            //批量插入
+            StringBuilder sql = new StringBuilder();
+            sql.Append("insert into cardlog (cl_id,cl_emcode,cl_time) values (cardlog_seq.nextval,:cl_emcode,TO_DATE(:cl_time,'yyyy-MM-dd hh24:mi:ss'))");
+            dh.BatchInsert(sql.ToString(), new string[] { "cl_emcode", "cl_time" }, cl_emcode.ToArray(), cl_time.ToArray());
         }
     }
-}
+}

+ 12 - 0
UAS_CheckWork/Form1.resx

@@ -117,6 +117,18 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="人员编号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="考勤时间.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="人员编号.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="考勤时间.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="allData.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>

+ 37 - 17
UAS_CheckWork/Properties/Settings.Designer.cs

@@ -1,30 +1,50 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-namespace UAS_CheckWork.Properties
-{
-
-
+namespace UAS_CheckWork.Properties {
+    
+    
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
-        public static Settings Default
-        {
-            get
-            {
+        
+        public static Settings Default {
+            get {
                 return defaultInstance;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string IP {
+            get {
+                return ((string)(this["IP"]));
+            }
+            set {
+                this["IP"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string Port {
+            get {
+                return ((string)(this["Port"]));
+            }
+            set {
+                this["Port"] = value;
+            }
+        }
     }
 }

+ 11 - 6
UAS_CheckWork/Properties/Settings.settings

@@ -1,7 +1,12 @@
 <?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
-  <Profiles>
-    <Profile Name="(Default)" />
-  </Profiles>
-  <Settings />
-</SettingsFile>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UAS_CheckWork.Properties" GeneratedClassName="Settings">
+  <Profiles />
+  <Settings>
+    <Setting Name="IP" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="Port" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+  </Settings>
+</SettingsFile>

+ 3 - 3
UAS_CheckWork/DataHelper.cs → UAS_CheckWork/Tools/DataHelper.cs

@@ -6,12 +6,12 @@ using System.Configuration;
 using System.Data;
 using System.Text;
 
-namespace UAS_MES.DataOperate
+namespace Check.DataOperate
 {
     class DataHelper
     {
         //系统默认的的连接字符串
-        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+        private string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.88)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
         //用户选择的数据库的连接字符串
         public static string DBConnectionString;
         public static OracleConnection connection = null;
@@ -1132,7 +1132,7 @@ namespace UAS_MES.DataOperate
         /// <param name="dt"></param>
         /// <param name="condition"></param>
         /// <returns></returns>
-        private DataTable filterDataTable(DataTable dt, String condition)
+        public DataTable filterDataTable(DataTable dt, String condition)
         {
             if (dt == null)
                 return new DataTable();

+ 16 - 1
UAS_CheckWork/UAS_CheckWork.csproj

@@ -55,15 +55,27 @@
     <Compile Include="ChooseAllButton.Designer.cs">
       <DependentUpon>ChooseAllButton.cs</DependentUpon>
     </Compile>
-    <Compile Include="DataHelper.cs" />
     <Compile Include="Form1.cs">
       <SubType>Form</SubType>
     </Compile>
     <Compile Include="Form1.Designer.cs">
       <DependentUpon>Form1.cs</DependentUpon>
     </Compile>
+    <Compile Include="LoadingCircle.cs">
+      <SubType>Component</SubType>
+    </Compile>
+    <Compile Include="LoadingCircle.Designer.cs">
+      <DependentUpon>LoadingCircle.cs</DependentUpon>
+    </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SetLoadingWindow.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="SetLoadingWindow.Designer.cs">
+      <DependentUpon>SetLoadingWindow.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Tools\DataHelper.cs" />
     <EmbeddedResource Include="Form1.resx">
       <DependentUpon>Form1.cs</DependentUpon>
     </EmbeddedResource>
@@ -76,6 +88,9 @@
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
+    <EmbeddedResource Include="SetLoadingWindow.resx">
+      <DependentUpon>SetLoadingWindow.cs</DependentUpon>
+    </EmbeddedResource>
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>