|
|
@ -233,14 +233,14 @@ namespace BWPClientForTianRou { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var bill = new RpcObject("/MainSystem/B3Butchery/BO/ProductInStore"); |
|
|
|
|
|
|
|
|
var bill = new RpcObject("/MainSystem/B3ButcherManage/BO/ProductInStore"); |
|
|
bill.Set("Store_ID", _currentStore.ID); |
|
|
bill.Set("Store_ID", _currentStore.ID); |
|
|
bill.Set("Department_ID", 1L); |
|
|
bill.Set("Department_ID", 1L); |
|
|
bill.Set("Store_Name", _currentStore.Name); |
|
|
bill.Set("Store_Name", _currentStore.Name); |
|
|
bill.Set("Remark", "称重客户端上传"); |
|
|
bill.Set("Remark", "称重客户端上传"); |
|
|
var details = new ManyList("/MainSystem/B3Butchery/BO/ProductInStore_Detail"); |
|
|
|
|
|
|
|
|
var details = new ManyList("/MainSystem/B3ButcherManage/BO/ProductInStore_Detail"); |
|
|
foreach (DataRow row in _resultDataSet.Tables[0].Rows) { |
|
|
foreach (DataRow row in _resultDataSet.Tables[0].Rows) { |
|
|
var detail1 = new RpcObject("/MainSystem/B3Butchery/BO/ProductInStore_Detail"); |
|
|
|
|
|
|
|
|
var detail1 = new RpcObject("/MainSystem/B3ButcherManage/BO/ProductInStore_Detail"); |
|
|
detail1.Set("Goods_ID", long.Parse(row["Goods_ID"].ToString())); |
|
|
detail1.Set("Goods_ID", long.Parse(row["Goods_ID"].ToString())); |
|
|
detail1.Set("Goods_Name", row["Goods_Name"]); |
|
|
detail1.Set("Goods_Name", row["Goods_Name"]); |
|
|
detail1.Set("Number", row["Weight"]); |
|
|
detail1.Set("Number", row["Weight"]); |
|
|
@ -259,7 +259,7 @@ namespace BWPClientForTianRou { |
|
|
object recievLocker = new object(); |
|
|
object recievLocker = new object(); |
|
|
void StartReceiveThread() { |
|
|
void StartReceiveThread() { |
|
|
while (true) { |
|
|
while (true) { |
|
|
Thread.Sleep(1000); |
|
|
|
|
|
|
|
|
Thread.Sleep(500); |
|
|
|
|
|
|
|
|
if (_socket == null || !_socket.Connected) { |
|
|
if (_socket == null || !_socket.Connected) { |
|
|
continue; |
|
|
continue; |
|
|
@ -337,11 +337,11 @@ namespace BWPClientForTianRou { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (IsHandleCreated) { |
|
|
if (IsHandleCreated) { |
|
|
var info = Encoding.ASCII.GetString(buffer, 0, received); |
|
|
|
|
|
|
|
|
var info = Encoding.GetEncoding("gb2312").GetString(buffer, 0, received); |
|
|
decimal w = 0m; |
|
|
decimal w = 0m; |
|
|
lblDisplay.Text = info.Trim(); |
|
|
lblDisplay.Text = info.Trim(); |
|
|
var str = info.Replace("毛重", "").Replace("kg", "").Replace("KG", ""); |
|
|
var str = info.Replace("毛重", "").Replace("kg", "").Replace("KG", ""); |
|
|
if (decimal.TryParse(str, out w)) { |
|
|
|
|
|
|
|
|
if (decimal.TryParse(str.Trim(), out w)) { |
|
|
var bo = new WeightTable(); |
|
|
var bo = new WeightTable(); |
|
|
bo.DateTime = System.DateTime.Now; |
|
|
bo.DateTime = System.DateTime.Now; |
|
|
bo.Weight = w; |
|
|
bo.Weight = w; |
|
|
|