cdk
2025-06-30 5811f0b9f7879766dc1f6166ad538f562cbce045
修改成扫码报工
已修改3个文件
294 ■■■■■ 文件已修改
GSBGBarcodeFrm.cs 200 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GSproduction.csproj 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SQL/SQLHelper.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GSBGBarcodeFrm.cs
@@ -42,8 +42,6 @@
        private DataGridViewTextBoxColumn BianNo;
        private Label label9;
        private TextBox textBox5;
        private Label label10;
        private TextBox textBox6;
        private Label label8;
        private TextBox textBox4;
        private Label label7;
@@ -51,8 +49,11 @@
        private Label label6;
        private TextBox textBox2;
        private Timer timer2;
        private TextBox textBox7;
        private Label label1;
        private TextBox textBox6;
        private Label label2;
        private TextBox textBox7;
        private DataTable tbBARDAB;//条码表
        String connectionString = "Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.19)(PORT =1521)))(CONNECT_DATA =(SERVICE_NAME = ORCL)));Persist Security Info=True;User Id = abtdev;Password=abt_dev";
        //String connectionString = "Data Source = 192.168.1.19; Initial Catalog = abtdev; User ID = abtdev; Password=abt_dev";
        #endregion
@@ -98,9 +99,9 @@
        {
            this.components = new System.ComponentModel.Container();
            this.panel1 = new System.Windows.Forms.Panel();
            this.label2 = new System.Windows.Forms.Label();
            this.textBox7 = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.label10 = new System.Windows.Forms.Label();
            this.textBox6 = new System.Windows.Forms.TextBox();
            this.textBox5 = new System.Windows.Forms.TextBox();
            this.label9 = new System.Windows.Forms.Label();
@@ -129,9 +130,9 @@
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.label2);
            this.panel1.Controls.Add(this.textBox7);
            this.panel1.Controls.Add(this.label1);
            this.panel1.Controls.Add(this.label10);
            this.panel1.Controls.Add(this.textBox6);
            this.panel1.Controls.Add(this.textBox5);
            this.panel1.Controls.Add(this.label9);
@@ -148,21 +149,32 @@
            this.panel1.ForeColor = System.Drawing.Color.Black;
            this.panel1.Location = new System.Drawing.Point(0, 0);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(1039, 449);
            this.panel1.Size = new System.Drawing.Size(1356, 449);
            this.panel1.TabIndex = 0;
            this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
            //
            // label2
            //
            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.label2.AutoSize = true;
            this.label2.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label2.Location = new System.Drawing.Point(30, 361);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(79, 33);
            this.label2.TabIndex = 23;
            this.label2.Text = "数量";
            // 
            // textBox7
            // 
            this.textBox7.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textBox7.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.textBox7.Location = new System.Drawing.Point(168, 382);
            this.textBox7.Location = new System.Drawing.Point(170, 361);
            this.textBox7.Name = "textBox7";
            this.textBox7.ReadOnly = true;
            this.textBox7.Size = new System.Drawing.Size(815, 38);
            this.textBox7.Size = new System.Drawing.Size(1131, 44);
            this.textBox7.TabIndex = 22;
            this.textBox7.TextChanged += new System.EventHandler(this.textBox7_TextChanged);
            // 
            // label1
            // 
@@ -170,48 +182,32 @@
            | System.Windows.Forms.AnchorStyles.Right)));
            this.label1.AutoSize = true;
            this.label1.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label1.Location = new System.Drawing.Point(30, 385);
            this.label1.Location = new System.Drawing.Point(30, 361);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(120, 27);
            this.label1.Size = new System.Drawing.Size(79, 33);
            this.label1.TabIndex = 23;
            this.label1.Text = "已报工数";
            this.label1.Click += new System.EventHandler(this.label1_Click);
            //
            // label10
            //
            this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.label10.AutoSize = true;
            this.label10.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label10.Location = new System.Drawing.Point(30, 104);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(120, 27);
            this.label10.TabIndex = 19;
            this.label10.Text = "指令单号";
            this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.label10.Click += new System.EventHandler(this.label10_Click);
            this.label1.Text = "数量";
            // 
            // textBox6
            // 
            this.textBox6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textBox6.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.textBox6.Location = new System.Drawing.Point(169, 101);
            this.textBox6.Location = new System.Drawing.Point(170, 361);
            this.textBox6.Name = "textBox6";
            this.textBox6.ReadOnly = true;
            this.textBox6.Size = new System.Drawing.Size(815, 38);
            this.textBox6.TabIndex = 18;
            this.textBox6.TextChanged += new System.EventHandler(this.textBox6_TextChanged);
            this.textBox6.Size = new System.Drawing.Size(1131, 44);
            this.textBox6.TabIndex = 22;
            // 
            // textBox5
            // 
            this.textBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textBox5.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.textBox5.Location = new System.Drawing.Point(168, 321);
            this.textBox5.Location = new System.Drawing.Point(169, 289);
            this.textBox5.Name = "textBox5";
            this.textBox5.ReadOnly = true;
            this.textBox5.Size = new System.Drawing.Size(816, 38);
            this.textBox5.Size = new System.Drawing.Size(1132, 44);
            this.textBox5.TabIndex = 20;
            this.textBox5.TextChanged += new System.EventHandler(this.textBox5_TextChanged);
            // 
