From f84c98beb53b876db11576ce80347ed58af4c337 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Thu, 7 Sep 2017 08:09:58 +0800 Subject: [PATCH] init --- .gitignore | 7 + B3ButcherManageClient.sln | 46 + BO/BO.csproj | 78 ++ BO/BO/Bill/WeightBill/WeightBill.cs | 63 + .../WeightBill/WeightBill_AbnormalDetail.cs | 12 + BO/BO/Bill/WeightBill/WeightBill_Detail.cs | 12 + .../WeightBill/WeightBill_FarmerDetail.cs | 19 + .../Bill/WeightBill/WeightBill_HouseDetail.cs | 12 + BO/Properties/AssemblyInfo.cs | 36 + BO/Utils/BaseInfoRpcUtil.cs | 29 + BO/Utils/BillRpc/WeightBillRpc.cs | 46 + BO/Utils/LoginRpcUtil.cs | 46 + BO/Utils/LoginUserInfo.cs | 29 + BO/Utils/ServerUrlConfig.cs | 13 + BO/Utils/XmlUtil.cs | 46 + BWP.WinFormControl/BWP.WinFormControl.csproj | 109 ++ .../BoolToVisibilityConverter.cs | 24 + BWP.WinFormControl/Calendar.xaml | 730 +++++++++++ BWP.WinFormControl/Calendar.xaml.cs | 73 ++ BWP.WinFormControl/ComboBoxHelper.cs | 47 + BWP.WinFormControl/ComponentUtil.cs | 29 + BWP.WinFormControl/Images/today.png | Bin 0 -> 1101 bytes BWP.WinFormControl/NumberPad.xaml | 63 + BWP.WinFormControl/NumberPad.xaml.cs | 69 ++ BWP.WinFormControl/Properties/AssemblyInfo.cs | 36 + BWP.WinFormControl/UComboBox.cs | 161 +++ BWP.WinFormControl/UDatePicker.cs | 72 ++ BWP.WinFormControl/UTextBoxWithPad.cs | 47 + BWP.WinFormControl/VirtualKeyPad.xaml | 355 ++++++ BWP.WinFormControl/VirtualKeyPad.xaml.cs | 104 ++ BWP.WinFormControl/WeightControl.Designer.cs | 90 ++ BWP.WinFormControl/WeightControl.cs | 24 + BWP.WinFormControl/WeightControl.resx | 120 ++ ButcherManageClient/AfterLoginUtil.cs | 49 + ButcherManageClient/App.config | 6 + ButcherManageClient/AppContext.cs | 61 + .../ButcherManageClient.csproj | 125 ++ ButcherManageClient/Login.Designer.cs | 144 +++ ButcherManageClient/Login.cs | 101 ++ ButcherManageClient/Login.resx | 120 ++ ButcherManageClient/Program.cs | 76 ++ .../Properties/AssemblyInfo.cs | 36 + .../Properties/Resources.Designer.cs | 71 ++ ButcherManageClient/Properties/Resources.resx | 117 ++ .../Properties/Settings.Designer.cs | 30 + .../Properties/Settings.settings | 7 + ButcherManageClient/SettingForm.Designer.cs | 103 ++ ButcherManageClient/SettingForm.cs | 33 + ButcherManageClient/SettingForm.resx | 120 ++ ButcherOrder - 副本/App.config | 6 + ButcherOrder - 副本/AppContext.cs | 61 + ButcherOrder - 副本/ButcherOrder.csproj | 114 ++ .../ButcherOrderForm.Designer.cs | 63 + ButcherOrder - 副本/ButcherOrderForm.cs | 20 + ButcherOrder - 副本/ButcherOrderForm.resx | 120 ++ .../Properties/AssemblyInfo.cs | 36 + .../Properties/Resources.Designer.cs | 71 ++ .../Properties/Resources.resx | 117 ++ .../Properties/Settings.Designer.cs | 30 + .../Properties/Settings.settings | 7 + ButcherOrder/ButcherOrder.csproj | 92 ++ ButcherOrder/ButcherOrderForm.Designer.cs | 206 ++++ ButcherOrder/ButcherOrderForm.cs | 92 ++ ButcherOrder/ButcherOrderForm.resx | 120 ++ ButcherOrder/Properties/AssemblyInfo.cs | 36 + ButcherOrder/ViewDetail.Designer.cs | 171 +++ ButcherOrder/ViewDetail.cs | 20 + ButcherOrder/ViewDetail.resx | 120 ++ ButcherWeight/ButcherWeight.csproj | 95 ++ ButcherWeight/Properties/AssemblyInfo.cs | 36 + ButcherWeight/WeightForm.Designer.cs | 1088 +++++++++++++++++ ButcherWeight/WeightForm.cs | 183 +++ ButcherWeight/WeightForm.resx | 252 ++++ WeighAndGrading/App.config | 6 + WeighAndGrading/Form1.Designer.cs | 39 + WeighAndGrading/Form1.cs | 20 + WeighAndGrading/Program.cs | 22 + WeighAndGrading/Properties/AssemblyInfo.cs | 36 + .../Properties/Resources.Designer.cs | 71 ++ WeighAndGrading/Properties/Resources.resx | 117 ++ .../Properties/Settings.Designer.cs | 30 + WeighAndGrading/Properties/Settings.settings | 7 + WeighAndGrading/WeighAndGrading.csproj | 93 ++ WeightClient/App.config | 6 + WeightClient/AppContext.cs | 61 + WeightClient/Login.Designer.cs | 143 +++ WeightClient/Login.cs | 87 ++ WeightClient/Login.resx | 120 ++ WeightClient/Program.cs | 76 ++ WeightClient/Properties/AssemblyInfo.cs | 36 + WeightClient/Properties/Resources.Designer.cs | 71 ++ WeightClient/Properties/Resources.resx | 117 ++ WeightClient/Properties/Settings.Designer.cs | 30 + WeightClient/Properties/Settings.settings | 7 + WeightClient/SettingForm.Designer.cs | 103 ++ WeightClient/SettingForm.cs | 33 + WeightClient/SettingForm.resx | 120 ++ WeightClient/WeightClient.csproj | 124 ++ 98 files changed, 8577 insertions(+) create mode 100644 .gitignore create mode 100644 B3ButcherManageClient.sln create mode 100644 BO/BO.csproj create mode 100644 BO/BO/Bill/WeightBill/WeightBill.cs create mode 100644 BO/BO/Bill/WeightBill/WeightBill_AbnormalDetail.cs create mode 100644 BO/BO/Bill/WeightBill/WeightBill_Detail.cs create mode 100644 BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs create mode 100644 BO/BO/Bill/WeightBill/WeightBill_HouseDetail.cs create mode 100644 BO/Properties/AssemblyInfo.cs create mode 100644 BO/Utils/BaseInfoRpcUtil.cs create mode 100644 BO/Utils/BillRpc/WeightBillRpc.cs create mode 100644 BO/Utils/LoginRpcUtil.cs create mode 100644 BO/Utils/LoginUserInfo.cs create mode 100644 BO/Utils/ServerUrlConfig.cs create mode 100644 BO/Utils/XmlUtil.cs create mode 100644 BWP.WinFormControl/BWP.WinFormControl.csproj create mode 100644 BWP.WinFormControl/BoolToVisibilityConverter.cs create mode 100644 BWP.WinFormControl/Calendar.xaml create mode 100644 BWP.WinFormControl/Calendar.xaml.cs create mode 100644 BWP.WinFormControl/ComboBoxHelper.cs create mode 100644 BWP.WinFormControl/ComponentUtil.cs create mode 100644 BWP.WinFormControl/Images/today.png create mode 100644 BWP.WinFormControl/NumberPad.xaml create mode 100644 BWP.WinFormControl/NumberPad.xaml.cs create mode 100644 BWP.WinFormControl/Properties/AssemblyInfo.cs create mode 100644 BWP.WinFormControl/UComboBox.cs create mode 100644 BWP.WinFormControl/UDatePicker.cs create mode 100644 BWP.WinFormControl/UTextBoxWithPad.cs create mode 100644 BWP.WinFormControl/VirtualKeyPad.xaml create mode 100644 BWP.WinFormControl/VirtualKeyPad.xaml.cs create mode 100644 BWP.WinFormControl/WeightControl.Designer.cs create mode 100644 BWP.WinFormControl/WeightControl.cs create mode 100644 BWP.WinFormControl/WeightControl.resx create mode 100644 ButcherManageClient/AfterLoginUtil.cs create mode 100644 ButcherManageClient/App.config create mode 100644 ButcherManageClient/AppContext.cs create mode 100644 ButcherManageClient/ButcherManageClient.csproj create mode 100644 ButcherManageClient/Login.Designer.cs create mode 100644 ButcherManageClient/Login.cs create mode 100644 ButcherManageClient/Login.resx create mode 100644 ButcherManageClient/Program.cs create mode 100644 ButcherManageClient/Properties/AssemblyInfo.cs create mode 100644 ButcherManageClient/Properties/Resources.Designer.cs create mode 100644 ButcherManageClient/Properties/Resources.resx create mode 100644 ButcherManageClient/Properties/Settings.Designer.cs create mode 100644 ButcherManageClient/Properties/Settings.settings create mode 100644 ButcherManageClient/SettingForm.Designer.cs create mode 100644 ButcherManageClient/SettingForm.cs create mode 100644 ButcherManageClient/SettingForm.resx create mode 100644 ButcherOrder - 副本/App.config create mode 100644 ButcherOrder - 副本/AppContext.cs create mode 100644 ButcherOrder - 副本/ButcherOrder.csproj create mode 100644 ButcherOrder - 副本/ButcherOrderForm.Designer.cs create mode 100644 ButcherOrder - 副本/ButcherOrderForm.cs create mode 100644 ButcherOrder - 副本/ButcherOrderForm.resx create mode 100644 ButcherOrder - 副本/Properties/AssemblyInfo.cs create mode 100644 ButcherOrder - 副本/Properties/Resources.Designer.cs create mode 100644 ButcherOrder - 副本/Properties/Resources.resx create mode 100644 ButcherOrder - 副本/Properties/Settings.Designer.cs create mode 100644 ButcherOrder - 副本/Properties/Settings.settings create mode 100644 ButcherOrder/ButcherOrder.csproj create mode 100644 ButcherOrder/ButcherOrderForm.Designer.cs create mode 100644 ButcherOrder/ButcherOrderForm.cs create mode 100644 ButcherOrder/ButcherOrderForm.resx create mode 100644 ButcherOrder/Properties/AssemblyInfo.cs create mode 100644 ButcherOrder/ViewDetail.Designer.cs create mode 100644 ButcherOrder/ViewDetail.cs create mode 100644 ButcherOrder/ViewDetail.resx create mode 100644 ButcherWeight/ButcherWeight.csproj create mode 100644 ButcherWeight/Properties/AssemblyInfo.cs create mode 100644 ButcherWeight/WeightForm.Designer.cs create mode 100644 ButcherWeight/WeightForm.cs create mode 100644 ButcherWeight/WeightForm.resx create mode 100644 WeighAndGrading/App.config create mode 100644 WeighAndGrading/Form1.Designer.cs create mode 100644 WeighAndGrading/Form1.cs create mode 100644 WeighAndGrading/Program.cs create mode 100644 WeighAndGrading/Properties/AssemblyInfo.cs create mode 100644 WeighAndGrading/Properties/Resources.Designer.cs create mode 100644 WeighAndGrading/Properties/Resources.resx create mode 100644 WeighAndGrading/Properties/Settings.Designer.cs create mode 100644 WeighAndGrading/Properties/Settings.settings create mode 100644 WeighAndGrading/WeighAndGrading.csproj create mode 100644 WeightClient/App.config create mode 100644 WeightClient/AppContext.cs create mode 100644 WeightClient/Login.Designer.cs create mode 100644 WeightClient/Login.cs create mode 100644 WeightClient/Login.resx create mode 100644 WeightClient/Program.cs create mode 100644 WeightClient/Properties/AssemblyInfo.cs create mode 100644 WeightClient/Properties/Resources.Designer.cs create mode 100644 WeightClient/Properties/Resources.resx create mode 100644 WeightClient/Properties/Settings.Designer.cs create mode 100644 WeightClient/Properties/Settings.settings create mode 100644 WeightClient/SettingForm.Designer.cs create mode 100644 WeightClient/SettingForm.cs create mode 100644 WeightClient/SettingForm.resx create mode 100644 WeightClient/WeightClient.csproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..708eb27 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.* +*.TMP +*.suo +*.user +obj +bin +_ReSharper.B3ButcherManageClient diff --git a/B3ButcherManageClient.sln b/B3ButcherManageClient.sln new file mode 100644 index 0000000..8122299 --- /dev/null +++ b/B3ButcherManageClient.sln @@ -0,0 +1,46 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BO", "BO\BO.csproj", "{8968F14A-C7C7-4751-96CE-B114FBFD65EF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BWP.WinFormControl", "BWP.WinFormControl\BWP.WinFormControl.csproj", "{A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherManageClient", "ButcherManageClient\ButcherManageClient.csproj", "{59B13436-4884-4533-9C7E-80E8580CBF55}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherOrder", "ButcherOrder\ButcherOrder.csproj", "{B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherWeight", "ButcherWeight\ButcherWeight.csproj", "{17F58766-89EB-44C0-8EEF-4787849979EC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8968F14A-C7C7-4751-96CE-B114FBFD65EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8968F14A-C7C7-4751-96CE-B114FBFD65EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8968F14A-C7C7-4751-96CE-B114FBFD65EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8968F14A-C7C7-4751-96CE-B114FBFD65EF}.Release|Any CPU.Build.0 = Release|Any CPU + {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC}.Release|Any CPU.Build.0 = Release|Any CPU + {59B13436-4884-4533-9C7E-80E8580CBF55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {59B13436-4884-4533-9C7E-80E8580CBF55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {59B13436-4884-4533-9C7E-80E8580CBF55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {59B13436-4884-4533-9C7E-80E8580CBF55}.Release|Any CPU.Build.0 = Release|Any CPU + {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9E62966-DA6C-4075-91A3-CB66C4FBBC6A}.Release|Any CPU.Build.0 = Release|Any CPU + {17F58766-89EB-44C0-8EEF-4787849979EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17F58766-89EB-44C0-8EEF-4787849979EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17F58766-89EB-44C0-8EEF-4787849979EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17F58766-89EB-44C0-8EEF-4787849979EC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/BO/BO.csproj b/BO/BO.csproj new file mode 100644 index 0000000..6f5f4d6 --- /dev/null +++ b/BO/BO.csproj @@ -0,0 +1,78 @@ + + + + + Debug + AnyCPU + {8968F14A-C7C7-4751-96CE-B114FBFD65EF} + Library + Properties + BO + BO + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + D:\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll + + + False + ..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll + + + False + D:\BwpB3Project\tsref\Debug\Forks.Utils.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BO/BO/Bill/WeightBill/WeightBill.cs b/BO/BO/Bill/WeightBill/WeightBill.cs new file mode 100644 index 0000000..4d529f7 --- /dev/null +++ b/BO/BO/Bill/WeightBill/WeightBill.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO +{ + public class WeightBill + { + public string CreaterName { get; set; } + public long? Supplier_ID { get; set; } + + public string Supplier_Name { get; set; } + + public short? PurchaseType_ID { get; set; } + + public string PurchaseType_Name { get; set; } + + public DateTime? WeightTime { get; set; } + + public long? Car_ID { get; set; } + + public string Car_Name { get; set; } + + public long? Livestock_ID { get; set; } + + public string Livestock_Name { get; set; } + + public long? Employee_ID { get; set; } + + public string Employee_Name { get; set; } + + public long? HogGrade_ID { get; set; } + + public string HogGrade_Name { get; set; } + + public long? Zone_ID { get; set; } + + public string Zone_Name { get; set; } + + public decimal? PenWeight { get; set; } + + public decimal? PenPrice { get; set; } + + public decimal? PenMoney { get; set; } + + public string AnimalTestNumber { get; set; } + + public DateTime? AnimalTestDate { get; set; } + + public string AnimalTestMan { get; set; } + + public string Remark { get; set; } + + public long? Inspector_ID { get; set; } + + public long? Inspector_Name { get; set; } + + // List _farmerDetails = new List(); + //public List FarmerDetails { get { return _farmerDetails; } } + } +} diff --git a/BO/BO/Bill/WeightBill/WeightBill_AbnormalDetail.cs b/BO/BO/Bill/WeightBill/WeightBill_AbnormalDetail.cs new file mode 100644 index 0000000..493c08a --- /dev/null +++ b/BO/BO/Bill/WeightBill/WeightBill_AbnormalDetail.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO +{ + public class WeightBill_AbnormalDetail + { + } +} diff --git a/BO/BO/Bill/WeightBill/WeightBill_Detail.cs b/BO/BO/Bill/WeightBill/WeightBill_Detail.cs new file mode 100644 index 0000000..f174074 --- /dev/null +++ b/BO/BO/Bill/WeightBill/WeightBill_Detail.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO +{ + public class WeightBill_Detail + { + } +} diff --git a/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs b/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs new file mode 100644 index 0000000..8847e98 --- /dev/null +++ b/BO/BO/Bill/WeightBill/WeightBill_FarmerDetail.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO +{ + public class WeightBill_FarmerDetail + { + public int Index { get; set; } + + public long? Farmer_ID { get; set; } + + public string Farmer_Name { get; set; } + + public int? Number { get; set; } + } +} diff --git a/BO/BO/Bill/WeightBill/WeightBill_HouseDetail.cs b/BO/BO/Bill/WeightBill/WeightBill_HouseDetail.cs new file mode 100644 index 0000000..ed895df --- /dev/null +++ b/BO/BO/Bill/WeightBill/WeightBill_HouseDetail.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.BO +{ + public class WeightBill_HouseDetail + { + } +} diff --git a/BO/Properties/AssemblyInfo.cs b/BO/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..61343e6 --- /dev/null +++ b/BO/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("BO")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("BO")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("a97530c2-6a46-4900-9444-a0e3e2ab1d02")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/BO/Utils/BaseInfoRpcUtil.cs b/BO/Utils/BaseInfoRpcUtil.cs new file mode 100644 index 0000000..7237c67 --- /dev/null +++ b/BO/Utils/BaseInfoRpcUtil.cs @@ -0,0 +1,29 @@ +using BO.BO; +using Forks.JsonRpc.Client; +using Forks.JsonRpc.Client.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.Utils +{ + public static class BaseInfoRpcUtil + { + //public static List GetBaseInfoEntity(string rpcName) + //{ + // var list = RpcFacade.Call>(string.Format("/MainSystem/B3ClientService/Rpcs/BaseInfoRpc/{0}", rpcName)); + // var result = new List(); + // foreach (RpcObject o in list) + // { + // var entity = new BaseInfoEntity(); + // entity.ID = o.Get("ID"); + // entity.Name = o.Get("Name"); + // entity.Spell = o.Get("Spell"); + // result.Add(entity); + // } + // return result; + //} + } +} diff --git a/BO/Utils/BillRpc/WeightBillRpc.cs b/BO/Utils/BillRpc/WeightBillRpc.cs new file mode 100644 index 0000000..9980562 --- /dev/null +++ b/BO/Utils/BillRpc/WeightBillRpc.cs @@ -0,0 +1,46 @@ +using BO.BO; +using Forks.JsonRpc.Client; +using Forks.JsonRpc.Client.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.Utils.BillRpc +{ + public static class WeightBillRpc + { + public static bool Send(WeightBill bo) + { + const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/UploadBill"; + var obj = new RpcObject("/MainSystem/B3ClientService/BO/WeightBill"); + obj.Set("CreaterName", bo.CreaterName); + obj.Set("Supplier_ID", bo.Supplier_ID); + obj.Set("Supplier_Name", bo.Supplier_Name); + obj.Set("PurchaseType_ID", bo.PurchaseType_ID); + obj.Set("PurchaseType_Name", bo.PurchaseType_Name); + obj.Set("WeightTime", bo.WeightTime); + obj.Set("Car_ID", bo.Car_ID); + obj.Set("Car_Name", bo.Car_Name); + obj.Set("Livestock_ID", bo.Livestock_ID); + obj.Set("Livestock_Name", bo.Livestock_Name); + obj.Set("Employee_ID", bo.Employee_ID); + obj.Set("Employee_Name", bo.Employee_Name); + obj.Set("HogGrade_ID", bo.HogGrade_ID); + obj.Set("HogGrade_Name", bo.HogGrade_Name); + obj.Set("Zone_ID", bo.Zone_ID); + obj.Set("Zone_Name", bo.Zone_Name); + obj.Set("PenWeight", bo.PenWeight); + obj.Set("PenPrice", bo.PenPrice); + obj.Set("PenMoney", bo.PenMoney); + obj.Set("AnimalTestNumber", bo.AnimalTestNumber); + obj.Set("AnimalTestDate", bo.AnimalTestDate); + obj.Set("AnimalTestMan", bo.AnimalTestMan); + obj.Set("Remark", bo.Remark); + + + return RpcFacade.Call(method, obj); + } + } +} diff --git a/BO/Utils/LoginRpcUtil.cs b/BO/Utils/LoginRpcUtil.cs new file mode 100644 index 0000000..599ea31 --- /dev/null +++ b/BO/Utils/LoginRpcUtil.cs @@ -0,0 +1,46 @@ +using Forks.JsonRpc.Client; +using Forks.JsonRpc.Client.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.Utils +{ + public class LoginRpcUtil + { + public static string GetUserNameByCode(string code, out string error) + { + try + { + error = string.Empty; + const string wpfUserMethod = "/MainSystem/B3ClientService/Rpcs/UserInfoRpc/GetUserName"; + return RpcFacade.Call(wpfUserMethod, code); + } + catch (Exception ex) + { + error = ex.ToString(); + } + return string.Empty; + } + + public static void FillUserEmpInfo(string name,LoginUserInfo userInfo) + { + const string wpfUserMethod = "/MainSystem/B3ClientService/Rpcs/UserInfoRpc/GetUserEmpInfo"; + var obj= RpcFacade.Call(wpfUserMethod, name); + if (obj != null) + { + userInfo.ID = obj.Get("User_ID"); + userInfo.UserName = obj.Get("User_Name"); + userInfo.Domain_ID = obj.Get("Domain_ID"); + userInfo.AccountingUnit_ID = obj.Get("AccountingUnit_ID"); + userInfo.AccountingUnit_Name = obj.Get("AccountingUnit_Name"); + userInfo.Department_ID = obj.Get("Department_ID"); + userInfo.Department_Name = obj.Get("Department_Name"); + userInfo.Employee_ID = obj.Get("Employee_ID"); + userInfo.Employee_Name = obj.Get("Employee_Name"); + } + } + } +} diff --git a/BO/Utils/LoginUserInfo.cs b/BO/Utils/LoginUserInfo.cs new file mode 100644 index 0000000..7c776e4 --- /dev/null +++ b/BO/Utils/LoginUserInfo.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.Utils +{ + public class LoginUserInfo + { + public long ID { get; set; } + + public string UserName { get; set; } + + public long Domain_ID { get; set; } + + public long? AccountingUnit_ID { get; set; } + + public string AccountingUnit_Name { get; set; } + + public long? Department_ID { get; set; } + + public string Department_Name { get; set; } + + public long Employee_ID { get; set; } + + public string Employee_Name { get; set; } + } +} diff --git a/BO/Utils/ServerUrlConfig.cs b/BO/Utils/ServerUrlConfig.cs new file mode 100644 index 0000000..ec24b2d --- /dev/null +++ b/BO/Utils/ServerUrlConfig.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BO.Utils +{ + public class ServerUrlConfig + { + public string ServerUrl { get; set; } + } +} diff --git a/BO/Utils/XmlUtil.cs b/BO/Utils/XmlUtil.cs new file mode 100644 index 0000000..5a886e9 --- /dev/null +++ b/BO/Utils/XmlUtil.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace BO.Utils +{ + public static class XmlUtil + { + public static void SerializerObjToFile(object obj, string fileName = "") + { + if (string.IsNullOrWhiteSpace(fileName)) + { + fileName = obj.GetType().Name + ".xml"; + } + var ser = new XmlSerializer(obj.GetType()); + using (var stream = File.Open(fileName, FileMode.Create)) + { + ser.Serialize(stream, obj); + } + } + + + public static T DeserializeFromFile(string fileName = "") + { + if (string.IsNullOrWhiteSpace(fileName)) + { + fileName = typeof(T).Name + ".xml"; + } + if (!File.Exists(fileName)) + { + throw new FileNotFoundException("不存在文件:" + fileName); + } + using (var reader = new StreamReader(fileName)) + { + var xs = new XmlSerializer(typeof(T)); + object obj = xs.Deserialize(reader); + reader.Close(); + return (T)obj; + } + } + } +} diff --git a/BWP.WinFormControl/BWP.WinFormControl.csproj b/BWP.WinFormControl/BWP.WinFormControl.csproj new file mode 100644 index 0000000..8151e56 --- /dev/null +++ b/BWP.WinFormControl/BWP.WinFormControl.csproj @@ -0,0 +1,109 @@ + + + + + Debug + AnyCPU + {A782B23E-BE6D-4F51-B5CB-5CD259BA97CC} + Library + Properties + BWP.WinFormControl + BWP.WinFormControl + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll + + + + + + + + + + + + + + + + + + + Calendar.xaml + + + + + NumberPad.xaml + + + + Component + + + Component + + + Component + + + VirtualKeyPad.xaml + + + UserControl + + + WeightControl.cs + + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + + WeightControl.cs + + + + + \ No newline at end of file diff --git a/BWP.WinFormControl/BoolToVisibilityConverter.cs b/BWP.WinFormControl/BoolToVisibilityConverter.cs new file mode 100644 index 0000000..5d11236 --- /dev/null +++ b/BWP.WinFormControl/BoolToVisibilityConverter.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace BWP.WinFormControl.Converter +{ + class BoolToVisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if ((bool?)value == true) + return System.Windows.Visibility.Visible; + return System.Windows.Visibility.Collapsed; + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/BWP.WinFormControl/Calendar.xaml b/BWP.WinFormControl/Calendar.xaml new file mode 100644 index 0000000..370a6e7 --- /dev/null +++ b/BWP.WinFormControl/Calendar.xaml @@ -0,0 +1,730 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BWP.WinFormControl/Calendar.xaml.cs b/BWP.WinFormControl/Calendar.xaml.cs new file mode 100644 index 0000000..bd56cca --- /dev/null +++ b/BWP.WinFormControl/Calendar.xaml.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace BWP.WinFormControl +{ + /// + /// Calendar.xaml 的交互逻辑 + /// + public partial class CalendarSelecter : Window, INotifyPropertyChanged + { + public CalendarSelecter() + { + InitializeComponent(); + } + + public void DragWindow(object sender, MouseButtonEventArgs args) + { + this.DragMove(); + } + + private DateTime _result; + public DateTime Result + { + get { return _result; } + private set { _result = value; OnPropertyChanged("Result"); } + } + + private void MC_SelectedDatesChanged(object sender, RoutedEventArgs e) + { + Result = MC.SelectedDate.Value; + DialogResult = true; + } + + public event PropertyChangedEventHandler PropertyChanged; + protected void OnPropertyChanged(string propertyName) + { + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + + private void imgToday_Initialized(object sender, EventArgs e) + { + Assembly myAssembly = Assembly.GetExecutingAssembly(); + //格式为:项目名称-文件夹地址-文件名称 + Stream myStream = myAssembly.GetManifestResourceStream("BWP.WinFormControl.Images.today.png"); + //图片格式 + BitmapImage image = new BitmapImage(); + image.BeginInit(); + image.StreamSource = myStream; + image.EndInit(); + myStream.Dispose(); + myStream.Close(); + + var imagePanel = (sender as Image); + imagePanel.Source = image; + } + } +} diff --git a/BWP.WinFormControl/ComboBoxHelper.cs b/BWP.WinFormControl/ComboBoxHelper.cs new file mode 100644 index 0000000..6fa2878 --- /dev/null +++ b/BWP.WinFormControl/ComboBoxHelper.cs @@ -0,0 +1,47 @@ +using Forks.JsonRpc.Client; +using Forks.JsonRpc.Client.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BWP.WinFormControl +{ + internal static class ComboBoxHelper + { + public static List GetList(string rpc, string input, string codeArg, int range) + { + var list = RpcFacade.Call>(rpc, input, codeArg, range); + var result = new List(); + foreach (var item in list) + { + result.Add(new WordPair(item.Get("DisplayName"), item.Get("PhyName"))); + } + return result; + } + } + + public sealed class WordPair + { + public string DisplayName { get; private set; } + public string PhyName { get; private set; } + public WordPair() + { } + + public WordPair(string display) + { + DisplayName = display; + } + public WordPair(string display, string phy) + { + DisplayName = display; + PhyName = phy; + } + + public override string ToString() + { + return DisplayName; + } + } +} diff --git a/BWP.WinFormControl/ComponentUtil.cs b/BWP.WinFormControl/ComponentUtil.cs new file mode 100644 index 0000000..b042ae0 --- /dev/null +++ b/BWP.WinFormControl/ComponentUtil.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace BWP.WinFormControl +{ + static class ComponentUtil + { + public static Form GetParentFormm(Control control) + { + if (control.Parent != null) + { + if (control.Parent is Form) + { + return control.Parent as Form; ; + } + else + { + return GetParentFormm(control.Parent); + } + } + return control as Form; + + } + } +} diff --git a/BWP.WinFormControl/Images/today.png b/BWP.WinFormControl/Images/today.png new file mode 100644 index 0000000000000000000000000000000000000000..d9d90987776ff0a1b0a471fcbf4f110df3184bf2 GIT binary patch literal 1101 zcmV-T1hV^yP)xm6buM5G&qB9InJAdKV>f`|&bF(N@7GYa!( z($vP(zVkfF)1KqZIHTi%58r)r@4MeU_dDm@t1@LWZPDqmVT0aVLsS%5TU*IcP(Z6_ zZw3b0mq5Bvk8GUHMj^?`WJpP&iJl&cbvP(o=L@Ec3^HYAsteNFrWK4`@9ia?#Na*A zW#9?$h8zD8j;yU!$^O7Z@gQ`wvy(n$XOj`6L-rE}*_g`8184fOwMBEhU_~L5cVs^U zMZnmuLw6p6l9E)(HZ)LAMFqux{0)$HT)ISS`#iZLl~=*R^crXubYOvO z4qy&g_m1p4AWchFCCn1AR8`Tr!9faxN2lA`s2fD{pkXsQ^p%uQG)N~84Uwg>kyfy< zbs@f`S@n5%@v4BINq+z1c?>v#QsAD*VUHOpGLj-nOVy9}fZSMfGsR*NY!?d)sVggs zy6tvK#{v@I{cqUfW%RKMDYmrgYKq3+aCyhO#in@fRl5-FKd6H;fwZ=fpHHg@Fy8V| zo)|Evrjlb}fz}`oZZAW_^Jv>a_KJ8h0y`7uLc;?!H8cZULto3`WNkur-c=_fd%@Y> zPKjk@6b(seEnf3H0-5}5X`uv69tmipz5%-BpfXE44#AiU-FuMWp99a_>8KJ8&)Aesm;u^`Py!bHPXX`6SXarpf6;#HfwD>Lo{%^Bc= zOv;`yLdVzZ>(x$O<>e}=81dqMB3^2^U&z`$5&3Q&4hA^XqGVEQQxkUYb_W77z#blLJGr>0_*myi{$?vnIwXDNfv9t z_*->#v@|)XE>PK9wH`^1^~w~z!_Nk=h;%p2Nq=#Xc!RAv-dzEvp?NM4v0NoJ<9`85 zvTMBH(Cq?HB-M+2N|;~pp=SkT6i#0vnf>-x`fZ4|O`7peLD2Ttx4>h)Lf{igC_*4i zwpej7*mA)5kZmyMr%6sHpR@?hA-@pTPJ9I8=r01$-V)}j zRS1k9_tn`ONwmma>)6S9N_bVS+YjXVM9f`DOh^_OrV}=IJp4f + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +