Pārlūkot izejas kodu

调整服务端数据同步的BUG

章政 5 gadi atpakaļ
vecāks
revīzija
8a80705cbb

+ 2 - 2
UAS-出货标签管理(贸易版)/PublicMethod/SqliteDBHelper.cs

@@ -242,7 +242,7 @@ namespace UAS_LabelMachine
                     }
                 }
             }
-            sb.Append("where pib_id=?");
+            sb.Append(" where pib_id=?");
             SQLiteTransaction tx = this._odcConnection.BeginTransaction();
             command = new SQLiteCommand();
             command.Connection = this._odcConnection;
@@ -255,7 +255,7 @@ namespace UAS_LabelMachine
                     command.CommandText = sql;
                     for (int j = 0; j < dt.Columns.Count; j++)
                     {
-                        if (dt.Columns[j].ColumnName.ToUpper() != "PIB_ID")
+                        if (dt.Columns[j].ColumnName.ToUpper() != "PIB_ID" && dt.Columns[j].ColumnName.ToUpper() != "PIB_DATECODE" && dt.Columns[j].ColumnName.ToUpper() != "PIB_LOTNO")
                             command.Parameters.AddWithValue(dt.Columns[j].ColumnName, dt.Rows[i][j]);
                     }
                     command.Parameters.AddWithValue("pib_id", dt.Rows[i]["pib_id"]);

+ 1 - 0
UAS-出货标签管理(贸易版)/UAS_出货标签管理.Designer.cs

@@ -1756,6 +1756,7 @@
             this.pib_id1.DataPropertyName = "pib_id";
             this.pib_id1.HeaderText = "pib_id";
             this.pib_id1.Name = "pib_id1";
+            this.pib_id1.Visible = false;
             this.pib_id1.Width = 66;
             // 
             // pib_pdno

+ 6 - 2
UAS-出货标签管理(贸易版)/UAS_出货标签管理.cs

@@ -1604,7 +1604,7 @@ namespace UAS_LabelMachine
             {
                 //检验查询的字段和本地数据库字段是否匹配
                 sdh.AddColumFromDataTable(LabelInfDataTable, "prodiobarcode");
-                //sdh.BatchInsert("prodiobarcode", LabelInfDataTable);
+                sdh.BatchInsert("prodiobarcode", LabelInfDataTable);
             }
             sql.Clear();
             sql.Append("select * from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' order by pib_id ");
@@ -1882,7 +1882,11 @@ namespace UAS_LabelMachine
                 }
                 sdh.BatchInsert("prodiobarcode", LabelInf.DataSource as DataTable);
             }
-            SaveGrid_Click(sender, e);
+            DataTable dt1 = (DataTable)sdh.ExecuteSql("select pib_id,pib_outboxcode1,pib_outboxcode2,pib_custmidboxcode,pib_custoutboxcode,pib_lotno,pib_datecode,pib_ifupload,pib_ifpick,pib_ifprint from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' ", "select");
+            if (dt1.Rows.Count > 0)
+            {
+                dh.CallProcedure("sp_uploadbarcode", dt1);
+            }
         }
 
         private void LogingOut_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)