@@ -221,11 +217,11 @@
            | System.Windows.Forms.AnchorStyles.Right)));
            this.label9.AutoSize = true;
            this.label9.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label9.Location = new System.Drawing.Point(29, 324);
            this.label9.Location = new System.Drawing.Point(30, 292);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(120, 27);
            this.label9.Size = new System.Drawing.Size(79, 33);
            this.label9.TabIndex = 21;
            this.label9.Text = "工单数量";
            this.label9.Text = "单位";
            this.label9.Click += new System.EventHandler(this.label9_Click);
            // 
            // label8
@@ -234,9 +230,9 @@
            | System.Windows.Forms.AnchorStyles.Right)));
            this.label8.AutoSize = true;
            this.label8.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label8.Location = new System.Drawing.Point(29, 271);
            this.label8.Location = new System.Drawing.Point(30, 237);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(120, 27);
            this.label8.Size = new System.Drawing.Size(143, 33);
            this.label8.TabIndex = 17;
            this.label8.Text = "产品规格";
            // 
@@ -245,10 +241,10 @@
            this.textBox4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textBox4.Font = new System.Drawing.Font("宋体", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.textBox4.Location = new System.Drawing.Point(169, 268);
            this.textBox4.Location = new System.Drawing.Point(170, 234);
            this.textBox4.Name = "textBox4";
            this.textBox4.ReadOnly = true;
            this.textBox4.Size = new System.Drawing.Size(815, 34);
            this.textBox4.Size = new System.Drawing.Size(1132, 39);
            this.textBox4.TabIndex = 16;
            this.textBox4.TextChanged += new System.EventHandler(this.textBox4_TextChanged);
            // 
@@ -258,9 +254,9 @@
            | System.Windows.Forms.AnchorStyles.Right)));
            this.label7.AutoSize = true;
            this.label7.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label7.Location = new System.Drawing.Point(30, 215);
            this.label7.Location = new System.Drawing.Point(30, 175);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(120, 27);
            this.label7.Size = new System.Drawing.Size(143, 33);
            this.label7.TabIndex = 15;
            this.label7.Text = "产品名称";
            // 
@@ -269,10 +265,10 @@
            this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textBox3.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.textBox3.Location = new System.Drawing.Point(169, 212);
            this.textBox3.Location = new System.Drawing.Point(169, 172);
            this.textBox3.Name = "textBox3";
            this.textBox3.ReadOnly = true;
            this.textBox3.Size = new System.Drawing.Size(815, 38);
            this.textBox3.Size = new System.Drawing.Size(1132, 44);
            this.textBox3.TabIndex = 14;
            this.textBox3.TextChanged += new System.EventHandler(this.textBox3_TextChanged);
            // 
@@ -282,9 +278,9 @@
            | System.Windows.Forms.AnchorStyles.Right)));
            this.label6.AutoSize = true;
            this.label6.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label6.Location = new System.Drawing.Point(30, 157);
            this.label6.Location = new System.Drawing.Point(30, 115);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(120, 27);
            this.label6.Size = new System.Drawing.Size(143, 33);
            this.label6.TabIndex = 13;
            this.label6.Text = "产品编码";
            // 
