diff --git a/BLUtil/LoginRpc.cs b/BLUtil/LoginRpc.cs index 63c344e..f5253f2 100644 --- a/BLUtil/LoginRpc.cs +++ b/BLUtil/LoginRpc.cs @@ -7,7 +7,7 @@ namespace BLUtil { const string WpfUserMethod = "/MainSystem/B3TianJinMeatUnite/Rpcs/ClientRpc/GetWpfUserInfoByIds"; public const string GetGoods = "/MainSystem/B3TianJinMeatUnite/Rpcs/ClientRpc/GetGoodsInfor"; public const string GetStore = "/MainSystem/B3TianJinMeatUnite/Rpcs/ClientRpc/GetStoreInfor"; - public const string InsertInStore = "/MainSystem/B3Butchery/Rpcs/ClientRpc/InsertProductInStore"; + public const string InsertInStore = "/MainSystem/B3ButcherManage/Rpcs/ClientRpc/InsertProductInStore"; public static string OnLineLoadNameByCode(string code, out string error) { try { error = string.Empty; diff --git a/BWPClientForTianRou/MainForm.cs b/BWPClientForTianRou/MainForm.cs index 467ea0d..fcec75a 100644 --- a/BWPClientForTianRou/MainForm.cs +++ b/BWPClientForTianRou/MainForm.cs @@ -233,14 +233,14 @@ namespace BWPClientForTianRou { 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("Department_ID", 1L); bill.Set("Store_Name", _currentStore.Name); 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) { - 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_Name", row["Goods_Name"]); detail1.Set("Number", row["Weight"]); @@ -259,7 +259,7 @@ namespace BWPClientForTianRou { object recievLocker = new object(); void StartReceiveThread() { while (true) { - Thread.Sleep(1000); + Thread.Sleep(500); if (_socket == null || !_socket.Connected) { continue; @@ -337,11 +337,11 @@ namespace BWPClientForTianRou { } if (IsHandleCreated) { - var info = Encoding.ASCII.GetString(buffer, 0, received); + var info = Encoding.GetEncoding("gb2312").GetString(buffer, 0, received); decimal w = 0m; lblDisplay.Text = info.Trim(); 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(); bo.DateTime = System.DateTime.Now; bo.Weight = w;