@@ -293,10 +289,10 @@
            this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textBox2.Font = new System.Drawing.Font("宋体", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.textBox2.Location = new System.Drawing.Point(169, 154);
            this.textBox2.Location = new System.Drawing.Point(169, 112);
            this.textBox2.Name = "textBox2";
            this.textBox2.ReadOnly = true;
            this.textBox2.Size = new System.Drawing.Size(815, 38);
            this.textBox2.Size = new System.Drawing.Size(1132, 44);
            this.textBox2.TabIndex = 12;
            // 
            // textBox1
@@ -306,7 +302,7 @@
            this.textBox1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.textBox1.Location = new System.Drawing.Point(169, 42);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(815, 42);
            this.textBox1.Size = new System.Drawing.Size(1132, 49);
            this.textBox1.TabIndex = 9;
            this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);
            // 
@@ -318,7 +314,7 @@
            this.label5.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.label5.Location = new System.Drawing.Point(29, 45);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(73, 30);
            this.label5.Size = new System.Drawing.Size(87, 36);
            this.label5.TabIndex = 8;
            this.label5.Text = "条码";
            this.label5.Click += new System.EventHandler(this.label5_Click);
@@ -334,7 +330,7 @@
            this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel2.Location = new System.Drawing.Point(0, 449);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(1039, 78);
            this.panel2.Size = new System.Drawing.Size(1356, 260);
            this.panel2.TabIndex = 1;
            // 
            // dataGridView1
@@ -349,7 +345,7 @@
            this.dataGridView1.ReadOnly = true;
            this.dataGridView1.RowHeadersWidth = 51;
            this.dataGridView1.RowTemplate.Height = 27;
            this.dataGridView1.Size = new System.Drawing.Size(1039, 78);
            this.dataGridView1.Size = new System.Drawing.Size(1356, 260);
            this.dataGridView1.TabIndex = 0;
            this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
            this.dataGridView1.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_ColumnHeaderMouseClick);
@@ -383,11 +379,11 @@
            // 
            // GSBGBarcodeFrm
            // 
            this.ClientSize = new System.Drawing.Size(1039, 527);
            this.ClientSize = new System.Drawing.Size(1356, 709);
            this.Controls.Add(this.panel2);
            this.Controls.Add(this.panel1);
            this.Name = "GSBGBarcodeFrm";
            this.Text = "产线报工";
            this.Text = "扫码报工";
            this.Load += new System.EventHandler(this.GSBGBarcodeFrm_Load);
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
@@ -404,31 +400,6 @@
        private void GSBGBarcodeFrm_Load(object sender, EventArgs e)
        {
            this.textBox1.Focus();
            // TODO: 这行代码将数据加载到表“weightCollectDataSet1.BGBarcode”中。您可以根据需要移动或删除它。
            //this.bGBarcodeTableAdapter.Fill(this.weightCollectDataSet1.BGBarcode);
            //下拉选择工单
            //tbB = SQL.ExecuteDataTable("SELECT WORKNO FROM WORKN(NOLOCK)");//条码表
            //  tbB =OraSQL.ReturnDataSet("SELECT DAA001,DAA002,DAA003,DAA004,DAA006,DAA007,DAA008,DAA015,DAA021 FROM WOMDAA WHERE DAA006>SYSDATE-2", "WOMDAA").Tables[0];
            ////tbB.TableName = "WORKN";
            //foreach (DataRow dr in tbB.Rows)
            //{
            //    comboBox1.Items.Add(dr["DAA001"]);
            //}
            //////下拉选择产线
            ////tbC = OraSQL.ReturnDataSet("SELECT LinesName  FROM XBNO", "XBNO").Tables[0];//线别表
            ////foreach (DataRow dc in tbC.Rows)
            ////{
            ////    comboBox2.Items.Add(dc[0]);
            ////}
            ////下拉选择工艺
            //tbD = OraSQL.ReturnDataSet("SELECT PolytechnicName FROM Polytechnic", "Polytechnic").Tables[0];//工艺表
            //foreach (DataRow dd in tbD.Rows)
            //{
            //    comboBox3.Items.Add(dd[0]);
            //}
        }
        #endregion
@@ -437,27 +408,62 @@
        {
            if (e.KeyChar == 13)
            {
                SQL = new SQLHelper(connStr);
                string sqlCommand = string.Format(@"EXEC dbo.[WMS_CREATE_SAOMIAOBG] '{0}'", textBox1.Text);
                DataTable tb1 = SQL.ExecuteDataTable(sqlCommand);
                b = b + 1;
                //将值插入报工对象类中
                string sqlstr = String.Format(@"SELECT *  FROM BARDAB(NOLOCK) WHERE DAB001='{0}'", textBox1.Text.ToString());
                tbBARDAB = SQL.ExecuteDataTable(sqlstr);
                wc.BianNo = b.ToString();   //编号
                wc.BarcodeNO = textBox1.Text.ToString();    //条码
                wc.CHEEKTIME = tb1.Rows[0]["STR2"].ToString(); //时间
                wc.LinesName = tb1.Rows[0]["STR3"].ToString(); //工单号
                wc.WorkNo = tb1.Rows[0]["STR4"].ToString(); //报工数量
                wc.Product = tb1.Rows[0]["STR5"].ToString(); //结果
                wc.CheckCategory1 = tb1.Rows[0]["STR6"].ToString(); //错误信息
                textBox6.Text = tb1.Rows[0]["STR3"].ToString();
                textBox5.Text = tb1.Rows[0]["GSZS"].ToString();
                textBox7.Text = tb1.Rows[0]["BGZS"].ToString();
                textBox2.Text = tb1.Rows[0]["ITEMNO"].ToString();
                textBox3.Text = tb1.Rows[0]["ITEMNAME"].ToString();
                textBox4.Text = tb1.Rows[0]["ITEMMODEL"].ToString();
                InsertRowToDataTable(wc);
                wc.CHEEKTIME = DateTime.Now.ToString(); //时间
                wc.Product = ""; //结果
                wc.CheckCategory1 = ""; //错误信息
                if (tbBARDAB.Rows.Count <= 0)
                {
                    wc.LinesName = ""; //工单号
                    wc.WorkNo = ""; //报工数量
                    wc.Product = "报工失败"; //结果
                    wc.CheckCategory1 = "该条码不存在"; //错误信息
                    InsertRowToDataTable(wc);
                    textBox1.Text = "";
                    return;
                }
                wc.LinesName = tbBARDAB.Rows[0]["DAB031"].ToString(); //工单号
                wc.WorkNo = tbBARDAB.Rows[0]["DAB005"].ToString(); //报工数量
                if (tbBARDAB.Rows[0]["DAB049"].ToString() == "1")
                {
                    wc.Product = "报工失败"; //结果
                    wc.CheckCategory1 = "该条码已报工"; //错误信息
                    InsertRowToDataTable(wc);
                    textBox1.Text = "";
                    return;
                }
                textBox2.Text = tbBARDAB.Rows[0]["DAB020"].ToString();
                textBox3.Text = tbBARDAB.Rows[0]["DAB021"].ToString();
                textBox4.Text = tbBARDAB.Rows[0]["DAB008"].ToString();
                textBox5.Text = tbBARDAB.Rows[0]["DAB022"].ToString();
                textBox7.Text = tbBARDAB.Rows[0]["DAB005"].ToString();
                string sqlstr2 = String.Format(@"EXEC WMS_CREATE_SAOMIAOBG '{0}'", textBox1.Text.ToString());
                DataTable table = SQL.ExecuteDataTable(sqlstr2);
                textBox1.Text = "";
                textBox1.Focus();
                this.textBox1.Focus();
                if(table!= null && table.Rows.Count > 0)
                {
                    if(table.Rows[0]["RESULT"].ToString() == "1")
                    {
                        wc.Product = "报工失败"; //结果
                        wc.CheckCategory1 = table.Rows[0]["MSG"].ToString(); //错误信息
                    }
                    else
                    {
                        wc.Product = "报工成功"; //结果
                        wc.CheckCategory1 = ""; //错误信息
                    }
                }
                InsertRowToDataTable(wc);
            }
        }
        #endregion
GSproduction.csproj
@@ -41,47 +41,47 @@
    <Reference Include="DDTek.Oracle">
      <HintPath>C:\Users\liu\Desktop\X86\2.10.11.0\DDTek.Oracle.dll</HintPath>
    </Reference>
    <Reference Include="DevExpress.Data.v17.2">
      <HintPath>..\..\DLL\DevExpress.Data.v17.2.dll</HintPath>
    <Reference Include="DevExpress.Data.v19.2">
    </Reference>
    <Reference Include="DevExpress.Images.v17.2">
      <HintPath>..\..\DLL\DevExpress.Images.v17.2.dll</HintPath>
    <Reference Include="DevExpress.Images.v19.2">
    </Reference>
    <Reference Include="DevExpress.Office.v17.2.Core">
      <HintPath>..\..\DLL\DevExpress.Office.v17.2.Core.dll</HintPath>
    <Reference Include="DevExpress.Office.v19.2.Core">
    </Reference>
    <Reference Include="DevExpress.Pdf.v17.2.Core">
      <HintPath>..\..\DLL\DevExpress.Pdf.v17.2.Core.dll</HintPath>
    <Reference Include="DevExpress.Pdf.v19.2.Core">
    </Reference>
    <Reference Include="DevExpress.Printing.v17.2.Core">
      <HintPath>..\..\DLL\DevExpress.Printing.v17.2.Core.dll</HintPath>
    <Reference Include="DevExpress.Printing.v19.2.Core">
    </Reference>
    <Reference Include="DevExpress.RichEdit.v17.2.Core">
      <HintPath>..\..\DLL\DevExpress.RichEdit.v17.2.Core.dll</HintPath>
    <Reference Include="DevExpress.RichEdit.v19.2.Core">
    </Reference>
    <Reference Include="DevExpress.Sparkline.v17.2.Core">
      <HintPath>..\..\DLL\DevExpress.Sparkline.v17.2.Core.dll</HintPath>
    <Reference Include="DevExpress.Sparkline.v19.2.Core">
    </Reference>
    <Reference Include="DevExpress.Utils.v17.2">
      <HintPath>..\..\DLL\DevExpress.Utils.v17.2.dll</HintPath>
    <Reference Include="DevExpress.Utils.v19.2">
    </Reference>
    <Reference Include="DevExpress.XtraBars.v17.2">
      <HintPath>..\..\DLL\DevExpress.XtraBars.v17.2.dll</HintPath>
    <Reference Include="DevExpress.XtraBars.v19.2">
    </Reference>
    <Reference Include="DevExpress.XtraEditors.v17.2">
      <HintPath>..\..\DLL\DevExpress.XtraEditors.v17.2.dll</HintPath>
    <Reference Include="DevExpress.XtraEditors.v19.2">
    </Reference>
    <Reference Include="DevExpress.XtraGrid.v17.2">
      <HintPath>..\..\DLL\DevExpress.XtraGrid.v17.2.dll</HintPath>
    <Reference Include="DevExpress.XtraGrid.v19.2">
    </Reference>
    <Reference Include="DevExpress.XtraLayout.v17.2">
      <HintPath>..\..\DLL\DevExpress.XtraLayout.v17.2.dll</HintPath>
    <Reference Include="DevExpress.XtraLayout.v19.2">
    </Reference>
    <Reference Include="DevExpress.XtraPrinting.v17.2">
      <HintPath>..\..\DLL\DevExpress.XtraPrinting.v17.2.dll</HintPath>
    <Reference Include="DevExpress.XtraPrinting.v19.2">
    </Reference>
    <Reference Include="DevExpress.XtraTreeList.v17.2">
      <HintPath>..\..\DLL\DevExpress.XtraTreeList.v17.2.dll</HintPath>
    <Reference Include="DevExpress.XtraTreeList.v19.2">
    </Reference>
    <Reference Include="FastReport, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
SQL/SQLHelper.cs
@@ -180,6 +180,44 @@
            }
            return dataTable;
        }
        public DataTable ExecuteStoredProcedure(string procedureName, SqlParameter[] parameters = null)
        {
            try
            {
                using (SqlConnection connection = new SqlConnection(_connectionString))
                {
                    using (SqlCommand command = new SqlCommand(procedureName, connection))
                    {
                        command.CommandType = CommandType.StoredProcedure;
                        // 添加参数(如果存在)
                        if (parameters != null && parameters.Length > 0)
                        {
                            command.Parameters.AddRange(parameters);
                        }
                        connection.Open();
                        // 创建DataTable存储结果
                        DataTable resultTable = new DataTable();
                        // 使用SqlDataAdapter填充DataTable
                        using (SqlDataAdapter adapter = new SqlDataAdapter(command))
                        {
                            adapter.Fill(resultTable);
                        }
                        return resultTable;
                    }
                }
            }
            catch (Exception ex)
            {
                return null;
            }
        }
        public int ExecuteNonQuery(string sql)
        {
            return this.ExecuteNonQuery(sql, CommandType.Text, null);