Browse Source

易波啊冲突啊

Merge branch 'master' of bwpgit:BWPB3/B3ButcherManageClient

# Conflicts:
#	B3ButcherManageClient.sln
#	BO/BO.csproj
#	BO/Utils/AfterLoginUtil.cs
#	QualityAndOrder/QualityOrderForm.Designer.cs
#	QualityAndOrder/QualityOrderForm.resx
#	WeighAndGrading/GradeFrom.Designer.cs
master
wugang 8 years ago
parent
commit
2eaf9b0d23
63 changed files with 3297 additions and 758 deletions
  1. +17
    -7
      B3ButcherManageClient.sln
  2. +6
    -5
      BO/BO.csproj
  3. +13
    -0
      BO/BO/Bill/GradeAndWeight/DetailLastIndex.cs
  4. +0
    -4
      BO/BO/Bill/GradeAndWeight/GradeAndWeight.cs
  5. +17
    -5
      BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs
  6. +8
    -2
      BO/BO/Bill/OrderDetail/HurryRecord.cs
  7. +5
    -0
      BO/BO/Bill/OrderDetail/OrderDetail.cs
  8. +6
    -6
      BO/BO/Bill/OrderDetail/SelectHurryList.cs
  9. +18
    -0
      BO/BO/Bill/TrunksIousOutInStore/TrunksIousOutInStore.cs
  10. +4
    -3
      BO/BO/Bill/WeightBill/WeightBill.cs
  11. +2
    -0
      BO/BO/Bill/WeightBill/WeightBillList.cs
  12. +22
    -0
      BO/CTuple.cs
  13. +0
    -3
      BO/Utils/AfterLoginUtil.cs
  14. +121
    -25
      BO/Utils/BillRpc/GradeAndWeightRpc.cs
  15. +0
    -28
      BO/Utils/BillRpc/OrderConfirmRpc.cs
  16. +54
    -12
      BO/Utils/BillRpc/OrderDetailRpc.cs
  17. +8
    -2
      BO/Utils/BillRpc/WeightBillRpc.cs
  18. +1
    -1
      BO/Utils/ButcherAppContext.cs
  19. +79
    -0
      BO/Utils/LoginRpcUtil.cs
  20. +7
    -0
      BO/Utils/LoginUserInfo.cs
  21. +2
    -0
      BO/Utils/ServerUrlConfig.cs
  22. +3
    -1
      BO/Utils/XmlUtil.cs
  23. +5
    -1
      BWP.WinFormControl/BWP.WinFormControl.csproj
  24. BIN
      BWP.WinFormControl/Images/stop.png
  25. BIN
      BWP.WinFormControl/Images/working.png
  26. +0
    -8
      ButcherManageClient/ButcherManageClient.csproj
  27. +22
    -4
      ButcherManageClient/Login.cs
  28. +29
    -4
      ButcherManageClient/SettingForm.Designer.cs
  29. +4
    -0
      ButcherManageClient/SettingForm.cs
  30. +0
    -3
      ButcherOrder/ButcherOrderForm.cs
  31. +0
    -12
      ButcherWeight/ButcherWeight.csproj
  32. +0
    -5
      ButcherWeight/WeightContext.cs
  33. +121
    -110
      ButcherWeight/WeightForm.Designer.cs
  34. +20
    -0
      ButcherWeight/WeightForm.cs
  35. +3
    -0
      ButcherWeight/WeightForm.resx
  36. +0
    -1
      OrderConfirm/OrderConfirm.csproj
  37. +223
    -111
      OrderConfirm/OrderConfirmForm.Designer.cs
  38. +138
    -61
      OrderConfirm/OrderConfirmForm.cs
  39. +20
    -2
      OrderConfirm/OrderConfirmForm.resx
  40. +39
    -6
      QualityAndOrder/HurryRecordPrint.cs
  41. +31
    -9
      QualityAndOrder/HurryRecordView.Designer.cs
  42. +8
    -3
      QualityAndOrder/HurryRecordView.cs
  43. +7
    -1
      QualityAndOrder/HurryRecordView.resx
  44. +332
    -7
      QualityAndOrder/QualityOrderForm.Designer.cs
  45. +2
    -6
      QualityAndOrder/QualityOrderForm.cs
  46. +74
    -17
      QualityAndOrder/QualityOrderForm.resx
  47. +6
    -8
      QualityAndOrder/QualityOrderFormForTab2.cs
  48. +26
    -22
      QualityAndOrder/QualityOrderFormForTab3.cs
  49. BIN
      Setup/Release/Setup.msi
  50. +69
    -103
      Setup/Setup.vdproj
  51. +36
    -0
      TrunksIousOutInStore/Properties/AssemblyInfo.cs
  52. +71
    -0
      TrunksIousOutInStore/TrunksIousOutInStore.csproj
  53. +419
    -0
      TrunksIousOutInStore/TrunksIousOutInStoreForm.Designer.cs
  54. +19
    -0
      TrunksIousOutInStore/TrunksIousOutInStoreForm.cs
  55. +120
    -0
      TrunksIousOutInStore/TrunksIousOutInStoreForm.resx
  56. +20
    -3
      WeighAndGrading/BodyDiscontSetting.cs
  57. +0
    -5
      WeighAndGrading/GradeContext.cs
  58. +390
    -10
      WeighAndGrading/GradeFrom.Designer.cs
  59. +430
    -115
      WeighAndGrading/GradeFrom.cs
  60. +28
    -16
      WeighAndGrading/GradeFrom.resx
  61. +63
    -0
      WeighAndGrading/Properties/Resources.Designer.cs
  62. +120
    -0
      WeighAndGrading/Properties/Resources.resx
  63. +9
    -1
      WeighAndGrading/WeighAndGrading.csproj

+ 17
- 7
B3ButcherManageClient.sln View File

@ -1,7 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2002
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BO", "BO\BO.csproj", "{8968F14A-C7C7-4751-96CE-B114FBFD65EF}"
EndProject
@ -25,7 +27,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateUpdateXmlFile", "Crea
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderConfirm", "OrderConfirm\OrderConfirm.csproj", "{D4723253-E102-40C7-819F-8052C5BE241D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarcassStateWeight", "CarcassStateWeight\CarcassStateWeight.csproj", "{51C38871-00FE-4F18-BD49-D6A9124A844C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrunksIousOutInStore", "TrunksIousOutInStore\TrunksIousOutInStore.csproj", "{4786A544-10F4-45C0-9E78-540914C2CE9D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -75,12 +78,19 @@ Global
{D4723253-E102-40C7-819F-8052C5BE241D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4723253-E102-40C7-819F-8052C5BE241D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4723253-E102-40C7-819F-8052C5BE241D}.Release|Any CPU.Build.0 = Release|Any CPU
{51C38871-00FE-4F18-BD49-D6A9124A844C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{51C38871-00FE-4F18-BD49-D6A9124A844C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{51C38871-00FE-4F18-BD49-D6A9124A844C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{51C38871-00FE-4F18-BD49-D6A9124A844C}.Release|Any CPU.Build.0 = Release|Any CPU
{4786A544-10F4-45C0-9E78-540914C2CE9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4786A544-10F4-45C0-9E78-540914C2CE9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4786A544-10F4-45C0-9E78-540914C2CE9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4786A544-10F4-45C0-9E78-540914C2CE9D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B1C1CB2D-8E4D-496F-8646-F31D1DC76EAC}
EndGlobalSection
EndGlobal

+ 6
- 5
BO/BO.csproj View File

@ -36,7 +36,7 @@
</Reference>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath>
<HintPath>..\..\..\tsref\Debug\Forks.EnterpriseServices.dll</HintPath>
</Reference>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -44,7 +44,7 @@
</Reference>
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>D:\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath>
<HintPath>..\..\..\tsref\Debug\Forks.Utils.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -61,13 +61,15 @@
<Compile Include="BO\BaseInfo\BodyDiscontItem.cs" />
<Compile Include="BO\Bill\CarcassStateWeight\CarcassStateWeight.cs" />
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight.cs" />
<Compile Include="BO\Bill\GradeAndWeight\DetailLastIndex.cs" />
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight_Detail.cs" />
<Compile Include="BO\Bill\OrderDetail\ConfirmOrder.cs" />
<Compile Include="BO\Bill\OrderDetail\HurryRecord.cs" />
<Compile Include="BO\Bill\OrderDetail\NeedOrderEntity.cs" />
<Compile Include="BO\Bill\OrderDetail\OrderDetail.cs" />
<Compile Include="BO\Bill\OrderDetail\SelectHurryList.cs" />
<Compile Include="BO\Bill\SecondOrder\SecondOrder.cs" />
<Compile Include="BO\Bill\SecondOrder\SecondOrder_Detail.cs" />
<Compile Include="BO\Bill\TrunksIousOutInStore\TrunksIousOutInStore.cs" />
<Compile Include="BO\Bill\WeightBill\HouseAndSanctionEdit.cs" />
<Compile Include="BO\Bill\WeightBill\HouseAndSanctionList.cs" />
<Compile Include="BO\Bill\WeightBill\PrintWeightBill.cs" />
@ -78,7 +80,6 @@
<Compile Include="Utils\AfterLoginUtil.cs" />
<Compile Include="Utils\BillRpc\GradeAndWeightRpc.cs" />
<Compile Include="Utils\BillRpc\HouseAndSanctionRpc.cs" />
<Compile Include="Utils\BillRpc\OrderConfirmRpc.cs" />
<Compile Include="Utils\BillRpc\OrderDetailRpc.cs" />
<Compile Include="Utils\BillRpc\SecondOrderRpc.cs" />
<Compile Include="Utils\BillRpc\CarcassStateWeightRpc.cs" />
@ -98,7 +99,7 @@
<Compile Include="Utils\XmlUtil.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Bill\CarcassStateWeight\" />
<Folder Include="Bill\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.


+ 13
- 0
BO/BO/Bill/GradeAndWeight/DetailLastIndex.cs View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO.BO.Bill
{
public class DetailLastIndex
{
public int Index { get; set; }
}
}

+ 0
- 4
BO/BO/Bill/GradeAndWeight/GradeAndWeight.cs View File

@ -12,10 +12,6 @@ namespace BO.BO.Bill
public int Order { get; set; }
public short Technics { get; set; }
public string Technics_Name { get; set; }
public int Number { get; set; }
public int Already { get; set; }


+ 17
- 5
BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs View File

@ -1,4 +1,5 @@
using System;
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -6,10 +7,16 @@ using System.Threading.Tasks;
namespace BO.BO.Bill
{
[MapToTable("GradeAndWeight_Detail")]
[KeyField("SID", KeyGenType.identity)]
public class GradeAndWeight_Detail
{
public long ID { get; set; }
/// <summary>
/// 本地ID
/// </summary>
public long SID { get; set; }
[NonDmoProperty]
public bool ReadWeight { get; set; }
public long? OrderDetail_ID { get; set; }
@ -18,11 +25,11 @@ namespace BO.BO.Bill
public DateTime Date { get; set; }
public short Technics { get; set; }
public short? Technics { get; set; }
public string Technics_Name { get; set; }
public long Livestock_ID { get; set; }
public long? Livestock_ID { get; set; }
public string Livestock_Name { get; set; }
@ -30,6 +37,11 @@ namespace BO.BO.Bill
public DateTime Time { get; set; }
public DateTime TempTime { get { return Time; } }
/// <summary>
/// ServerID
/// </summary>
public long ID { get; set; }
public bool Sync { get; set; }
}
}

+ 8
- 2
BO/BO/Bill/OrderDetail/HurryRecord.cs View File

@ -10,16 +10,22 @@ namespace BO.BO.Bill
{
public long ID { get; set; }
public long FromOrderDetail_ID { get; set; }
public long WeightBill_ID { get; set; }
public long? B3WeighBill_ID { get; set; }
public string Supplier_Name { get; set; }
public long? B3WeighBill_ID { get; set; }
public string LiveColonyHouse_Name { get; set; }
public int? Order { get; set; }
public int HurryNumber { get; set; }
public DateTime Time { get; set; }
public long? ToOrderDetail_ID { get; set; }
public int TotalNumber { get; set; }
}
}

+ 5
- 0
BO/BO/Bill/OrderDetail/OrderDetail.cs View File

@ -33,5 +33,10 @@ namespace BO.BO.Bill
public bool IsHurryButcher { get; set; }
public bool SecondarySplit { get; set; }
//0 = 未开始; 10 = 已开始; 20 = 已完毕;
public int OrderState { get; set; }
public int Doing { get { if (OrderState == 10) return -10; else return OrderState; } }
}
}

BO/BO/Bill/OrderDetail/ConfirmOrder.cs → BO/BO/Bill/OrderDetail/SelectHurryList.cs View File

@ -6,18 +6,18 @@ using System.Threading.Tasks;
namespace BO.BO.Bill
{
public class ConfirmOrder
public class SelectHurryList
{
public long ID { get; set; }
public int Order { get; set; }
public long WeightBill_ID { get; set; }
public long? B3WeighBill_ID { get; set; }
public string Supplier_Name { get; set; }
public string LiveColonyHouse_Name { get; set; }
public int Number { get; set; }
public int WeightNumber { get; set; }
public bool Confirmed { get; set; }
public int HurryNumber { get; set; }
}
}

+ 18
- 0
BO/BO/Bill/TrunksIousOutInStore/TrunksIousOutInStore.cs View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO.BO
{
public class TrunksIousOutInStore:SyncBase
{
public string BarCode { get; set; }
public string Goods_Name { get; set; }
public string Goods_Spec { get; set; }
}
}

+ 4
- 3
BO/BO/Bill/WeightBill/WeightBill.cs View File

@ -1,10 +1,8 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TSingSoft.WebPluginFramework;
namespace BO.BO
{
@ -12,6 +10,9 @@ namespace BO.BO
public class WeightBill
{
public int RowVersion { get; set; }
public int PrintNumber { get; set; }
public long ID { get; set; }
public long? B3ID { get; set; }


+ 2
- 0
BO/BO/Bill/WeightBill/WeightBillList.cs View File

@ -31,5 +31,7 @@ namespace BO.BO
public string Remark { get; set; }
public bool FinishWeight { get; set; }
public int PrintNumber { get; set; }
}
}

+ 22
- 0
BO/CTuple.cs View File

@ -39,4 +39,26 @@ namespace BO
Item3 = t3;
}
}
public class CTuple<T1, T2, T3, T4>
{
public T1 Item1 { get; set; }
public T2 Item2 { get; set; }
public T3 Item3 { get; set; }
public T4 Item4 { get; set; }
public CTuple()
{ }
public CTuple(T1 t1, T2 t2, T3 t3, T4 t4)
{
Item1 = t1;
Item2 = t2;
Item3 = t3;
Item4 = t4;
}
}
}

+ 0
- 3
BO/Utils/AfterLoginUtil.cs View File

@ -29,9 +29,6 @@ namespace BO.Utils
new Tuple<string,string>("定级员",@"C:\B3\src\B3ButcherManageClient\CarcassStateWeight\bin\Debug\CarcassStateWeight")
};
//static List<Tuple<string, string>> roleToAssemblies = new List<Tuple<string, string>>(){new Tuple<string,string>("排宰员",@"ButcherOrder"),
//new Tuple<string,string>("过磅员",@"ButcherWeight"),
// new Tuple<string,string>("验质员",@"QualityAndOrder"),new Tuple<string,string>("定级员",@"WeighAndGrading"),new Tuple<string,string>("窒晕员",@"OrderConfirm")};
public static Form CreateForm(string role)


+ 121
- 25
BO/Utils/BillRpc/GradeAndWeightRpc.cs View File

@ -1,5 +1,8 @@
using BO.BO.BaseInfo;
using BO.BO.Bill;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using Forks.JsonRpc.Client;
using System;
using System.Collections.Generic;
@ -7,6 +10,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using TSingSoft.WebPluginFramework;
namespace BO.Utils.BillRpc
{
@ -14,33 +18,13 @@ namespace BO.Utils.BillRpc
{
static JavaScriptSerializer serializer = new JavaScriptSerializer();
public static List<GradeAndWeight> GetGradeAndWeightList(DateTime date, long? maxID = null)
public static List<GradeAndWeight> GetGradeAndWeightList(DateTime date, bool isTang)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/GetGradeAndWeightList";
var result = RpcFacade.Call<string>(method, date, maxID);
var result = RpcFacade.Call<string>(method, date, isTang);
return serializer.Deserialize<List<GradeAndWeight>>(result);
}
public static List<GradeAndWeight_Detail> GetDetails(DateTime date, int top = 15)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/GetDetailsList";
var result = RpcFacade.Call<string>(method, date, top);
result = result.ESerializeDateTime();
return serializer.Deserialize<List<GradeAndWeight_Detail>>(result);
}
public static void UpdateOrInsertDetail(GradeAndWeight_Detail detail, bool fillTechnics = false)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/UpdateOrInsertDetail";
detail.ID = RpcFacade.Call<long>(method, serializer.Serialize(detail), fillTechnics);
}
public static void UpdateLivestock(long id, long liveStockID, string liveStockName, short technics, string technicsName)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/UpdateLivestock";
RpcFacade.Call<int>(method, id, liveStockID, liveStockName, technics, technicsName);
}
public static void SetGradeFinish(long orderDetailID, short technics)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/SetGradeFinish";
@ -59,11 +43,123 @@ namespace BO.Utils.BillRpc
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/SaveBodyDiscontItemSetting";
RpcFacade.Call<int>(method, serializer.Serialize(list));
}
}
public static class LocalGradeAndWeightBL
{
static JavaScriptSerializer serializer = new JavaScriptSerializer();
class DmoSession
{
public static IDmoSessionWithTransaction New()
{
return Dmo.NewSession(ButcherAppContext.Context.UrlConfig.OfflineSqlConnection);
}
}
public static bool ConnectionTest()
{
using (var session = DmoSession.New())
{
try
{
var q = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
q.Columns.Add(DQSelectColumn.Create(DQExpression.Value(1), "c"));
q.Range = SelectRange.Top(1);
session.ExecuteScalar(q);
return true;
}
catch
{ return false; }
}
}
public static List<GradeAndWeight_Detail> GetDetails(DateTime date, int top = 15)
{
var query = new DmoQuery(typeof(GradeAndWeight_Detail));
query.Where.Conditions.Add(DQCondition.EQ("Date", date));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("Index", true));
query.Range = SelectRange.Top(top);
using (var session = DmoSession.New())
{
return session.ExecuteList(query).Cast<GradeAndWeight_Detail>().ToList();
}
}
public static void Insert(GradeAndWeight_Detail detail)
{
using (var session = DmoSession.New())
{
if (detail.SID != 0)
throw new Exception("Insert时要保证SID不为0");
session.Insert(detail);
session.Commit();
}
}
public static void Update(GradeAndWeight_Detail detail, params string[] properties)
{
var type = typeof(GradeAndWeight_Detail);
using (var session = DmoSession.New())
{
if (detail.SID == 0)
throw new Exception("Update时要保证SID不能为0");
if (properties.Contains("ID"))
throw new Exception("ID不能通过该方法维护");
if (properties.Length == 0)
throw new Exception("Update时要给出属性数组");
var update = new DQUpdateDom(type);
update.Where.Conditions.Add(DQCondition.EQ("SID", detail.SID));
foreach (var p in properties)
{
if (p == "Sync" && detail.Sync)
detail.Sync = false;
update.Columns.Add(new DQUpdateColumn(p, type.GetProperty(p).GetValue(detail)));
}
session.ExecuteNonQuery(update);
session.Commit();
}
}
public static void Sync()
{
var syncs = GetAllNeedSyncDetails();
foreach (var detail in syncs)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/UpdateOrInsertDetail";
var id = RpcFacade.Call<long>(method, serializer.Serialize(detail));
SetDetailSynced(detail, id);
}
}
static IEnumerable<GradeAndWeight_Detail> GetAllNeedSyncDetails()
{
using (var session = DmoSession.New())
{
var query = new DmoQuery(typeof(GradeAndWeight_Detail));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("SID"));
query.Range = SelectRange.Top(50);
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Sync", false), DQCondition.IsNotNull(DQExpression.Field("Technics"))));
return session.ExecuteList(query).Cast<GradeAndWeight_Detail>();
}
}
public static void UpdateWeight(long id, decimal? weight)
static void SetDetailSynced(GradeAndWeight_Detail detail, long id)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/UpdateWeight";
RpcFacade.Call<int>(method, id, weight);
using (var session = DmoSession.New())
{
var update = new DQUpdateDom(typeof(GradeAndWeight_Detail));
update.Columns.Add(new DQUpdateColumn("Sync", true));
if (detail.ID == 0)
{
detail.ID = id;
update.Columns.Add(new DQUpdateColumn("ID", id));
}
update.Where.Conditions.Add(DQCondition.EQ("SID", detail.SID));
session.ExecuteNonQuery(update);
session.Commit();
}
}
}
}

+ 0
- 28
BO/Utils/BillRpc/OrderConfirmRpc.cs View File

@ -1,28 +0,0 @@
using BO.BO.Bill;
using Forks.JsonRpc.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
namespace BO.Utils.BillRpc
{
public static class OrderConfirmRpc
{
static JavaScriptSerializer serializer = new JavaScriptSerializer();
public static List<ConfirmOrder> GetConfirmOrder(DateTime date)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderConfirmRpc/GetConfirmOrder";
var json = RpcFacade.Call<string>(method, date);
return serializer.Deserialize<List<ConfirmOrder>>(json);
}
public static void SetOrderConfirmed(long id)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderConfirmRpc/SetOrderConfirmed";
RpcFacade.Call<int>(method, id);
}
}
}

+ 54
- 12
BO/Utils/BillRpc/OrderDetailRpc.cs View File

@ -39,10 +39,10 @@ namespace BO.Utils.BillRpc
return RpcFacade.Call<int>(method, id);
}
public static List<OrderDetail> GetOrderDetail(DateTime date,bool onlyNormal)
public static List<OrderDetail> GetOrderDetail(DateTime date)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetOrderDetail";
var result = RpcFacade.Call<string>(method, date, onlyNormal);
var result = RpcFacade.Call<string>(method, date);
result = result.ESerializeDateTime();
return serializer.Deserialize<List<OrderDetail>>(result);
}
@ -73,37 +73,79 @@ namespace BO.Utils.BillRpc
RpcFacade.Call<int>(method, weightBillID, show);
}
public static List<HurryRecord> GetHurryRecordList(long orderID)
public static List<HurryRecord> GetHurryRecordList(long weightBillID)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetHurryRecords";
var result = RpcFacade.Call<string>(method, orderID);
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetHurryRecordList";
var result = RpcFacade.Call<string>(method, weightBillID);
result = result.ESerializeDateTime();
return serializer.Deserialize<List<HurryRecord>>(result);
}
public static void DeleteHurryRecord(long id)
public static bool DeleteHurryRecord(long id)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/DeleteHurryRecord";
RpcFacade.Call<int>(method, id);
return RpcFacade.Call<long?>(method, id) == -1;
}
public static HurryRecord InsertHurryRecord(OrderDetail entity)
public static HurryRecord InsertHurryRecord(SelectHurryList entity, out bool withError)
{
var detail = new HurryRecord();
detail.HurryNumber = entity.HurryNumber;
detail.Time = DateTime.Now;
detail.FromOrderDetail_ID = entity.ID;
detail.WeightBill_ID = entity.WeightBill_ID;
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/InsertHurryRecord";
detail.ID= RpcFacade.Call<long>(method, serializer.Serialize(detail));
var r = RpcFacade.Call<string>(method, serializer.Serialize(detail)).Split(new char[] { '|' });
withError = r[0] == "-1";
detail.ID = long.Parse(r[1]);
detail.Supplier_Name = entity.Supplier_Name;
detail.B3WeighBill_ID = entity.B3WeighBill_ID;
detail.LiveColonyHouse_Name = entity.LiveColonyHouse_Name;
return detail;
}
public static int GetHurryRecordNumber(long fromOrderID)
public static int GetHurryRecordNumber(long weightBillId)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetHurryRecordNumber";
return RpcFacade.Call<int>(method, fromOrderID);
return RpcFacade.Call<int>(method, weightBillId);
}
public static List<SelectHurryList> GetSelectHurryList(DateTime butcherDate)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetSelectHurryList";
return serializer.Deserialize<List<SelectHurryList>>(RpcFacade.Call<string>(method, butcherDate));
}
public static void SetOrderState(long id, int state)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/SetOrderState";
RpcFacade.Call<int>(method, id, state);
}
public static HurryRecord GetHurryRecord(long id)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetHurryRecord";
var result = RpcFacade.Call<string>(method, id);
return serializer.Deserialize<HurryRecord>(result);
}
public static void InsertByHurryRecord(OrderDetail orderDetail, long hurryOrderID)
{
orderDetail.AccountingUnit_ID = ButcherAppContext.Context.UserConfig.AccountingUnit_ID;
orderDetail.Creator = ButcherAppContext.Context.UserConfig.UserName;
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/InsertByHurryRecord";
orderDetail.ID = RpcFacade.Call<long>(method, serializer.Serialize(orderDetail), hurryOrderID);
}
public static int GetCurrentOrderPlanNumber(long orderID)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetCurrentOrderPlanNumber";
return RpcFacade.Call<int>(method, orderID);
}
public static int GetFinishNumbers(DateTime date)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/OrderDetailRpc/GetFinishNumbers";
return RpcFacade.Call<int>(method, date);
}
}
}

+ 8
- 2
BO/Utils/BillRpc/WeightBillRpc.cs View File

@ -92,11 +92,11 @@ namespace BO.Utils.BillRpc
return serializer.Deserialize<List<CTuple<long, long>>>(json);
}
public static List<CTuple<long, long?, decimal?>> SyncBillB3IdsAndSanctionMoney()
public static List<CTuple<long, long?, decimal?, string>> SyncBillB3IdsAndSanctionMoney()
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/SyncBillB3IdsAndSanctionMoney";
var json = RpcFacade.Call<string>(method, DateTime.Today);
return serializer.Deserialize<List<CTuple<long, long?, decimal?>>>(json);
return serializer.Deserialize<List<CTuple<long, long?, decimal?, string>>>(json);
}
public static PrintWeightBill GetPrintWeightBill(long id)
@ -106,5 +106,11 @@ namespace BO.Utils.BillRpc
obj = obj.ESerializeDateTime();
return serializer.Deserialize<PrintWeightBill>(obj);
}
public static void DoCheck(long id)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/WeightBillRpc/DoCheck";
RpcFacade.Call<int>(method, id, ButcherAppContext.Context.UserConfig.UserName);
}
}
}

+ 1
- 1
BO/Utils/ButcherAppContext.cs View File

@ -24,7 +24,7 @@ namespace BO.Utils
set;
}
private ButcherAppContext()
public ButcherAppContext()
{
UrlConfig = new ServerUrlConfig();
UserConfig = new LoginUserInfo();


+ 79
- 0
BO/Utils/LoginRpcUtil.cs View File

@ -3,6 +3,8 @@ using Forks.JsonRpc.Client.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.NetworkInformation;
using System.Text;
using System.Threading.Tasks;
@ -43,5 +45,82 @@ namespace BO.Utils
userInfo.Role = obj.Get<string>("Role");
}
}
public static bool TestConnection()
{
var url = ButcherAppContext.Context.UrlConfig.ServerUrl;
if (string.IsNullOrEmpty(url))
return false;
//try
//{
//HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
var uri = new Uri(url);
return TestConnection(uri.Host, uri.Port, 50);
// HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
// return resp.StatusCode == HttpStatusCode.OK;
//}
//catch
//{
// return false;
//}
}
//public static bool TestConnection()
//{
// try
// {
// Dns.GetHostEntry(ButcherAppContext.Context.UrlConfig.ServerUrl); //using System.Net;
// return true;
// }
// catch (System.Net.Sockets.SocketException ex)
// {
// return false;
// }
// //try
// //{
// // Ping objPingSender = new Ping();
// // PingOptions objPinOptions = new PingOptions();
// // objPinOptions.DontFragment = true;
// // string data = "";
// // byte[] buffer = Encoding.UTF8.GetBytes(data);
// // int intTimeout = 120;
// // PingReply objPinReply = objPingSender.Send(ButcherAppContext.Context.UrlConfig.ServerUrl, intTimeout, buffer, objPinOptions);
// // string strInfo = objPinReply.Status.ToString();
// // if (strInfo == "Success")
// // {
// // return true;
// // }
// // else
// // {
// // return false;
// // }
// //}
// //catch (Exception)
// //{
// // return false;
// //}
//}
public static bool TestConnection(string host, int port, int millisecondsTimeout)
{
var client = new System.Net.Sockets.TcpClient();
try
{
var ar = client.BeginConnect(host, port, null, null);
ar.AsyncWaitHandle.WaitOne(millisecondsTimeout);
return client.Connected;
}
catch (Exception)
{
return false;
}
finally
{
client.Close();
}
}
}
}

+ 7
- 0
BO/Utils/LoginUserInfo.cs View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace BO.Utils
{
@ -27,5 +28,11 @@ namespace BO.Utils
public string Employee_Name { get; set; }
public string Role { get; set; }
[XmlIgnore]
public bool Connection { get; set; }
[XmlIgnore]
public string PWD { get; set; }
}
}

+ 2
- 0
BO/Utils/ServerUrlConfig.cs View File

@ -9,5 +9,7 @@ namespace BO.Utils
public class ServerUrlConfig
{
public string ServerUrl { get; set; }
public string OfflineSqlConnection { get; set; }
}
}

+ 3
- 1
BO/Utils/XmlUtil.cs View File

@ -16,6 +16,7 @@ namespace BO.Utils
{
fileName = obj.GetType().Name + ".xml";
}
var ser = new XmlSerializer(obj.GetType());
using (var stream = File.Open(fileName, FileMode.Create))
{
@ -24,6 +25,7 @@ namespace BO.Utils
}
public static T DeserializeFromFile<T>(string fileName = "")
where T : new()
{
if (string.IsNullOrWhiteSpace(fileName))
{
@ -31,7 +33,7 @@ namespace BO.Utils
}
if (!File.Exists(fileName))
{
throw new FileNotFoundException("不存在文件:" + fileName);
return new T();
}
using (var reader = new StreamReader(fileName))
{


+ 5
- 1
BWP.WinFormControl/BWP.WinFormControl.csproj View File

@ -32,7 +32,7 @@
<ItemGroup>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath>
<HintPath>..\..\..\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
@ -120,6 +120,10 @@
<DependentUpon>WeightControl.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Images\stop.png" />
<EmbeddedResource Include="Images\working.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.


BIN
BWP.WinFormControl/Images/stop.png View File

Before After
Width: 30  |  Height: 30  |  Size: 380 B

BIN
BWP.WinFormControl/Images/working.png View File

Before After
Width: 30  |  Height: 30  |  Size: 516 B

+ 0
- 8
ButcherManageClient/ButcherManageClient.csproj View File

@ -35,18 +35,10 @@
<ApplicationIcon>pig [128x128].ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath>
</Reference>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath>
</Reference>
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />


+ 22
- 4
ButcherManageClient/Login.cs View File

@ -8,6 +8,7 @@ using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -48,10 +49,22 @@ namespace ButcherManageClient
if (string.IsNullOrEmpty(username))
throw new Exception("请输入用户名");
IniteRpcFacade();
await Task.Factory.StartNew(() => RpcFacade.Login(username, pwd));
LoginRpcUtil.FillUserEmpInfo(username, ButcherAppContext.Context.UserConfig);
ButcherAppContext.Context.Save();
ButcherAppContext.Context.UserConfig.PWD = pwd;
if (LoginRpcUtil.TestConnection())
{
await Task.Factory.StartNew(() => RpcFacade.Login(username, pwd));
LoginRpcUtil.FillUserEmpInfo(username, ButcherAppContext.Context.UserConfig);
ButcherAppContext.Context.Save();
ButcherAppContext.Context.UserConfig.Connection = true;
}
else
{
if (ButcherAppContext.Context.UserConfig.Role != "定级员")
throw new Exception("无法连接到服务器");
if (username != ButcherAppContext.Context.UserConfig.UserName)
throw new Exception("离线状态请保持与上次用户名一致");
ButcherAppContext.Context.UserConfig.Connection = false;
}
var form = AfterLoginUtil.CreateForm(ButcherAppContext.Context.UserConfig.Role);
if (form == null)
throw new Exception("权限不符");
@ -111,6 +124,11 @@ namespace ButcherManageClient
if (string.IsNullOrEmpty(versionInfo.ServerUrl))
versionInfo.ServerUrl = serUri;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(versionInfo.ServerUrl);
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
if (resp.StatusCode != HttpStatusCode.OK)
return;
var down = new System.Net.WebClient();
var serverVersion = XmlUtil.XmlDeserializeObject<ClientVersion>(down.DownloadString(versionInfo.ServerUrl));
if (versionInfo.Version == serverVersion.Version)


+ 29
- 4
ButcherManageClient/SettingForm.Designer.cs View File

@ -32,12 +32,14 @@
this.saveBtn = new System.Windows.Forms.Button();
this.uTextBoxWithPad1 = new BWP.WinFormControl.UTextBoxWithPad();
this.label1 = new System.Windows.Forms.Label();
this.offlineSqlConInput = new BWP.WinFormControl.UTextBoxWithPad();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// cancelBtn
//
this.cancelBtn.Font = new System.Drawing.Font("宋体", 20F);
this.cancelBtn.Location = new System.Drawing.Point(241, 110);
this.cancelBtn.Location = new System.Drawing.Point(238, 164);
this.cancelBtn.Name = "cancelBtn";
this.cancelBtn.Size = new System.Drawing.Size(81, 53);
this.cancelBtn.TabIndex = 7;
@ -48,7 +50,7 @@
// saveBtn
//
this.saveBtn.Font = new System.Drawing.Font("宋体", 20F);
this.saveBtn.Location = new System.Drawing.Point(100, 110);
this.saveBtn.Location = new System.Drawing.Point(97, 164);
this.saveBtn.Name = "saveBtn";
this.saveBtn.Size = new System.Drawing.Size(81, 53);
this.saveBtn.TabIndex = 6;
@ -75,17 +77,38 @@
this.label1.TabIndex = 4;
this.label1.Text = "服务器地址:";
//
// offlineSqlConInput
//
this.offlineSqlConInput.Font = new System.Drawing.Font("宋体", 15F);
this.offlineSqlConInput.Location = new System.Drawing.Point(140, 106);
this.offlineSqlConInput.Name = "offlineSqlConInput";
this.offlineSqlConInput.Size = new System.Drawing.Size(246, 30);
this.offlineSqlConInput.TabIndex = 9;
this.offlineSqlConInput.Type = BWP.WinFormControl.UTextBoxWithPad.TextBoxType.Normal;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 15F);
this.label2.Location = new System.Drawing.Point(18, 109);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(129, 20);
this.label2.TabIndex = 8;
this.label2.Text = "离线数据库:";
//
// SettingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(404, 205);
this.ClientSize = new System.Drawing.Size(404, 242);
this.ControlBox = false;
this.Controls.Add(this.offlineSqlConInput);
this.Controls.Add(this.label2);
this.Controls.Add(this.cancelBtn);
this.Controls.Add(this.saveBtn);
this.Controls.Add(this.uTextBoxWithPad1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "SettingForm";
this.Text = "服务器配置";
this.ResumeLayout(false);
@ -99,5 +122,7 @@
private System.Windows.Forms.Button saveBtn;
private BWP.WinFormControl.UTextBoxWithPad uTextBoxWithPad1;
private System.Windows.Forms.Label label1;
private BWP.WinFormControl.UTextBoxWithPad offlineSqlConInput;
private System.Windows.Forms.Label label2;
}
}

+ 4
- 0
ButcherManageClient/SettingForm.cs View File

@ -19,6 +19,9 @@ namespace ButcherManageClient
{
InitializeComponent();
uTextBoxWithPad1.Text = ButcherAppContext.Context.UrlConfig.ServerUrl;
offlineSqlConInput.Text = ButcherAppContext.Context.UrlConfig.OfflineSqlConnection;
if (string.IsNullOrEmpty(offlineSqlConInput.Text))
offlineSqlConInput.Text = "Server=localhost;Database=LocalClientService;Integrated Security=true;Language=Simplified Chinese;";
mInited = rpcFacadeInited;
}
@ -33,6 +36,7 @@ namespace ButcherManageClient
if (string.IsNullOrEmpty(uri))
throw new Exception("请先设置服务器地址");
ButcherAppContext.Context.UrlConfig.ServerUrl = uri;
ButcherAppContext.Context.UrlConfig.OfflineSqlConnection = offlineSqlConInput.Text.Trim();
ButcherAppContext.Context.Save();
if (mInited)


+ 0
- 3
ButcherOrder/ButcherOrderForm.cs View File

@ -121,10 +121,7 @@ namespace ButcherOrder
{
last = secondOrderGridView.CurrentRow.DataBoundItem as SecondOrder;
if (last.Finish)
{
last = null;
secondOrderGridView.CurrentRow.DefaultCellStyle.BackColor = Color.YellowGreen;
}
}
foreach (DataGridViewRow row in secondOrderGridView.Rows)
{


+ 0
- 12
ButcherWeight/ButcherWeight.csproj View File

@ -34,18 +34,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\BwpClientPrint.dll</HintPath>
</Reference>
<Reference Include="Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.EnterpriseServices.dll</HintPath>
</Reference>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.JsonRpc.Client.dll</HintPath>
</Reference>
<Reference Include="Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\BwpB3Project\tsref\Debug\Forks.Utils.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />


+ 0
- 5
ButcherWeight/WeightContext.cs View File

@ -11,12 +11,7 @@ namespace ButcherWeight
{
public static class WeightContext
{
//#if debug
// private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\WeightSetting.xml";
//#endif
//#if !debug
private static string loginConfigPath = Application.StartupPath + "\\WeightSetting.xml";
//#endif
private static WeightSetting _config;
public static WeightSetting Config
{


+ 121
- 110
ButcherWeight/WeightForm.Designer.cs View File

@ -135,18 +135,6 @@
this.S_AbnormalItem_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.S_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.billGrid = new System.Windows.Forms.DataGridView();
this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_PurchaseType_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_SanctionMoney = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
@ -161,6 +149,19 @@
this.farmerMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.farmerDelete = new System.Windows.Forms.ToolStripMenuItem();
this.viewDetailBtn = new System.Windows.Forms.Button();
this.M_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_FinishWeight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_PrintNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_B3ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Car_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Employee_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_PurchaseType_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_HouseNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_SanctionMoney = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
@ -1168,6 +1169,7 @@
this.billGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_ID,
this.M_FinishWeight,
this.M_PrintNumber,
this.M_B3ID,
this.M_Car_Name,
this.M_Supplier_Name,
@ -1192,104 +1194,6 @@
this.billGrid.TabIndex = 0;
this.billGrid.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.billGrid_CellDoubleClick);
//
// M_ID
//
this.M_ID.DataPropertyName = "ID";
this.M_ID.HeaderText = "ID";
this.M_ID.Name = "M_ID";
this.M_ID.ReadOnly = true;
this.M_ID.Visible = false;
//
// M_FinishWeight
//
this.M_FinishWeight.DataPropertyName = "FinishWeight";
this.M_FinishWeight.HeaderText = "FinishWeight";
this.M_FinishWeight.Name = "M_FinishWeight";
this.M_FinishWeight.ReadOnly = true;
this.M_FinishWeight.Visible = false;
//
// M_B3ID
//
this.M_B3ID.DataPropertyName = "B3ID";
this.M_B3ID.HeaderText = "过磅单号";
this.M_B3ID.Name = "M_B3ID";
this.M_B3ID.ReadOnly = true;
//
// M_Car_Name
//
this.M_Car_Name.DataPropertyName = "Car_Name";
this.M_Car_Name.HeaderText = "车辆";
this.M_Car_Name.Name = "M_Car_Name";
this.M_Car_Name.ReadOnly = true;
this.M_Car_Name.Width = 120;
//
// M_Supplier_Name
//
this.M_Supplier_Name.DataPropertyName = "Supplier_Name";
this.M_Supplier_Name.HeaderText = "供应商";
this.M_Supplier_Name.Name = "M_Supplier_Name";
this.M_Supplier_Name.ReadOnly = true;
this.M_Supplier_Name.Width = 120;
//
// M_Employee_Name
//
this.M_Employee_Name.DataPropertyName = "Employee_Name";
this.M_Employee_Name.HeaderText = "业务员";
this.M_Employee_Name.Name = "M_Employee_Name";
this.M_Employee_Name.ReadOnly = true;
this.M_Employee_Name.Width = 110;
//
// M_PurchaseType_Name
//
this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name";
this.M_PurchaseType_Name.HeaderText = "收购类型";
this.M_PurchaseType_Name.Name = "M_PurchaseType_Name";
this.M_PurchaseType_Name.ReadOnly = true;
this.M_PurchaseType_Name.Width = 110;
//
// M_Number
//
this.M_Number.DataPropertyName = "Number";
this.M_Number.HeaderText = "收购头数";
this.M_Number.Name = "M_Number";
this.M_Number.ReadOnly = true;
this.M_Number.Width = 110;
//
// M_Weight
//
this.M_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle19.Format = "#0.######";
this.M_Weight.DefaultCellStyle = dataGridViewCellStyle19;
this.M_Weight.HeaderText = "收购重量";
this.M_Weight.Name = "M_Weight";
this.M_Weight.ReadOnly = true;
this.M_Weight.Width = 120;
//
// M_HouseNames
//
this.M_HouseNames.DataPropertyName = "HouseNames";
this.M_HouseNames.HeaderText = "圈舍";
this.M_HouseNames.Name = "M_HouseNames";
this.M_HouseNames.ReadOnly = true;
this.M_HouseNames.Width = 180;
//
// M_SanctionMoney
//
this.M_SanctionMoney.DataPropertyName = "SanctionMoney";
dataGridViewCellStyle20.Format = "#0.######";
this.M_SanctionMoney.DefaultCellStyle = dataGridViewCellStyle20;
this.M_SanctionMoney.HeaderText = "异常明细";
this.M_SanctionMoney.Name = "M_SanctionMoney";
this.M_SanctionMoney.ReadOnly = true;
//
// M_Remark
//
this.M_Remark.DataPropertyName = "Remark";
this.M_Remark.HeaderText = "摘要";
this.M_Remark.Name = "M_Remark";
this.M_Remark.ReadOnly = true;
this.M_Remark.Width = 130;
//
// label15
//
this.label15.AutoSize = true;
@ -1425,6 +1329,112 @@
this.viewDetailBtn.UseVisualStyleBackColor = true;
this.viewDetailBtn.Click += new System.EventHandler(this.viewDetailBtn_Click);
//
// M_ID
//
this.M_ID.DataPropertyName = "ID";
this.M_ID.HeaderText = "ID";
this.M_ID.Name = "M_ID";
this.M_ID.ReadOnly = true;
this.M_ID.Visible = false;
//
// M_FinishWeight
//
this.M_FinishWeight.DataPropertyName = "FinishWeight";
this.M_FinishWeight.HeaderText = "FinishWeight";
this.M_FinishWeight.Name = "M_FinishWeight";
this.M_FinishWeight.ReadOnly = true;
this.M_FinishWeight.Visible = false;
//
// M_PrintNumber
//
this.M_PrintNumber.DataPropertyName = "PrintNumber";
this.M_PrintNumber.HeaderText = "PrintNumber";
this.M_PrintNumber.Name = "M_PrintNumber";
this.M_PrintNumber.ReadOnly = true;
this.M_PrintNumber.Visible = false;
//
// M_B3ID
//
this.M_B3ID.DataPropertyName = "B3ID";
this.M_B3ID.HeaderText = "过磅单号";
this.M_B3ID.Name = "M_B3ID";
this.M_B3ID.ReadOnly = true;
//
// M_Car_Name
//
this.M_Car_Name.DataPropertyName = "Car_Name";
this.M_Car_Name.HeaderText = "车辆";
this.M_Car_Name.Name = "M_Car_Name";
this.M_Car_Name.ReadOnly = true;
this.M_Car_Name.Width = 120;
//
// M_Supplier_Name
//
this.M_Supplier_Name.DataPropertyName = "Supplier_Name";
this.M_Supplier_Name.HeaderText = "供应商";
this.M_Supplier_Name.Name = "M_Supplier_Name";
this.M_Supplier_Name.ReadOnly = true;
this.M_Supplier_Name.Width = 120;
//
// M_Employee_Name
//
this.M_Employee_Name.DataPropertyName = "Employee_Name";
this.M_Employee_Name.HeaderText = "业务员";
this.M_Employee_Name.Name = "M_Employee_Name";
this.M_Employee_Name.ReadOnly = true;
this.M_Employee_Name.Width = 110;
//
// M_PurchaseType_Name
//
this.M_PurchaseType_Name.DataPropertyName = "PurchaseType_Name";
this.M_PurchaseType_Name.HeaderText = "收购类型";
this.M_PurchaseType_Name.Name = "M_PurchaseType_Name";
this.M_PurchaseType_Name.ReadOnly = true;
this.M_PurchaseType_Name.Width = 110;
//
// M_Number
//
this.M_Number.DataPropertyName = "Number";
this.M_Number.HeaderText = "收购头数";
this.M_Number.Name = "M_Number";
this.M_Number.ReadOnly = true;
this.M_Number.Width = 110;
//
// M_Weight
//
this.M_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle19.Format = "#0.######";
this.M_Weight.DefaultCellStyle = dataGridViewCellStyle19;
this.M_Weight.HeaderText = "收购重量";
this.M_Weight.Name = "M_Weight";
this.M_Weight.ReadOnly = true;
this.M_Weight.Width = 120;
//
// M_HouseNames
//
this.M_HouseNames.DataPropertyName = "HouseNames";
this.M_HouseNames.HeaderText = "圈舍";
this.M_HouseNames.Name = "M_HouseNames";
this.M_HouseNames.ReadOnly = true;
this.M_HouseNames.Width = 180;
//
// M_SanctionMoney
//
this.M_SanctionMoney.DataPropertyName = "SanctionMoney";
dataGridViewCellStyle20.Format = "#0.######";
this.M_SanctionMoney.DefaultCellStyle = dataGridViewCellStyle20;
this.M_SanctionMoney.HeaderText = "异常明细";
this.M_SanctionMoney.Name = "M_SanctionMoney";
this.M_SanctionMoney.ReadOnly = true;
//
// M_Remark
//
this.M_Remark.DataPropertyName = "Remark";
this.M_Remark.HeaderText = "摘要";
this.M_Remark.Name = "M_Remark";
this.M_Remark.ReadOnly = true;
this.M_Remark.Width = 130;
//
// WeightForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -1574,6 +1584,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn F_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn M_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_FinishWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn M_PrintNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn M_B3ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Car_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Supplier_Name;


+ 20
- 0
ButcherWeight/WeightForm.cs View File

@ -94,6 +94,7 @@ namespace ButcherWeight
{
first.B3ID = item.Item2;
first.SanctionMoney = item.Item3;
first.HouseNames = item.Item4;
if (!changed)
changed = true;
}
@ -115,6 +116,8 @@ namespace ButcherWeight
{
if ((bool)row.Cells["M_FinishWeight"].Value)
row.DefaultCellStyle.BackColor = Color.YellowGreen;
if ((int)row.Cells["M_PrintNumber"].Value > 0)
row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#CC9999");
}
billGrid.Refresh();
}
@ -527,8 +530,25 @@ namespace ButcherWeight
if (Dmo.ID == 0)
throw new Exception("请先保存");
var entity = WeightBillRpc.GetPrintWeightBill(Dmo.ID);
if (string.IsNullOrEmpty(entity.Supplier_Name))
throw new Exception("缺少供应商信息,打印失败");
ClientPrint.BwpClientPrint print = new ClientPrint.BwpClientPrint("WeightBillPrint.xaml", entity, new DocumentRenderer());
print.PrintDirect();
WeightBillRpc.DoCheck(Dmo.ID);
var first = dmoList.FirstOrDefault(x => x.ID == Dmo.ID);
if (first != null)
{
first.PrintNumber += 1;
foreach (DataGridViewRow row in billGrid.Rows)
{
if ((long)row.Cells["M_ID"].Value == Dmo.ID)
{
row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#CC9999");
break;
}
}
billGrid.Refresh();
}
}
}
}

+ 3
- 0
ButcherWeight/WeightForm.resx View File

@ -204,6 +204,9 @@
<metadata name="M_FinishWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_PrintNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_B3ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>


+ 0
- 1
OrderConfirm/OrderConfirm.csproj View File

@ -30,7 +30,6 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />


+ 223
- 111
OrderConfirm/OrderConfirmForm.Designer.cs View File

@ -30,9 +30,23 @@
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.uDataGridView1 = new BWP.WinFormControl.UDataGridView();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.orderGrid = new BWP.WinFormControl.UDataGridView();
this.C_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_IsHurryButcher = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_SecondarySplit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_OrderState = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_Date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_B3WeighBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_OK = new System.Windows.Forms.DataGridViewButtonColumn();
this.C_Finish = new System.Windows.Forms.DataGridViewButtonColumn();
this.existBtn = new System.Windows.Forms.Button();
this.orderLabel = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
@ -40,25 +54,21 @@
this.uDatePicker1 = new BWP.WinFormControl.UDatePicker();
this.label1 = new System.Windows.Forms.Label();
this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
this.C_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_Confirmed = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_B3WeighBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.C_OK = new System.Windows.Forms.DataGridViewButtonColumn();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit();
this.setTop = new System.Windows.Forms.CheckBox();
this.finishNumberLabel = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.orderGrid)).BeginInit();
this.SuspendLayout();
//
// uDataGridView1
// orderGrid
//
this.uDataGridView1.AllowUserToAddRows = false;
this.uDataGridView1.AllowUserToDeleteRows = false;
this.uDataGridView1.AllowUserToResizeColumns = false;
this.uDataGridView1.AllowUserToResizeRows = false;
this.orderGrid.AllowUserToAddRows = false;
this.orderGrid.AllowUserToDeleteRows = false;
this.orderGrid.AllowUserToResizeColumns = false;
this.orderGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.uDataGridView1.BackgroundColor = System.Drawing.Color.White;
this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.orderGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
@ -66,38 +76,152 @@
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.orderGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.orderGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.C_ID,
this.C_Confirmed,
this.C_IsHurryButcher,
this.C_WeightBill_ID,
this.C_SecondarySplit,
this.C_OrderState,
this.C_Date,
this.C_Order,
this.C_B3WeighBill_ID,
this.C_Supplier_Name,
this.C_LiveColonyHouse_Name,
this.C_Number,
this.C_OK});
this.uDataGridView1.Location = new System.Drawing.Point(35, 73);
this.uDataGridView1.MultiSelect = false;
this.uDataGridView1.Name = "uDataGridView1";
this.uDataGridView1.ReadOnly = true;
this.uDataGridView1.RowHeadersVisible = false;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Black;
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.uDataGridView1.RowTemplate.Height = 60;
this.uDataGridView1.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView1.Size = new System.Drawing.Size(753, 525);
this.uDataGridView1.TabIndex = 0;
this.uDataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.uDataGridView1_CellClick);
this.uDataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.uDataGridView1_CellContentClick);
this.C_PlanNumber,
this.C_OK,
this.C_Finish});
this.orderGrid.Location = new System.Drawing.Point(35, 73);
this.orderGrid.MultiSelect = false;
this.orderGrid.Name = "orderGrid";
this.orderGrid.ReadOnly = true;
this.orderGrid.RowHeadersVisible = false;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.Black;
this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle5;
this.orderGrid.RowTemplate.Height = 60;
this.orderGrid.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.orderGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.orderGrid.Size = new System.Drawing.Size(1006, 698);
this.orderGrid.TabIndex = 0;
this.orderGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellClick);
this.orderGrid.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.orderGrid_CellContentClick);
//
// C_ID
//
this.C_ID.DataPropertyName = "ID";
this.C_ID.HeaderText = "ID";
this.C_ID.Name = "C_ID";
this.C_ID.ReadOnly = true;
this.C_ID.Visible = false;
//
// C_IsHurryButcher
//
this.C_IsHurryButcher.DataPropertyName = "IsHurryButcher";
this.C_IsHurryButcher.HeaderText = "IsHurryButcher";
this.C_IsHurryButcher.Name = "C_IsHurryButcher";
this.C_IsHurryButcher.ReadOnly = true;
this.C_IsHurryButcher.Visible = false;
//
// C_WeightBill_ID
//
this.C_WeightBill_ID.DataPropertyName = "WeightBill_ID";
this.C_WeightBill_ID.HeaderText = "WeightBill_ID";
this.C_WeightBill_ID.Name = "C_WeightBill_ID";
this.C_WeightBill_ID.ReadOnly = true;
this.C_WeightBill_ID.Visible = false;
//
// C_SecondarySplit
//
this.C_SecondarySplit.DataPropertyName = "SecondarySplit";
this.C_SecondarySplit.HeaderText = "SecondarySplit";
this.C_SecondarySplit.Name = "C_SecondarySplit";
this.C_SecondarySplit.ReadOnly = true;
this.C_SecondarySplit.Visible = false;
//
// C_OrderState
//
this.C_OrderState.DataPropertyName = "OrderState";
this.C_OrderState.HeaderText = "OrderState";
this.C_OrderState.Name = "C_OrderState";
this.C_OrderState.ReadOnly = true;
this.C_OrderState.Visible = false;
//
// C_Date
//
this.C_Date.DataPropertyName = "Date";
this.C_Date.HeaderText = "Date";
this.C_Date.Name = "C_Date";
this.C_Date.ReadOnly = true;
this.C_Date.Visible = false;
//
// C_Order
//
this.C_Order.DataPropertyName = "Order";
this.C_Order.HeaderText = "序号";
this.C_Order.Name = "C_Order";
this.C_Order.ReadOnly = true;
//
// C_B3WeighBill_ID
//
this.C_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID";
this.C_B3WeighBill_ID.HeaderText = "磅单号";
this.C_B3WeighBill_ID.Name = "C_B3WeighBill_ID";
this.C_B3WeighBill_ID.ReadOnly = true;
//
// C_Supplier_Name
//
this.C_Supplier_Name.DataPropertyName = "Supplier_Name";
this.C_Supplier_Name.HeaderText = "供应商";
this.C_Supplier_Name.Name = "C_Supplier_Name";
this.C_Supplier_Name.ReadOnly = true;
this.C_Supplier_Name.Width = 150;
//
// C_LiveColonyHouse_Name
//
this.C_LiveColonyHouse_Name.DataPropertyName = "LiveColonyHouse_Name";
this.C_LiveColonyHouse_Name.HeaderText = "圈舍";
this.C_LiveColonyHouse_Name.Name = "C_LiveColonyHouse_Name";
this.C_LiveColonyHouse_Name.ReadOnly = true;
this.C_LiveColonyHouse_Name.Width = 200;
//
// C_PlanNumber
//
this.C_PlanNumber.DataPropertyName = "PlanNumber";
this.C_PlanNumber.HeaderText = "头数";
this.C_PlanNumber.Name = "C_PlanNumber";
this.C_PlanNumber.ReadOnly = true;
//
// C_OK
//
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(10);
this.C_OK.DefaultCellStyle = dataGridViewCellStyle3;
this.C_OK.HeaderText = "开始";
this.C_OK.Name = "C_OK";
this.C_OK.ReadOnly = true;
this.C_OK.Text = "";
this.C_OK.Width = 170;
//
// C_Finish
//
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(10);
this.C_Finish.DefaultCellStyle = dataGridViewCellStyle4;
this.C_Finish.HeaderText = "完毕";
this.C_Finish.Name = "C_Finish";
this.C_Finish.ReadOnly = true;
this.C_Finish.Text = "完毕";
this.C_Finish.UseColumnTextForButtonValue = true;
this.C_Finish.Width = 170;
//
// existBtn
//
this.existBtn.Font = new System.Drawing.Font("宋体", 15F);
this.existBtn.Location = new System.Drawing.Point(723, 6);
this.existBtn.Location = new System.Drawing.Point(974, 12);
this.existBtn.Name = "existBtn";
this.existBtn.Size = new System.Drawing.Size(108, 41);
this.existBtn.TabIndex = 12;
@ -109,7 +233,7 @@
//
this.orderLabel.AutoSize = true;
this.orderLabel.Font = new System.Drawing.Font("宋体", 15F);
this.orderLabel.Location = new System.Drawing.Point(540, 22);
this.orderLabel.Location = new System.Drawing.Point(617, 21);
this.orderLabel.Name = "orderLabel";
this.orderLabel.Size = new System.Drawing.Size(19, 20);
this.orderLabel.TabIndex = 11;
@ -119,7 +243,7 @@
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 15F);
this.label2.Location = new System.Drawing.Point(442, 22);
this.label2.Location = new System.Drawing.Point(519, 21);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(109, 20);
this.label2.TabIndex = 10;
@ -128,7 +252,7 @@
// syncBtn
//
this.syncBtn.Font = new System.Drawing.Font("宋体", 15F);
this.syncBtn.Location = new System.Drawing.Point(315, 12);
this.syncBtn.Location = new System.Drawing.Point(359, 12);
this.syncBtn.Name = "syncBtn";
this.syncBtn.Size = new System.Drawing.Size(108, 41);
this.syncBtn.TabIndex = 9;
@ -142,9 +266,9 @@
this.uDatePicker1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.uDatePicker1.Date = new System.DateTime(2017, 9, 5, 0, 0, 0, 0);
this.uDatePicker1.Font = new System.Drawing.Font("宋体", 15F);
this.uDatePicker1.Location = new System.Drawing.Point(142, 17);
this.uDatePicker1.Location = new System.Drawing.Point(158, 17);
this.uDatePicker1.Name = "uDatePicker1";
this.uDatePicker1.Size = new System.Drawing.Size(150, 30);
this.uDatePicker1.Size = new System.Drawing.Size(175, 30);
this.uDatePicker1.TabIndex = 8;
this.uDatePicker1.Text = "2017/09/05";
this.uDatePicker1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -154,7 +278,7 @@
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 15F);
this.label1.Location = new System.Drawing.Point(34, 22);
this.label1.Location = new System.Drawing.Point(43, 22);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(109, 20);
this.label1.TabIndex = 7;
@ -162,73 +286,50 @@
//
// vScrollBar1
//
this.vScrollBar1.Location = new System.Drawing.Point(791, 73);
this.vScrollBar1.Location = new System.Drawing.Point(1042, 73);
this.vScrollBar1.Name = "vScrollBar1";
this.vScrollBar1.Size = new System.Drawing.Size(40, 525);
this.vScrollBar1.Size = new System.Drawing.Size(40, 698);
this.vScrollBar1.TabIndex = 52;
//
// C_ID
//
this.C_ID.DataPropertyName = "ID";
this.C_ID.HeaderText = "ID";
this.C_ID.Name = "C_ID";
this.C_ID.ReadOnly = true;
this.C_ID.Visible = false;
//
// C_Confirmed
//
this.C_Confirmed.DataPropertyName = "Confirmed";
this.C_Confirmed.HeaderText = "Confirmed";
this.C_Confirmed.Name = "C_Confirmed";
this.C_Confirmed.ReadOnly = true;
this.C_Confirmed.Visible = false;
//
// C_Order
//
this.C_Order.DataPropertyName = "Order";
this.C_Order.HeaderText = "排宰顺序";
this.C_Order.Name = "C_Order";
this.C_Order.ReadOnly = true;
//
// C_B3WeighBill_ID
//
this.C_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID";
this.C_B3WeighBill_ID.HeaderText = "过磅单号";
this.C_B3WeighBill_ID.Name = "C_B3WeighBill_ID";
this.C_B3WeighBill_ID.ReadOnly = true;
//
// C_LiveColonyHouse_Name
//
this.C_LiveColonyHouse_Name.DataPropertyName = "LiveColonyHouse_Name";
this.C_LiveColonyHouse_Name.HeaderText = "圈舍";
this.C_LiveColonyHouse_Name.Name = "C_LiveColonyHouse_Name";
this.C_LiveColonyHouse_Name.ReadOnly = true;
this.C_LiveColonyHouse_Name.Width = 300;
//
// C_Number
//
this.C_Number.DataPropertyName = "Number";
this.C_Number.HeaderText = "头数";
this.C_Number.Name = "C_Number";
this.C_Number.ReadOnly = true;
//
// C_OK
//
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(10);
this.C_OK.DefaultCellStyle = dataGridViewCellStyle3;
this.C_OK.HeaderText = "确定";
this.C_OK.Name = "C_OK";
this.C_OK.ReadOnly = true;
this.C_OK.Text = "确定";
this.C_OK.UseColumnTextForButtonValue = true;
this.C_OK.Width = 150;
// setTop
//
this.setTop.AutoSize = true;
this.setTop.Font = new System.Drawing.Font("宋体", 15F);
this.setTop.Location = new System.Drawing.Point(845, 20);
this.setTop.Name = "setTop";
this.setTop.Size = new System.Drawing.Size(68, 24);
this.setTop.TabIndex = 53;
this.setTop.Text = "置顶";
this.setTop.UseVisualStyleBackColor = true;
//
// finishNumberLabel
//
this.finishNumberLabel.AutoSize = true;
this.finishNumberLabel.Font = new System.Drawing.Font("宋体", 15F);
this.finishNumberLabel.Location = new System.Drawing.Point(758, 21);
this.finishNumberLabel.Name = "finishNumberLabel";
this.finishNumberLabel.Size = new System.Drawing.Size(19, 20);
this.finishNumberLabel.TabIndex = 55;
this.finishNumberLabel.Text = "0";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 15F);
this.label4.Location = new System.Drawing.Point(660, 21);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(109, 20);
this.label4.TabIndex = 54;
this.label4.Text = "已杀头数:";
//
// OrderConfirmForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(869, 631);
this.ClientSize = new System.Drawing.Size(1105, 805);
this.Controls.Add(this.finishNumberLabel);
this.Controls.Add(this.label4);
this.Controls.Add(this.setTop);
this.Controls.Add(this.vScrollBar1);
this.Controls.Add(this.existBtn);
this.Controls.Add(this.orderLabel);
@ -236,13 +337,15 @@
this.Controls.Add(this.syncBtn);
this.Controls.Add(this.uDatePicker1);
this.Controls.Add(this.label1);
this.Controls.Add(this.uDataGridView1);
this.Controls.Add(this.orderGrid);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.KeyPreview = true;
this.MaximizeBox = false;
this.Name = "OrderConfirmForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "上线确认";
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit();
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.OrderConfirmForm_KeyUp);
((System.ComponentModel.ISupportInitialize)(this.orderGrid)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -250,7 +353,7 @@
#endregion
private BWP.WinFormControl.UDataGridView uDataGridView1;
private BWP.WinFormControl.UDataGridView orderGrid;
private System.Windows.Forms.Button existBtn;
private System.Windows.Forms.Label orderLabel;
private System.Windows.Forms.Label label2;
@ -258,12 +361,21 @@
private BWP.WinFormControl.UDatePicker uDatePicker1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.VScrollBar vScrollBar1;
private System.Windows.Forms.CheckBox setTop;
private System.Windows.Forms.DataGridViewTextBoxColumn C_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn C_Confirmed;
private System.Windows.Forms.DataGridViewTextBoxColumn C_IsHurryButcher;
private System.Windows.Forms.DataGridViewTextBoxColumn C_WeightBill_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn C_SecondarySplit;
private System.Windows.Forms.DataGridViewTextBoxColumn C_OrderState;
private System.Windows.Forms.DataGridViewTextBoxColumn C_Date;
private System.Windows.Forms.DataGridViewTextBoxColumn C_Order;
private System.Windows.Forms.DataGridViewTextBoxColumn C_B3WeighBill_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn C_Supplier_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn C_LiveColonyHouse_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn C_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn C_PlanNumber;
private System.Windows.Forms.DataGridViewButtonColumn C_OK;
private System.Windows.Forms.DataGridViewButtonColumn C_Finish;
private System.Windows.Forms.Label finishNumberLabel;
private System.Windows.Forms.Label label4;
}
}

+ 138
- 61
OrderConfirm/OrderConfirmForm.cs View File

@ -30,14 +30,14 @@ namespace OrderConfirm
#endregion
private delegate void InvokeHandler();
List<ConfirmOrder> list;
List<OrderDetail> orderList;
Thread syncThread;
public OrderConfirmForm()
{
InitializeComponent();
uDatePicker1.Date = DateTime.Today;
uDataGridView1.AutoGenerateColumns = false;
uDataGridView1.DataSource = null;
orderGrid.AutoGenerateColumns = false;
orderGrid.DataSource = null;
this.FormClosing += delegate
{
if (syncThread != null && syncThread.IsAlive)
@ -68,55 +68,60 @@ namespace OrderConfirm
{
this.Invoke(new InvokeHandler(delegate()
{
list = OrderConfirmRpc.GetConfirmOrder(uDatePicker1.Date.Value);
BindFinishNumber();
BindOrderGrid();
}));
Thread.Sleep(5000);
}
}
ConfirmOrder last;
void BindFinishNumber()
{
var number = OrderDetailRpc.GetFinishNumbers(uDatePicker1.Date.Value);
finishNumberLabel.Text = number.ToString();
finishNumberLabel.Refresh();
}
OrderDetail lastOrderDetail;
private void BindOrderGrid()
{
uDataGridView1.DataSource = list.OrderByDescending(x => x.Order).OrderBy(x => x.Confirmed).ToList();
if (last == null && uDataGridView1.CurrentRow != null)
orderList = OrderDetailRpc.GetOrderDetail(uDatePicker1.Date.Value);
orderGrid.DataSource = orderList.OrderBy(x => x.Order).OrderBy(x => x.Doing).ToList();
if (lastOrderDetail == null && orderGrid.CurrentRow != null)
{
last = uDataGridView1.CurrentRow.DataBoundItem as ConfirmOrder;
if (last.Confirmed)
{
last = null;
uDataGridView1.CurrentRow.DefaultCellStyle.BackColor = Color.YellowGreen;
}
lastOrderDetail = orderGrid.CurrentRow.DataBoundItem as OrderDetail;
}
foreach (DataGridViewRow row in uDataGridView1.Rows)
foreach (DataGridViewRow row in orderGrid.Rows)
{
if ((bool)row.Cells["C_Confirmed"].Value)
row.DefaultCellStyle.BackColor = Color.YellowGreen;
if (last != null && last.ID == (long)row.Cells["C_ID"].Value)
var state = (int)row.Cells["C_OrderState"].Value;
if ((bool)row.Cells["C_IsHurryButcher"].Value)
row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#CC9999");
if ((bool)row.Cells["C_SecondarySplit"].Value)
row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#6699CC");
((DataGridViewButtonCell)row.Cells["C_OK"]).Value = state == 0 ? "开始" : "取消";
if (lastOrderDetail != null && lastOrderDetail.ID == (long)row.Cells["C_ID"].Value)
{
last = row.DataBoundItem as ConfirmOrder;
if (last.Confirmed)
row.DefaultCellStyle.BackColor = Color.Yellow;
else
row.DefaultCellStyle.BackColor = uDataGridView1.RowsDefaultCellStyle.SelectionBackColor;
lastOrderDetail = row.DataBoundItem as OrderDetail;
var c = orderGrid.RowsDefaultCellStyle.SelectionBackColor;
if (lastOrderDetail.IsHurryButcher)
row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#FF9900");
if (lastOrderDetail.SecondarySplit)
row.DefaultCellStyle.BackColor = ColorTranslator.FromHtml("#006699");
row.DefaultCellStyle.BackColor = c;
}
}
if (last != null && !last.Confirmed)
orderLabel.Text = last.Order.ToString();
else
orderLabel.Text = "0";
InitScrollBar1();
uDataGridView1.ClearSelection();
orderGrid.ClearSelection();
try
{
if (roll != -1)
uDataGridView1.FirstDisplayedScrollingRowIndex = roll;
orderGrid.FirstDisplayedScrollingRowIndex = roll;
}
catch
{
roll = -1;
}
uDataGridView1.Refresh();
orderGrid.Refresh();
}
private void existBtn_Click(object sender, EventArgs e)
@ -127,60 +132,132 @@ namespace OrderConfirm
int roll = -1;
private void InitScrollBar1()
{
vScrollBar1.Maximum = (uDataGridView1.RowCount - uDataGridView1.DisplayedRowCount(false) + 30) * uDataGridView1.RowTemplate.Height;
vScrollBar1.Maximum = (orderGrid.RowCount - orderGrid.DisplayedRowCount(false) + 30) * orderGrid.RowTemplate.Height;
vScrollBar1.Minimum = 0;
vScrollBar1.SmallChange = uDataGridView1.RowTemplate.Height;
vScrollBar1.LargeChange = uDataGridView1.RowTemplate.Height * 30;
vScrollBar1.SmallChange = orderGrid.RowTemplate.Height;
vScrollBar1.LargeChange = orderGrid.RowTemplate.Height * 30;
this.vScrollBar1.Scroll += (sender, e) =>
{
roll = e.NewValue / uDataGridView1.RowTemplate.Height;
uDataGridView1.FirstDisplayedScrollingRowIndex = roll;
roll = e.NewValue / orderGrid.RowTemplate.Height;
orderGrid.FirstDisplayedScrollingRowIndex = roll;
};
}
private void uDataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
private void orderGrid_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
var entity = uDataGridView1.CurrentRow.DataBoundItem as ConfirmOrder;
if (e.ColumnIndex != uDataGridView1.Columns.Count - 1)//非确定列
var entity = orderGrid.CurrentRow.DataBoundItem as OrderDetail;
if (lastOrderDetail != null)
{
if (last != null)
foreach (DataGridViewRow row in orderGrid.Rows)
{
foreach (DataGridViewRow row in uDataGridView1.Rows)
if (lastOrderDetail.ID == (long)row.Cells["C_ID"].Value)
{
if (last.ID == (long)row.Cells["C_ID"].Value)
{
row.DefaultCellStyle.BackColor = last.Confirmed ? Color.YellowGreen : uDataGridView1.RowsDefaultCellStyle.BackColor;
break;
}
Color c = orderGrid.RowsDefaultCellStyle.BackColor;
if (lastOrderDetail.IsHurryButcher)
c = ColorTranslator.FromHtml("#CC9999");
if (lastOrderDetail.SecondarySplit)
c = ColorTranslator.FromHtml("#6699CC");
row.DefaultCellStyle.BackColor = c;
break;
}
}
last = entity;
uDataGridView1.CurrentRow.DefaultCellStyle.SelectionBackColor = last.Confirmed ? Color.Yellow : uDataGridView1.RowsDefaultCellStyle.SelectionBackColor;
this.orderLabel.Text = last.Order.ToString();
}
else//确定列
{
uDataGridView1.CurrentRow.DefaultCellStyle.SelectionBackColor = last.Confirmed ? Color.YellowGreen : uDataGridView1.RowsDefaultCellStyle.BackColor;
last = null;
}
uDataGridView1.Refresh();
lastOrderDetail = entity;
var bc = orderGrid.RowsDefaultCellStyle.SelectionBackColor;
if (lastOrderDetail.IsHurryButcher)
bc = ColorTranslator.FromHtml("#FF9900");
if (lastOrderDetail.SecondarySplit)
bc = ColorTranslator.FromHtml("#006699");
orderGrid.CurrentRow.DefaultCellStyle.SelectionBackColor = bc;
orderGrid.Refresh();
}
private void uDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
private void orderGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
if (e.ColumnIndex == uDataGridView1.ColumnCount - 1)//确定
if (e.ColumnIndex < orderGrid.ColumnCount - 2)
return;
if (lastOrderDetail.OrderState == 20)
return;
if (e.ColumnIndex == orderGrid.ColumnCount - 2)//开始 取消
OrderDetailRpc.SetOrderState(lastOrderDetail.ID, lastOrderDetail.OrderState == 0 ? 10 : 0);
else//完成
{
OrderDetailRpc.SetOrderState(lastOrderDetail.ID, 20);
BindFinishNumber();
}
BindOrderGrid();
}
string code = string.Empty;
bool start = false;
private void OrderConfirmForm_KeyUp(object sender, KeyEventArgs e)
{
switch (e.KeyData)
{
case Keys.S:
start = true;
code = string.Empty;
break;
case Keys.E:
if (!start)
break;
InsertDetail();
start = false;
code = string.Empty;
break;
default:
if (start)
code += (char)e.KeyValue;
break;
}
}
void InsertDetail()
{
if (orderList == null)
throw new Exception("请先同步数据");
long id = 0;
if (!long.TryParse(code, out id))
throw new Exception(string.Format("接收扫码输入错误 {0}", code));
var entity = OrderDetailRpc.GetHurryRecord(id);
if (entity.ToOrderDetail_ID.HasValue)
throw new Exception("该条码已插入过,不能重复插入");
var currentOrder = 0;
if (!setTop.Checked)
{
if (lastOrderDetail != null && lastOrderDetail.Date != uDatePicker1.Date)
lastOrderDetail = null;
if (lastOrderDetail != null)
currentOrder = OrderDetailRpc.GetCurrentOrder(lastOrderDetail.ID);
else
currentOrder = OrderDetailRpc.GetMaxOrder(uDatePicker1.Date.Value);
currentOrder++;
}
else
{
var entity = uDataGridView1.CurrentRow.DataBoundItem as ConfirmOrder;
if (entity.Confirmed)
return;
entity.Confirmed = true;
OrderConfirmRpc.SetOrderConfirmed(entity.ID);
BindOrderGrid();
setTop.Checked = false;
var l = orderList.OrderBy(x => x.Order).OrderBy(x => x.Doing).FirstOrDefault();
if (l != null)
currentOrder = l.Order;
else
currentOrder = 1;
}
var order = new OrderDetail();
order.Order = currentOrder;
order.LiveColonyHouse_Name = entity.LiveColonyHouse_Name;
order.PlanNumber = entity.HurryNumber;
order.WeightBill_ID = entity.WeightBill_ID;
order.B3WeighBill_ID = entity.B3WeighBill_ID;
order.Date = uDatePicker1.Date.Value;
order.IsHurryButcher = true;
OrderDetailRpc.InsertByHurryRecord(order, id);
lastOrderDetail = order;
BindOrderGrid();
}
}
}

+ 20
- 2
OrderConfirm/OrderConfirmForm.resx View File

@ -120,7 +120,19 @@
<metadata name="C_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_Confirmed.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="C_IsHurryButcher.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_SecondarySplit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_OrderState.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_Date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@ -129,13 +141,19 @@
<metadata name="C_B3WeighBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_Supplier_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_LiveColonyHouse_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="C_PlanNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_OK.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="C_Finish.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 39
- 6
QualityAndOrder/HurryRecordPrint.cs View File

@ -15,18 +15,51 @@ namespace QualityAndOrder
PrintAPI.B_GetUSBBufferLen();
PrintAPI.B_EnumUSB(new byte[128]);
PrintAPI.B_CreateUSBPort(1);
PrintAPI.B_Prn_Text_TrueType(255, 15, 38, "宋体", 1, 700, 0, 0, 0, "C1", "急宰单");
PrintAPI.B_Bar2d_QR(40, 75, 2, 12, 'M', 'A', 0, 0, 0, string.Format("s{0}e", entity.ID));
var y = 50;
var cIdx = 1;
PrintAPI.B_Prn_Text_TrueType(300, y += 40, 32, "宋体", 1, 600, 0, 0, 0, "C" + (++cIdx), string.Format("磅单号:{0}", entity.B3WeighBill_ID));
;
PrintAPI.B_Prn_Text_TrueType(250, 15, 38, "宋体", 1, 700, 0, 0, 0, "C1", "急宰扫码");
PrintAPI.B_Bar2d_QR(45, 75, 2, 13, 'M', 'A', 0, 0, 0, entity.ID.ToString());
PrintAPI.B_Prn_Text_TrueType(300, y += 40, 32, "宋体", 1, 600, 0, 0, 0, "C" + (++cIdx), string.Format("总头数:{0}", entity.TotalNumber));
PrintAPI.B_Prn_Text_TrueType(335, 90, 32, "宋体", 1, 600, 0, 0, 0, "C2", string.Format("磅单号:{0}", entity.B3WeighBill_ID));
PrintAPI.B_Prn_Text_TrueType(335, 150, 32, "宋体", 1, 600, 0, 0, 0, "C3", string.Format("供应商:{0}", entity.Supplier_Name));
PrintAPI.B_Prn_Text_TrueType(335, 210, 32, "宋体", 1, 600, 0, 0, 0, "C4", string.Format("头 数:{0}", entity.HurryNumber));
PrintAPI.B_Prn_Text_TrueType(335, 270, 32, "宋体", 1, 600, 0, 0, 0, "C5", string.Format("时 间:{0}", entity.Time.ToString("MM/dd HH:mm")));
PrintAPI.B_Prn_Text_TrueType(300, y += 40, 32, "宋体", 1, 600, 0, 0, 0, "C" + (++cIdx), string.Format("急宰头数:{0}", entity.HurryNumber));
var names = GetHouseNames(entity.LiveColonyHouse_Name);
PrintAPI.B_Prn_Text_TrueType(300, y += 40, 32, "宋体", 1, 600, 0, 0, 0, "C" + (++cIdx), string.Format("圈 舍:{0}", names.Any() ? names[0] : string.Empty));
names.RemoveAt(0);
foreach (var v in names)
PrintAPI.B_Prn_Text_TrueType(303, y += 40, 32, "宋体", 1, 600, 0, 0, 0, "C" + (++cIdx), string.Format(" {0}", names.Any() ? names[0] : string.Empty));
PrintAPI.B_Prn_Text_TrueType(300, y += 40, 32, "宋体", 1, 600, 0, 0, 0, "C" + (++cIdx), string.Format("时 间:{0}", entity.Time.ToString("MM/dd HH:mm")));
PrintAPI.B_Set_Direction('B');
PrintAPI.B_Print_Out(1);
PrintAPI.B_ClosePrn();
}
static List<string> GetHouseNames(string houseName)
{
var rst = new List<string>();
if (string.IsNullOrEmpty(houseName))
return rst;
var arr = houseName.Split(new char[] { ',' });
var temp = string.Empty;
foreach (var item in arr)
{
if (string.IsNullOrEmpty(temp))
temp = item;
else
{
rst.Add(string.Format("{0},{1}", temp, item));
temp = string.Empty;
}
}
if (!string.IsNullOrEmpty(temp))
rst.Add(temp);
return rst;
}
}
}

+ 31
- 9
QualityAndOrder/HurryRecordView.Designer.cs View File

@ -37,7 +37,9 @@
this.closeBtn = new System.Windows.Forms.Button();
this.recordGridView = new BWP.WinFormControl.UDataGridView();
this.R_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_FromOrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_WeightBill_ID_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_B3WeighBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.R_HurryNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -78,7 +80,9 @@
this.recordGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.recordGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.R_ID,
this.R_FromOrderDetail_ID,
this.R_WeightBill_ID_ID,
this.R_Supplier_Name,
this.R_LiveColonyHouse_Name,
this.R_B3WeighBill_ID,
this.R_Order,
this.R_HurryNumber,
@ -107,13 +111,29 @@
this.R_ID.ReadOnly = true;
this.R_ID.Visible = false;
//
// R_FromOrderDetail_ID
// R_WeightBill_ID_ID
//
this.R_FromOrderDetail_ID.DataPropertyName = "FromOrderDetail_ID";
this.R_FromOrderDetail_ID.HeaderText = "FromOrderDetail_ID";
this.R_FromOrderDetail_ID.Name = "R_FromOrderDetail_ID";
this.R_FromOrderDetail_ID.ReadOnly = true;
this.R_FromOrderDetail_ID.Visible = false;
this.R_WeightBill_ID_ID.DataPropertyName = "WeightBill_ID";
this.R_WeightBill_ID_ID.HeaderText = "WeightBill_ID";
this.R_WeightBill_ID_ID.Name = "R_WeightBill_ID_ID";
this.R_WeightBill_ID_ID.ReadOnly = true;
this.R_WeightBill_ID_ID.Visible = false;
//
// R_Supplier_Name
//
this.R_Supplier_Name.DataPropertyName = "Supplier_Name";
this.R_Supplier_Name.HeaderText = "Supplier_Name";
this.R_Supplier_Name.Name = "R_Supplier_Name";
this.R_Supplier_Name.ReadOnly = true;
this.R_Supplier_Name.Visible = false;
//
// R_LiveColonyHouse_Name
//
this.R_LiveColonyHouse_Name.DataPropertyName = "LiveColonyHouse_Name";
this.R_LiveColonyHouse_Name.HeaderText = "LiveColonyHouse_Name";
this.R_LiveColonyHouse_Name.Name = "R_LiveColonyHouse_Name";
this.R_LiveColonyHouse_Name.ReadOnly = true;
this.R_LiveColonyHouse_Name.Visible = false;
//
// R_B3WeighBill_ID
//
@ -195,7 +215,9 @@
private System.Windows.Forms.Button closeBtn;
private BWP.WinFormControl.UDataGridView recordGridView;
private System.Windows.Forms.DataGridViewTextBoxColumn R_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn R_FromOrderDetail_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn R_WeightBill_ID_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn R_Supplier_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn R_LiveColonyHouse_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn R_B3WeighBill_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn R_Order;
private System.Windows.Forms.DataGridViewTextBoxColumn R_HurryNumber;


+ 8
- 3
QualityAndOrder/HurryRecordView.cs View File

@ -1,5 +1,6 @@
using BO.BO.Bill;
using BO.Utils.BillRpc;
using BWP.WinFormControl;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@ -16,11 +17,13 @@ namespace QualityAndOrder
{
bool changed = false;
List<HurryRecord> mRecords;
public HurryRecordView(long fromOrderID)
int mTotalNumber = 0;
public HurryRecordView(long fromOrderID,int totalNumbet)
{
InitializeComponent();
recordGridView.AutoGenerateColumns = false;
mRecords = OrderDetailRpc.GetHurryRecordList(fromOrderID).OrderBy(x => x.ID).ToList();
mTotalNumber = totalNumbet;
recordGridView.DataSource = null;
recordGridView.DataSource = mRecords;
recordGridView.Refresh();
@ -37,12 +40,13 @@ namespace QualityAndOrder
{
if (e.RowIndex == -1)
return;
if (e.ColumnIndex <= recordGridView.ColumnCount - 2)
if (e.ColumnIndex < recordGridView.ColumnCount - 2)
return;
var entity = recordGridView.CurrentRow.DataBoundItem as HurryRecord;
if (e.ColumnIndex == recordGridView.ColumnCount - 2)
{
OrderDetailRpc.DeleteHurryRecord(entity.ID);
if (OrderDetailRpc.DeleteHurryRecord(entity.ID))
UMessageBox.Show("排宰顺序出现多条记录,请手动修改", "注意");
_result += entity.HurryNumber;
mRecords.Remove(entity);
if (!changed)
@ -54,6 +58,7 @@ namespace QualityAndOrder
}
else
{
entity.TotalNumber = mTotalNumber;
HurryRecordPrint.Print(entity);
}
}


+ 7
- 1
QualityAndOrder/HurryRecordView.resx View File

@ -120,7 +120,13 @@
<metadata name="R_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="R_FromOrderDetail_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="R_WeightBill_ID_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="R_Supplier_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="R_LiveColonyHouse_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="R_B3WeighBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">


+ 332
- 7
QualityAndOrder/QualityOrderForm.Designer.cs View File

@ -28,6 +28,27 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle33 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle34 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle38 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle35 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle36 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle37 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle39 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle40 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle42 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle41 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
@ -43,12 +64,12 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
this.uTabControl1 = new BWP.WinFormControl.UTabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
@ -148,9 +169,22 @@
this.H_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_WeightNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_HurryNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewButtonColumn1 = new System.Windows.Forms.DataGridViewButtonColumn();
this.H_View = new System.Windows.Forms.DataGridViewButtonColumn();
this.tb3CloseBtn = new System.Windows.Forms.Button();
this.O_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_IsHurryButcher = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_WeightBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_SecondarySplit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_Date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_B3WeighBill_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_Supplier_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_LiveColonyHouse_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_PlanNumber = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.O_OKBtn = new System.Windows.Forms.DataGridViewButtonColumn();
this.uTabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.panel1.SuspendLayout();
@ -180,7 +214,7 @@
this.uTabControl1.Location = new System.Drawing.Point(0, 0);
this.uTabControl1.Name = "uTabControl1";
this.uTabControl1.SelectedIndex = 0;
this.uTabControl1.Size = new System.Drawing.Size(1362, 741);
this.uTabControl1.Size = new System.Drawing.Size(1384, 831);
this.uTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.uTabControl1.TabIndex = 0;
//
@ -203,7 +237,7 @@
this.tabPage1.Location = new System.Drawing.Point(4, 54);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1354, 683);
this.tabPage1.Size = new System.Drawing.Size(1376, 773);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "验质分圈";
this.tabPage1.UseVisualStyleBackColor = true;
@ -255,9 +289,19 @@
this.sanctionGrid.AllowUserToDeleteRows = false;
this.sanctionGrid.AllowUserToResizeColumns = false;
this.sanctionGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.sanctionGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.sanctionGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.sanctionGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle28.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle28.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle28.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle28.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle28.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.sanctionGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
@ -286,6 +330,9 @@
this.sanctionGrid.Name = "sanctionGrid";
this.sanctionGrid.ReadOnly = true;
this.sanctionGrid.RowHeadersVisible = false;
dataGridViewCellStyle29.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle29.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.sanctionGrid.RowsDefaultCellStyle = dataGridViewCellStyle29;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.sanctionGrid.RowsDefaultCellStyle = dataGridViewCellStyle3;
@ -497,9 +544,19 @@
this.weightBillGrid.AllowUserToDeleteRows = false;
this.weightBillGrid.AllowUserToResizeColumns = false;
this.weightBillGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle30.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.weightBillGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle30;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.weightBillGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.weightBillGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle31.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle31.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle31.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle31.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle31.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle31.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.weightBillGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle31;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F);
@ -522,6 +579,11 @@
this.weightBillGrid.Name = "weightBillGrid";
this.weightBillGrid.ReadOnly = true;
this.weightBillGrid.RowHeadersVisible = false;
dataGridViewCellStyle32.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle32.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle32.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle32.SelectionForeColor = System.Drawing.Color.Black;
this.weightBillGrid.RowsDefaultCellStyle = dataGridViewCellStyle32;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
@ -802,9 +864,19 @@
this.preOrderGrid.AllowUserToDeleteRows = false;
this.preOrderGrid.AllowUserToResizeColumns = false;
this.preOrderGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle33.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.preOrderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle33;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.preOrderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7;
this.preOrderGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle34.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle34.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle34.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle34.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle34.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle34.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle34.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.preOrderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle34;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F);
@ -831,6 +903,11 @@
this.preOrderGrid.Name = "preOrderGrid";
this.preOrderGrid.ReadOnly = true;
this.preOrderGrid.RowHeadersVisible = false;
dataGridViewCellStyle38.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle38.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle38.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle38.SelectionForeColor = System.Drawing.Color.Black;
this.preOrderGrid.RowsDefaultCellStyle = dataGridViewCellStyle38;
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle12.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
@ -911,6 +988,9 @@
// P_WeighTime
//
this.P_WeighTime.DataPropertyName = "WeighTime";
dataGridViewCellStyle35.Format = "MM/dd HH:mm";
dataGridViewCellStyle35.NullValue = null;
this.P_WeighTime.DefaultCellStyle = dataGridViewCellStyle35;
dataGridViewCellStyle9.Format = "MM/dd HH:mm";
dataGridViewCellStyle9.NullValue = null;
this.P_WeighTime.DefaultCellStyle = dataGridViewCellStyle9;
@ -921,6 +1001,9 @@
//
// P_OKBtn
//
dataGridViewCellStyle36.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle36.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.P_OKBtn.DefaultCellStyle = dataGridViewCellStyle36;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle10.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.P_OKBtn.DefaultCellStyle = dataGridViewCellStyle10;
@ -935,6 +1018,9 @@
//
// P_Hidden
//
dataGridViewCellStyle37.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle37.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.P_Hidden.DefaultCellStyle = dataGridViewCellStyle37;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle11.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.P_Hidden.DefaultCellStyle = dataGridViewCellStyle11;
@ -950,9 +1036,19 @@
this.orderGrid.AllowUserToDeleteRows = false;
this.orderGrid.AllowUserToResizeColumns = false;
this.orderGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle39.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle39;
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle13;
this.orderGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle40.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle40.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle40.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle40.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle40.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle40.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle40.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.orderGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle40;
dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 12F);
@ -967,6 +1063,7 @@
this.O_IsHurryButcher,
this.O_WeightBill_ID,
this.O_SecondarySplit,
this.O_Date,
this.O_Order,
this.O_B3WeighBill_ID,
this.O_Supplier_Name,
@ -978,6 +1075,11 @@
this.orderGrid.Name = "orderGrid";
this.orderGrid.ReadOnly = true;
this.orderGrid.RowHeadersVisible = false;
dataGridViewCellStyle42.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle42.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle42.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle42.SelectionForeColor = System.Drawing.Color.Black;
this.orderGrid.RowsDefaultCellStyle = dataGridViewCellStyle42;
dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle16.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
@ -1064,9 +1166,9 @@
//
// O_OKBtn
//
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle15.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.O_OKBtn.DefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle41.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle41.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.O_OKBtn.DefaultCellStyle = dataGridViewCellStyle41;
this.O_OKBtn.HeaderText = "确定";
this.O_OKBtn.Name = "O_OKBtn";
this.O_OKBtn.ReadOnly = true;
@ -1074,6 +1176,89 @@
this.O_OKBtn.UseColumnTextForButtonValue = true;
this.O_OKBtn.Width = 95;
//
// tab2SyncBtn
//
this.tab2SyncBtn.Font = new System.Drawing.Font("宋体", 15F);
@ -1149,8 +1334,10 @@
//
this.tab3SearchBtn.Font = new System.Drawing.Font("宋体", 15F);
this.tab3SearchBtn.Location = new System.Drawing.Point(277, 6);
this.tab3SearchBtn.Location = new System.Drawing.Point(25, 6);
this.tab3SearchBtn.Name = "tab3SearchBtn";
this.tab3SearchBtn.Size = new System.Drawing.Size(94, 56);
this.tab3SearchBtn.Size = new System.Drawing.Size(94, 38);
this.tab3SearchBtn.TabIndex = 63;
this.tab3SearchBtn.Text = "查询";
this.tab3SearchBtn.UseVisualStyleBackColor = true;
@ -1207,6 +1394,7 @@
this.label8.Size = new System.Drawing.Size(89, 20);
this.label8.TabIndex = 59;
this.label8.Text = "排宰明细";
this.label8.Text = "过磅记录";
//
// orderGrid3
//
@ -1214,9 +1402,19 @@
this.orderGrid3.AllowUserToDeleteRows = false;
this.orderGrid3.AllowUserToResizeColumns = false;
this.orderGrid3.AllowUserToResizeRows = false;
dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGrid3.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle22;
dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.orderGrid3.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle17;
this.orderGrid3.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle23.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.orderGrid3.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23;
dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F);
@ -1235,6 +1433,7 @@
this.H_Supplier_Name,
this.H_LiveColonyHouse_Name,
this.H_PlanNumber,
this.H_WeightNumber,
this.H_HurryNumber,
this.dataGridViewButtonColumn1,
this.H_View});
@ -1243,6 +1442,11 @@
this.orderGrid3.Name = "orderGrid3";
this.orderGrid3.ReadOnly = true;
this.orderGrid3.RowHeadersVisible = false;
dataGridViewCellStyle26.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle26.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle26.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle26.SelectionForeColor = System.Drawing.Color.Black;
this.orderGrid3.RowsDefaultCellStyle = dataGridViewCellStyle26;
dataGridViewCellStyle21.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle21.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle21.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
@ -1295,6 +1499,7 @@
this.H_B3WeighBill_ID.Name = "H_B3WeighBill_ID";
this.H_B3WeighBill_ID.ReadOnly = true;
this.H_B3WeighBill_ID.Width = 80;
this.H_B3WeighBill_ID.Width = 90;
//
// H_Supplier_Name
//
@ -1302,6 +1507,7 @@
this.H_Supplier_Name.HeaderText = "供应商";
this.H_Supplier_Name.Name = "H_Supplier_Name";
this.H_Supplier_Name.ReadOnly = true;
this.H_Supplier_Name.Width = 110;
//
// H_LiveColonyHouse_Name
//
@ -1309,14 +1515,21 @@
this.H_LiveColonyHouse_Name.HeaderText = "圈舍";
this.H_LiveColonyHouse_Name.Name = "H_LiveColonyHouse_Name";
this.H_LiveColonyHouse_Name.ReadOnly = true;
this.H_LiveColonyHouse_Name.Width = 130;
//
// H_PlanNumber
// H_WeightNumber
//
this.H_PlanNumber.DataPropertyName = "PlanNumber";
this.H_PlanNumber.HeaderText = "头数";
this.H_PlanNumber.Name = "H_PlanNumber";
this.H_PlanNumber.ReadOnly = true;
this.H_PlanNumber.Width = 80;
this.H_WeightNumber.DataPropertyName = "WeightNumber";
this.H_WeightNumber.HeaderText = "头数";
this.H_WeightNumber.Name = "H_WeightNumber";
this.H_WeightNumber.ReadOnly = true;
this.H_WeightNumber.Width = 90;
//
// H_HurryNumber
//
@ -1325,9 +1538,13 @@
this.H_HurryNumber.Name = "H_HurryNumber";
this.H_HurryNumber.ReadOnly = true;
this.H_HurryNumber.Width = 80;
this.H_HurryNumber.Width = 90;
//
// dataGridViewButtonColumn1
//
dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle24.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.dataGridViewButtonColumn1.DefaultCellStyle = dataGridViewCellStyle24;
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle19.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.dataGridViewButtonColumn1.DefaultCellStyle = dataGridViewCellStyle19;
@ -1340,6 +1557,9 @@
//
// H_View
//
dataGridViewCellStyle25.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle25.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.H_View.DefaultCellStyle = dataGridViewCellStyle25;
dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle20.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.H_View.DefaultCellStyle = dataGridViewCellStyle20;
@ -1350,11 +1570,113 @@
this.H_View.UseColumnTextForButtonValue = true;
this.H_View.Width = 110;
//
// tb3CloseBtn
//
this.tb3CloseBtn.Font = new System.Drawing.Font("宋体", 15F);
this.tb3CloseBtn.Location = new System.Drawing.Point(1254, 9);
this.tb3CloseBtn.Name = "tb3CloseBtn";
this.tb3CloseBtn.Size = new System.Drawing.Size(94, 56);
this.tb3CloseBtn.TabIndex = 65;
this.tb3CloseBtn.Text = "关闭";
this.tb3CloseBtn.UseVisualStyleBackColor = true;
this.tb3CloseBtn.Click += new System.EventHandler(this.closeBtn_Click);
//
// O_ID
//
this.O_ID.DataPropertyName = "ID";
this.O_ID.HeaderText = "ID";
this.O_ID.Name = "O_ID";
this.O_ID.ReadOnly = true;
this.O_ID.Visible = false;
//
// O_IsHurryButcher
//
this.O_IsHurryButcher.DataPropertyName = "IsHurryButcher";
this.O_IsHurryButcher.HeaderText = "IsHurryButcher";
this.O_IsHurryButcher.Name = "O_IsHurryButcher";
this.O_IsHurryButcher.ReadOnly = true;
this.O_IsHurryButcher.Visible = false;
//
// O_WeightBill_ID
//
this.O_WeightBill_ID.DataPropertyName = "WeightBill_ID";
this.O_WeightBill_ID.HeaderText = "WeightBill_ID";
this.O_WeightBill_ID.Name = "O_WeightBill_ID";
this.O_WeightBill_ID.ReadOnly = true;
this.O_WeightBill_ID.Visible = false;
//
// O_SecondarySplit
//
this.O_SecondarySplit.DataPropertyName = "SecondarySplit";
this.O_SecondarySplit.HeaderText = "SecondarySplit";
this.O_SecondarySplit.Name = "O_SecondarySplit";
this.O_SecondarySplit.ReadOnly = true;
this.O_SecondarySplit.Visible = false;
//
// O_Date
//
this.O_Date.DataPropertyName = "Date";
this.O_Date.HeaderText = "Date";
this.O_Date.Name = "O_Date";
this.O_Date.ReadOnly = true;
this.O_Date.Visible = false;
//
// O_Order
//
this.O_Order.DataPropertyName = "Order";
this.O_Order.HeaderText = "序号";
this.O_Order.Name = "O_Order";
this.O_Order.ReadOnly = true;
this.O_Order.Width = 70;
//
// O_B3WeighBill_ID
//
this.O_B3WeighBill_ID.DataPropertyName = "B3WeighBill_ID";
this.O_B3WeighBill_ID.HeaderText = "磅单号";
this.O_B3WeighBill_ID.Name = "O_B3WeighBill_ID";
this.O_B3WeighBill_ID.ReadOnly = true;
this.O_B3WeighBill_ID.Width = 80;
//
// O_Supplier_Name
//
this.O_Supplier_Name.DataPropertyName = "Supplier_Name";
this.O_Supplier_Name.HeaderText = "供应商";
this.O_Supplier_Name.Name = "O_Supplier_Name";
this.O_Supplier_Name.ReadOnly = true;
this.O_Supplier_Name.Width = 95;
//
// O_LiveColonyHouse_Name
//
this.O_LiveColonyHouse_Name.DataPropertyName = "LiveColonyHouse_Name";
this.O_LiveColonyHouse_Name.HeaderText = "圈舍";
this.O_LiveColonyHouse_Name.Name = "O_LiveColonyHouse_Name";
this.O_LiveColonyHouse_Name.ReadOnly = true;
//
// O_PlanNumber
//
this.O_PlanNumber.DataPropertyName = "PlanNumber";
this.O_PlanNumber.HeaderText = "头数";
this.O_PlanNumber.Name = "O_PlanNumber";
this.O_PlanNumber.ReadOnly = true;
this.O_PlanNumber.Width = 70;
//
// O_OKBtn
//
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle15.Padding = new System.Windows.Forms.Padding(7, 10, 7, 10);
this.O_OKBtn.DefaultCellStyle = dataGridViewCellStyle15;
this.O_OKBtn.HeaderText = "确定";
this.O_OKBtn.Name = "O_OKBtn";
this.O_OKBtn.ReadOnly = true;
this.O_OKBtn.Text = "确定";
this.O_OKBtn.UseColumnTextForButtonValue = true;
this.O_OKBtn.Width = 95;
//
// QualityOrderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1362, 741);
this.ClientSize = new System.Drawing.Size(1384, 831);
this.Controls.Add(this.uTabControl1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
@ -1468,6 +1790,7 @@
private System.Windows.Forms.Label label8;
private BWP.WinFormControl.UDataGridView orderGrid3;
private System.Windows.Forms.DataGridViewTextBoxColumn H_ID;
private System.Windows.Forms.Button tb3CloseBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn H_WeightBill_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_SecondarySplit;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Order;
@ -1475,6 +1798,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn H_Supplier_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn H_LiveColonyHouse_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn H_PlanNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn H_WeightNumber;
private System.Windows.Forms.DataGridViewTextBoxColumn H_HurryNumber;
private System.Windows.Forms.DataGridViewButtonColumn dataGridViewButtonColumn1;
private System.Windows.Forms.DataGridViewButtonColumn H_View;
@ -1482,6 +1806,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn O_IsHurryButcher;
private System.Windows.Forms.DataGridViewTextBoxColumn O_WeightBill_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn O_SecondarySplit;
private System.Windows.Forms.DataGridViewTextBoxColumn O_Date;
private System.Windows.Forms.DataGridViewTextBoxColumn O_Order;
private System.Windows.Forms.DataGridViewTextBoxColumn O_B3WeighBill_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn O_Supplier_Name;


+ 2
- 6
QualityAndOrder/QualityOrderForm.cs View File

@ -259,15 +259,11 @@ namespace QualityAndOrder
btn.Click += (sender, e) =>
{
if (currentBtn != null)
{
currentBtn.BackColor = btnUnSelectBackColor;
currentBtn.ForeColor = btnUnSelectForeColor;
}
SetBtnUnCheck(currentBtn);
if (currentBtn != btn)
{
btn.BackColor = btnSelectBackColor;
btn.ForeColor = btnSelectForeColor;
currentBtn = btn;
SetBtnChecked(currentBtn);
}
else
currentBtn = null;


+ 74
- 17
QualityAndOrder/QualityOrderForm.resx View File

@ -117,27 +117,60 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="W_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_AlreadyHouse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_B3ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_SecondarySplit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_Employee_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_Supplier_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_B3WeighBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Supplier_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_HouseNames.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_LiveColonyHouse_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_PlanNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_HurryNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewButtonColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_View.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="S_AbnormalItem_Name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -174,6 +207,27 @@
<metadata name="S_AbnormalItem_ID3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_AlreadyHouse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_B3ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_Employee_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_Supplier_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W_HouseNames.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="P_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -219,6 +273,9 @@
<metadata name="O_SecondarySplit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="O_Date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="O_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -237,18 +294,9 @@
<metadata name="O_OKBtn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_SecondarySplit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_B3WeighBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -258,7 +306,7 @@
<metadata name="H_LiveColonyHouse_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_PlanNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_WeightNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_HurryNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@ -270,4 +318,13 @@
<metadata name="H_View.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 6
- 8
QualityAndOrder/QualityOrderFormForTab2.cs View File

@ -168,7 +168,7 @@ namespace QualityAndOrder
OrderDetail lastOrderDetail;
void BindOrderGrid()
{
orderList = OrderDetailRpc.GetOrderDetail(butcherDateInput.Date.Value, false);
orderList = OrderDetailRpc.GetOrderDetail(butcherDateInput.Date.Value);
if (lastOrderDetail != null)
{
var t = orderList.FirstOrDefault(x => x.ID == lastOrderDetail.ID);
@ -239,10 +239,7 @@ namespace QualityAndOrder
BindOrderGrid();
}
else
{
lastPreOrder.Show = !lastPreOrder.Show;
OrderDetailRpc.ChangeShowType(lastPreOrder.WeightBill_ID, lastPreOrder.Show);
}
OrderDetailRpc.ChangeShowType((long)preOrderGrid.CurrentRow.Cells["P_WeightBill_ID"].Value, !(bool)preOrderGrid.CurrentRow.Cells["P_Show"].Value);
BindPreOrderGrid();
}
@ -251,7 +248,7 @@ namespace QualityAndOrder
if (e.RowIndex == -1)
return;
var entity = preOrderGrid.CurrentRow.DataBoundItem as NeedOrderEntity;
if (e.ColumnIndex != preOrderGrid.ColumnCount - 2)//排宰
if (e.ColumnIndex == preOrderGrid.ColumnCount - 2)//排宰
{
if (lastPreOrder != null)
{
@ -285,8 +282,9 @@ namespace QualityAndOrder
var lastNumber = OrderDetailRpc.GetLastNumber(lastOrderDetail.WeightBill_ID, lastOrderDetail.ID);
if (lastOrderDetail.PlanNumber > lastNumber)
throw new Exception("排宰总头数多余过磅头数");
if (lastOrderDetail.PlanNumber == lastNumber)
throw new Exception("排宰总头数多于过磅头数");
var dbCurrentNumber = OrderDetailRpc.GetCurrentOrderPlanNumber(lastOrderDetail.ID);
if (lastOrderDetail.PlanNumber == dbCurrentNumber)
return;
if (lastOrderDetail.PlanNumber == 0)
{


+ 26
- 22
QualityAndOrder/QualityOrderFormForTab3.cs View File

@ -1,5 +1,6 @@
using BO.BO.Bill;
using BO.Utils.BillRpc;
using BWP.WinFormControl;
using System;
using System.Collections.Generic;
using System.Drawing;
@ -13,12 +14,11 @@ namespace QualityAndOrder
{
partial class QualityOrderForm
{
List<OrderDetail> orderList3;
List<SelectHurryList> hurryList;
Thread bt3SyncTask;
void Tab3Init()
{
tab3DateSelect.Date = DateTime.Today;
orderGrid3.AutoGenerateColumns = false;
orderGrid3.DataSource = null;
@ -60,9 +60,9 @@ namespace QualityAndOrder
void InputHurryNumber(string input)
{
if (lastOrder3Detail == null)
if (lastHurry == null)
throw new Exception("请选择一条排宰明细");
lastOrder3Detail.HurryNumber = GetAfterNumber(lastOrder3Detail.HurryNumber, input) ?? 0;
lastHurry.HurryNumber = GetAfterNumber(lastHurry.HurryNumber, input) ?? 0;
orderGrid3.Refresh();
}
@ -95,23 +95,23 @@ namespace QualityAndOrder
}
}
OrderDetail lastOrder3Detail;
SelectHurryList lastHurry;
private void BindOrderGrid3()
{
orderList3 = OrderDetailRpc.GetOrderDetail(tab3DateSelect.Date.Value, true);
if (lastOrder3Detail != null)
hurryList = OrderDetailRpc.GetSelectHurryList(butcherDateInput.Date.Value);
if (lastHurry != null)
{
var t = orderList3.FirstOrDefault(x => x.ID == lastOrder3Detail.ID);
var t = hurryList.FirstOrDefault(x => x.WeightBill_ID == lastHurry.WeightBill_ID);
if (t != null)
t.HurryNumber = lastOrder3Detail.HurryNumber;
t.HurryNumber = lastHurry.HurryNumber;
}
orderGrid3.DataSource = orderList3.OrderByDescending(x => x.Order).ToList();
orderGrid3.DataSource = hurryList.OrderByDescending(x => x.B3WeighBill_ID).ToList();
foreach (DataGridViewRow row in orderGrid3.Rows)
{
if (lastOrder3Detail != null && lastOrder3Detail.ID == (long)row.Cells["H_ID"].Value)
if (lastHurry != null && lastHurry.WeightBill_ID == (long)row.Cells["H_WeightBill_ID"].Value)
{
lastOrder3Detail = row.DataBoundItem as OrderDetail;
lastHurry = row.DataBoundItem as SelectHurryList;
row.DefaultCellStyle.BackColor = orderGrid3.RowsDefaultCellStyle.SelectionBackColor;
}
}
@ -137,21 +137,25 @@ namespace QualityAndOrder
return;
if (e.ColumnIndex == orderGrid3.ColumnCount - 2)//确定
{
if (lastOrder3Detail.HurryNumber == 0)
if (lastHurry.HurryNumber == 0)
return;
if (lastOrder3Detail.HurryNumber > lastOrder3Detail.PlanNumber)
if (lastHurry.HurryNumber > lastHurry.WeightNumber)
throw new Exception("急宰头数多余排宰头数");
var record = OrderDetailRpc.InsertHurryRecord(lastOrder3Detail);
lastOrder3Detail.HurryNumber = OrderDetailRpc.GetHurryRecordNumber(lastOrder3Detail.ID);
bool hasError = false;
var record = OrderDetailRpc.InsertHurryRecord(lastHurry,out hasError);
record.TotalNumber = lastHurry.WeightNumber;
if (hasError)
UMessageBox.Show("排宰顺序出现多条记录,请手动修改", "注意");
lastHurry.HurryNumber = OrderDetailRpc.GetHurryRecordNumber(lastHurry.WeightBill_ID);
orderGrid3.Refresh();
HurryRecordPrint.Print(record);
}
else//查看
{
var view = new HurryRecordView(lastOrder3Detail.ID);
var view = new HurryRecordView(lastHurry.WeightBill_ID, lastHurry.WeightNumber);
if (view.ShowDialog() == DialogResult.OK)
{
lastOrder3Detail.HurryNumber -= view.Result;
lastHurry.HurryNumber -= view.Result;
orderGrid3.Refresh();
}
}
@ -161,20 +165,20 @@ namespace QualityAndOrder
{
if (e.RowIndex == -1)
return;
var entity = orderGrid3.CurrentRow.DataBoundItem as OrderDetail;
var entity = orderGrid3.CurrentRow.DataBoundItem as SelectHurryList;
if (lastOrder3Detail != null)
if (lastHurry != null)
{
foreach (DataGridViewRow row in orderGrid3.Rows)
{
if (lastOrder3Detail.ID == (long)row.Cells["H_ID"].Value)
if (lastHurry.WeightBill_ID == (long)row.Cells["H_WeightBill_ID"].Value)
{
row.DefaultCellStyle.BackColor = orderGrid3.RowsDefaultCellStyle.BackColor;
break;
}
}
}
lastOrder3Detail = entity;
lastHurry = entity;
if (e.ColumnIndex != orderGrid3.Columns.Count - 2)//非确定列
orderGrid3.Refresh();
}


BIN
Setup/Release/Setup.msi View File


+ 69
- 103
Setup/Setup.vdproj View File

@ -39,6 +39,12 @@
}
"Entry"
{
"MsmKey" = "8:_22C665F6A7E140C3B3377CF2EAD48C09"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_2C2942BD572A3CAA8721DF87BDC15062"
"OwnerKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44"
"MsmSig" = "8:_UNDEFINED"
@ -75,12 +81,6 @@
}
"Entry"
{
"MsmKey" = "8:_38D34C00AC7904E5D01A35ECF223BE06"
"OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_490CF6B031F04EA68BE52D3A7EB5FEF9"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@ -111,26 +111,14 @@
}
"Entry"
{
"MsmKey" = "8:_863A403291F0637680FF1E9D313B477D"
"OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44"
"OwnerKey" = "8:_EE17E053D2DAEC8711E3F47FB9870675"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44"
"OwnerKey" = "8:_38D34C00AC7904E5D01A35ECF223BE06"
"OwnerKey" = "8:_D4A570E8506CE9B608EA798211060C3A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44"
"OwnerKey" = "8:_863A403291F0637680FF1E9D313B477D"
"OwnerKey" = "8:_EE17E053D2DAEC8711E3F47FB9870675"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -141,12 +129,6 @@
}
"Entry"
{
"MsmKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44"
"OwnerKey" = "8:_D4A570E8506CE9B608EA798211060C3A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_C4609315564A5A79DE9CC35B7F0552D9"
"OwnerKey" = "8:_3889C054825438E9FCA8AD0745ADE017"
"MsmSig" = "8:_UNDEFINED"
@ -172,6 +154,12 @@
"Entry"
{
"MsmKey" = "8:_D4A570E8506CE9B608EA798211060C3A"
"OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_D4A570E8506CE9B608EA798211060C3A"
"OwnerKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF"
"MsmSig" = "8:_UNDEFINED"
}
@ -208,6 +196,12 @@
"Entry"
{
"MsmKey" = "8:_EE17E053D2DAEC8711E3F47FB9870675"
"OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_EE17E053D2DAEC8711E3F47FB9870675"
"OwnerKey" = "8:_72C299799A4A4FCE805FFC4FC20FAFEF"
"MsmSig" = "8:_UNDEFINED"
}
@ -231,6 +225,12 @@
}
"Entry"
{
"MsmKey" = "8:_FAF55378A3FC4DAA86CA8CD6FCE44943"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_5028DE72CC42424CB6B2165E77BED521"
"MsmSig" = "8:_UNDEFINED"
@ -238,19 +238,19 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850"
"OwnerKey" = "8:_D4A570E8506CE9B608EA798211060C3A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_38D34C00AC7904E5D01A35ECF223BE06"
"OwnerKey" = "8:_EE17E053D2DAEC8711E3F47FB9870675"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_863A403291F0637680FF1E9D313B477D"
"OwnerKey" = "8:_E562E4F2F1D44477985FD09F62884850"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@ -316,18 +316,6 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_D4A570E8506CE9B608EA798211060C3A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_EE17E053D2DAEC8711E3F47FB9870675"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_B110F71EA45DE28B9A91C6C8EC87BC44"
"MsmSig" = "8:_UNDEFINED"
}
@ -494,21 +482,10 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_2C2942BD572A3CAA8721DF87BDC15062"
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_22C665F6A7E140C3B3377CF2EAD48C09"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Forks.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_2C2942BD572A3CAA8721DF87BDC15062"
{
"Name" = "8:Forks.Json.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Forks.Json.dll"
"TargetName" = "8:"
"SourcePath" = "8:..\\BWP.WinFormControl\\bin\\Debug\\Winpplb.dll"
"TargetName" = "8:Winpplb.dll"
"Tag" = "8:"
"Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5"
"Condition" = "8:"
@ -522,23 +499,23 @@
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_330D031AE5F223BC187AA689BE72AD7E"
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_2C2942BD572A3CAA8721DF87BDC15062"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:MongoDB.Driver, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL"
"AssemblyAsmDisplayName" = "8:Forks.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_330D031AE5F223BC187AA689BE72AD7E"
"_2C2942BD572A3CAA8721DF87BDC15062"
{
"Name" = "8:MongoDB.Driver.dll"
"Name" = "8:Forks.Json.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:MongoDB.Driver.dll"
"SourcePath" = "8:Forks.Json.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5"
@ -556,20 +533,20 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_3889C054825438E9FCA8AD0745ADE017"
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_330D031AE5F223BC187AA689BE72AD7E"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"
"AssemblyAsmDisplayName" = "8:MongoDB.Driver, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_3889C054825438E9FCA8AD0745ADE017"
"_330D031AE5F223BC187AA689BE72AD7E"
{
"Name" = "8:Forks.EnterpriseServices.dll"
"Name" = "8:MongoDB.Driver.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Forks.EnterpriseServices.dll"
"SourcePath" = "8:MongoDB.Driver.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5"
@ -587,20 +564,20 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_38D34C00AC7904E5D01A35ECF223BE06"
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_3889C054825438E9FCA8AD0745ADE017"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:BWP.WinFormControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
"AssemblyAsmDisplayName" = "8:Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_38D34C00AC7904E5D01A35ECF223BE06"
"_3889C054825438E9FCA8AD0745ADE017"
{
"Name" = "8:BWP.WinFormControl.DLL"
"Name" = "8:Forks.EnterpriseServices.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:BWP.WinFormControl.DLL"
"SourcePath" = "8:Forks.EnterpriseServices.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5"
@ -742,37 +719,6 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_863A403291F0637680FF1E9D313B477D"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:BO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_863A403291F0637680FF1E9D313B477D"
{
"Name" = "8:BO.DLL"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:BO.DLL"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B110F71EA45DE28B9A91C6C8EC87BC44"
{
"AssemblyRegister" = "3:1"
@ -959,6 +905,26 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FAF55378A3FC4DAA86CA8CD6FCE44943"
{
"SourcePath" = "8:..\\BWP.WinFormControl\\bin\\Debug\\WinPort.dll"
"TargetName" = "8:WinPort.dll"
"Tag" = "8:"
"Folder" = "8:_BEB5263E66544AA0ADFECA514F610FF5"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
}
"FileType"
{
@ -1027,7 +993,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:青花瓷屠宰场管理"
"ProductCode" = "8:{B80B0D89-2840-4465-ADFA-EC99FF1D4819}"
"PackageCode" = "8:{1B57BA98-8443-44E5-9E9B-804B44C343BF}"
"PackageCode" = "8:{3F7F6DA0-BB50-49F8-BCAE-59B39B1B33C7}"
"UpgradeCode" = "8:{36F49E93-1C91-49B0-BB59-9984FC596D30}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"


+ 36
- 0
TrunksIousOutInStore/Properties/AssemblyInfo.cs View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("TrunksIousOutInStore")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TrunksIousOutInStore")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("4786a544-10f4-45c0-9e78-540914c2ce9d")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71
- 0
TrunksIousOutInStore/TrunksIousOutInStore.csproj View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4786A544-10F4-45C0-9E78-540914C2CE9D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TrunksIousOutInStore</RootNamespace>
<AssemblyName>TrunksIousOutInStore</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TrunksIousOutInStoreForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="TrunksIousOutInStoreForm.Designer.cs">
<DependentUpon>TrunksIousOutInStoreForm.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="TrunksIousOutInStoreForm.resx">
<DependentUpon>TrunksIousOutInStoreForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BO\BO.csproj">
<Project>{8968f14a-c7c7-4751-96ce-b114fbfd65ef}</Project>
<Name>BO</Name>
</ProjectReference>
<ProjectReference Include="..\BWP.WinFormControl\BWP.WinFormControl.csproj">
<Project>{a782b23e-be6d-4f51-b5cb-5cd259ba97cc}</Project>
<Name>BWP.WinFormControl</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

+ 419
- 0
TrunksIousOutInStore/TrunksIousOutInStoreForm.Designer.cs View File

@ -0,0 +1,419 @@
namespace TrunksIousOutInStore
{
partial class TrunksIousOutInStoreForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1 = new System.Windows.Forms.Panel();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.label1 = new System.Windows.Forms.Label();
this.weightControl1 = new BWP.WinFormControl.WeightControl();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.btnSyncData = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.uComboBox1 = new BWP.WinFormControl.UComboBox();
this.btnSubmit = new System.Windows.Forms.Button();
this.btnCreateBill = new System.Windows.Forms.Button();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.uDataGridView1 = new BWP.WinFormControl.UDataGridView();
this.uDataGridView2 = new BWP.WinFormControl.UDataGridView();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView2)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.panel1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1276, 831);
this.splitContainer1.SplitterDistance = 112;
this.splitContainer1.SplitterWidth = 1;
this.splitContainer1.TabIndex = 0;
//
// panel1
//
this.panel1.Controls.Add(this.richTextBox1);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.weightControl1);
this.panel1.Controls.Add(this.button1);
this.panel1.Location = new System.Drawing.Point(11, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1251, 100);
this.panel1.TabIndex = 1;
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(426, 5);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(277, 90);
this.richTextBox1.TabIndex = 2;
this.richTextBox1.Text = "";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(314, 33);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(106, 24);
this.label1.TabIndex = 1;
this.label1.Text = "扫码区:";
//
// weightControl1
//
this.weightControl1.Location = new System.Drawing.Point(3, 5);
this.weightControl1.Name = "weightControl1";
this.weightControl1.Size = new System.Drawing.Size(156, 92);
this.weightControl1.TabIndex = 0;
this.weightControl1.TypeOfWeight = BWP.WinFormControl.WeightType.Xk3190A9;
this.weightControl1.ValueFormat = "0.00";
//
// splitContainer2
//
this.splitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.uComboBox1);
this.splitContainer2.Panel1.Controls.Add(this.label2);
this.splitContainer2.Panel1.Controls.Add(this.btnCreateBill);
this.splitContainer2.Panel1.Controls.Add(this.btnSubmit);
this.splitContainer2.Panel1.Controls.Add(this.btnSyncData);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer2.Size = new System.Drawing.Size(1276, 718);
this.splitContainer2.SplitterDistance = 261;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 0;
//
// splitContainer3
//
this.splitContainer3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1014, 718);
this.splitContainer3.SplitterDistance = 726;
this.splitContainer3.SplitterWidth = 1;
this.splitContainer3.TabIndex = 0;
//
// btnSyncData
//
this.btnSyncData.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSyncData.Location = new System.Drawing.Point(45, 15);
this.btnSyncData.Name = "btnSyncData";
this.btnSyncData.Size = new System.Drawing.Size(156, 46);
this.btnSyncData.TabIndex = 0;
this.btnSyncData.Text = "同步数据";
this.btnSyncData.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(45, 117);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(106, 24);
this.label2.TabIndex = 1;
this.label2.Text = "白条状态";
//
// uComboBox1
//
this.uComboBox1.CodeArgs = null;
this.uComboBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.uComboBox1.EnableTopItem = true;
this.uComboBox1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uComboBox1.FormattingEnabled = true;
this.uComboBox1.Location = new System.Drawing.Point(49, 144);
this.uComboBox1.Name = "uComboBox1";
this.uComboBox1.Range = 10;
this.uComboBox1.Size = new System.Drawing.Size(158, 36);
this.uComboBox1.TabIndex = 2;
//
// btnSubmit
//
this.btnSubmit.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSubmit.Location = new System.Drawing.Point(45, 259);
this.btnSubmit.Name = "btnSubmit";
this.btnSubmit.Size = new System.Drawing.Size(156, 46);
this.btnSubmit.TabIndex = 0;
this.btnSubmit.Text = "提交";
this.btnSubmit.UseVisualStyleBackColor = true;
//
// btnCreateBill
//
this.btnCreateBill.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCreateBill.Location = new System.Drawing.Point(45, 368);
this.btnCreateBill.Name = "btnCreateBill";
this.btnCreateBill.Size = new System.Drawing.Size(156, 46);
this.btnCreateBill.TabIndex = 0;
this.btnCreateBill.Text = "创建领料";
this.btnCreateBill.UseVisualStyleBackColor = true;
//
// splitContainer4
//
this.splitContainer4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
this.splitContainer4.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.groupBox2);
this.splitContainer4.Panel1.Controls.Add(this.groupBox1);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.groupBox3);
this.splitContainer4.Size = new System.Drawing.Size(726, 718);
this.splitContainer4.SplitterDistance = 359;
this.splitContainer4.SplitterWidth = 1;
this.splitContainer4.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(718, 351);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox2.Controls.Add(this.uDataGridView1);
this.groupBox2.Location = new System.Drawing.Point(3, 2);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(718, 351);
this.groupBox2.TabIndex = 0;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "待提交明细";
//
// groupBox3
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.uDataGridView2);
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(718, 351);
this.groupBox3.TabIndex = 0;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "产品明细";
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(1158, 22);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(90, 46);
this.button1.TabIndex = 0;
this.button1.Text = "称设置";
this.button1.UseVisualStyleBackColor = true;
//
// uDataGridView1
//
this.uDataGridView1.AllowUserToAddRows = false;
this.uDataGridView1.AllowUserToDeleteRows = false;
this.uDataGridView1.AllowUserToResizeColumns = false;
this.uDataGridView1.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.uDataGridView1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.uDataGridView1.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.uDataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.uDataGridView1.Location = new System.Drawing.Point(3, 17);
this.uDataGridView1.MultiSelect = false;
this.uDataGridView1.Name = "uDataGridView1";
this.uDataGridView1.ReadOnly = true;
this.uDataGridView1.RowHeadersVisible = false;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.uDataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.uDataGridView1.RowTemplate.Height = 23;
this.uDataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView1.Size = new System.Drawing.Size(712, 331);
this.uDataGridView1.TabIndex = 0;
//
// uDataGridView2
//
this.uDataGridView2.AllowUserToAddRows = false;
this.uDataGridView2.AllowUserToDeleteRows = false;
this.uDataGridView2.AllowUserToResizeColumns = false;
this.uDataGridView2.AllowUserToResizeRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.uDataGridView2.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.uDataGridView2.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.uDataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.uDataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.uDataGridView2.Dock = System.Windows.Forms.DockStyle.Fill;
this.uDataGridView2.Location = new System.Drawing.Point(3, 17);
this.uDataGridView2.MultiSelect = false;
this.uDataGridView2.Name = "uDataGridView2";
this.uDataGridView2.ReadOnly = true;
this.uDataGridView2.RowHeadersVisible = false;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.uDataGridView2.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.uDataGridView2.RowTemplate.Height = 23;
this.uDataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.uDataGridView2.Size = new System.Drawing.Size(712, 331);
this.uDataGridView2.TabIndex = 0;
//
// TrunksIousOutInStoreForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1276, 831);
this.Controls.Add(this.splitContainer1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "TrunksIousOutInStoreForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "胴体白条出入库";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel1.PerformLayout();
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
this.splitContainer3.ResumeLayout(false);
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.uDataGridView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.uDataGridView2)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Label label1;
private BWP.WinFormControl.WeightControl weightControl1;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.Button btnSyncData;
private System.Windows.Forms.SplitContainer splitContainer3;
private BWP.WinFormControl.UComboBox uComboBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnCreateBill;
private System.Windows.Forms.Button btnSubmit;
private System.Windows.Forms.SplitContainer splitContainer4;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Button button1;
private BWP.WinFormControl.UDataGridView uDataGridView1;
private BWP.WinFormControl.UDataGridView uDataGridView2;
}
}

+ 19
- 0
TrunksIousOutInStore/TrunksIousOutInStoreForm.cs View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TrunksIousOutInStore
{
public partial class TrunksIousOutInStoreForm : Form
{
public TrunksIousOutInStoreForm()
{
InitializeComponent();
}
}
}

+ 120
- 0
TrunksIousOutInStore/TrunksIousOutInStoreForm.resx View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

+ 20
- 3
WeighAndGrading/BodyDiscontSetting.cs View File

@ -1,5 +1,6 @@
using BO;
using BO.BO.BaseInfo;
using BO.Utils;
using BO.Utils.BillRpc;
using BWP.WinFormControl;
using System;
@ -7,6 +8,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -17,10 +19,12 @@ namespace WeighAndGrading
public partial class BodyDiscontSetting : Form
{
List<BodyDiscontItem> list;
string fileName;
public BodyDiscontSetting()
{
InitializeComponent();
list = GradeAndWeightRpc.GetBodyDiscontItem().OrderBy(x => x.ID).ToList();
fileName = Path.Combine(GradeFrom.DATA_PATH, "Disconts.xml");
list = XmlUtil.DeserializeFromFile<List<BodyDiscontItem>>(fileName);
uDataGridView1.DataSource = list;
uDataGridView1.Refresh();
}
@ -34,7 +38,19 @@ namespace WeighAndGrading
var entity = row.DataBoundItem as BodyDiscontItem;
list.Add(new CTuple<long, decimal?>(entity.ID, entity.Discont));
}
GradeAndWeightRpc.SaveBodyDiscontItem(list);
XmlUtil.SerializerObjToFile(list, fileName);
var changeFlagPath = Path.Combine(GradeFrom.DATA_PATH, "DiscontsChanged.txt");
bool existFile = File.Exists(changeFlagPath);
var connection = LoginRpcUtil.TestConnection();
if (connection)
{
GradeAndWeightRpc.SaveBodyDiscontItem(list);
if (existFile)
File.Delete(changeFlagPath);
}
else if (!existFile)
File.WriteAllText(changeFlagPath, string.Empty);
if (!changed)
changed = true;
MessageBox.Show("保存成功!");
@ -42,7 +58,8 @@ namespace WeighAndGrading
private void closeBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
if (changed)
DialogResult = DialogResult.OK;
this.Close();
}


+ 0
- 5
WeighAndGrading/GradeContext.cs View File

@ -11,12 +11,7 @@ namespace WeighAndGrading
{
public static class GradeContext
{
//#if debug
//private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\GradeConfig.xml";
//#endif
//#if !debug
private static string loginConfigPath = Application.StartupPath + "\\GradeConfig.xml";
//#endif
private static GradeConfig _config;
public static GradeConfig Config
{


+ 390
- 10
WeighAndGrading/GradeFrom.Designer.cs View File

@ -30,13 +30,20 @@
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.syncBtn = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
@ -44,11 +51,29 @@
this.label4 = new System.Windows.Forms.Label();
this.alreadyLabel = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.tangScrollBar = new System.Windows.Forms.VScrollBar();
this.ttPanel = new System.Windows.Forms.FlowLayoutPanel();
this.label10 = new System.Windows.Forms.Label();
this.tangGridView = new BWP.WinFormControl.UDataGridView();
this.T_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Finish = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_Already = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.T_FinishBtn = new System.Windows.Forms.DataGridViewButtonColumn();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.maoScrollBar = new System.Windows.Forms.VScrollBar();
this.maoGridView = new BWP.WinFormControl.UDataGridView();
this.M_OrderDetail_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Finish = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Number = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_Already = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.M_FinishBtn = new System.Windows.Forms.DataGridViewButtonColumn();
this.label11 = new System.Windows.Forms.Label();
this.mbPanel = new System.Windows.Forms.FlowLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.vScrollBar2 = new System.Windows.Forms.VScrollBar();
this.label12 = new System.Windows.Forms.Label();
this.historyGrid = new BWP.WinFormControl.UDataGridView();
this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -59,7 +84,6 @@
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.vScrollBar2 = new System.Windows.Forms.VScrollBar();
this.enableWeight = new System.Windows.Forms.CheckBox();
this.isPrintCheckBox = new System.Windows.Forms.CheckBox();
this.printBtn = new System.Windows.Forms.Button();
@ -84,13 +108,25 @@
this.discontBtn = new System.Windows.Forms.Button();
this.discontPanel = new System.Windows.Forms.FlowLayoutPanel();
this.vScrollBar1 = new System.Windows.Forms.VScrollBar();
this.statePic = new System.Windows.Forms.PictureBox();
this.H_SID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.maoGridView)).BeginInit();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.historyGrid)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.modifyPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.statePic)).BeginInit();
this.SuspendLayout();
//
// label1
@ -119,6 +155,7 @@
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("宋体", 15F);
this.label2.Location = new System.Drawing.Point(511, 131);
this.label2.Location = new System.Drawing.Point(443, 136);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(109, 20);
this.label2.TabIndex = 5;
@ -129,6 +166,7 @@
this.orderLabel.AutoSize = true;
this.orderLabel.Font = new System.Drawing.Font("宋体", 15F);
this.orderLabel.Location = new System.Drawing.Point(616, 131);
this.orderLabel.Location = new System.Drawing.Point(548, 136);
this.orderLabel.Name = "orderLabel";
this.orderLabel.Size = new System.Drawing.Size(19, 20);
this.orderLabel.TabIndex = 6;
@ -139,6 +177,7 @@
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 15F);
this.label4.Location = new System.Drawing.Point(675, 131);
this.label4.Location = new System.Drawing.Point(599, 136);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(109, 20);
this.label4.TabIndex = 7;
@ -149,6 +188,7 @@
this.alreadyLabel.AutoSize = true;
this.alreadyLabel.Font = new System.Drawing.Font("宋体", 15F);
this.alreadyLabel.Location = new System.Drawing.Point(776, 131);
this.alreadyLabel.Location = new System.Drawing.Point(700, 136);
this.alreadyLabel.Name = "alreadyLabel";
this.alreadyLabel.Size = new System.Drawing.Size(19, 20);
this.alreadyLabel.TabIndex = 8;
@ -156,32 +196,253 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.tangScrollBar);
this.groupBox1.Controls.Add(this.ttPanel);
this.groupBox1.Location = new System.Drawing.Point(505, 175);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.tangGridView);
this.groupBox1.Location = new System.Drawing.Point(16, 175);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(294, 330);
this.groupBox1.Size = new System.Drawing.Size(783, 330);
this.groupBox1.TabIndex = 9;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "烫褪";
//
// tangScrollBar
//
this.tangScrollBar.Location = new System.Drawing.Point(373, 36);
this.tangScrollBar.Name = "tangScrollBar";
this.tangScrollBar.Size = new System.Drawing.Size(40, 275);
this.tangScrollBar.TabIndex = 51;
//
// ttPanel
//
this.ttPanel.Location = new System.Drawing.Point(12, 36);
this.ttPanel.Location = new System.Drawing.Point(431, 35);
this.ttPanel.Name = "ttPanel";
this.ttPanel.Size = new System.Drawing.Size(270, 276);
this.ttPanel.Size = new System.Drawing.Size(337, 276);
this.ttPanel.TabIndex = 0;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("宋体", 15F);
this.label10.Location = new System.Drawing.Point(6, -1);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(49, 20);
this.label10.TabIndex = 32;
this.label10.Text = "烫褪";
//
// tangGridView
//
this.tangGridView.AllowUserToAddRows = false;
this.tangGridView.AllowUserToDeleteRows = false;
this.tangGridView.AllowUserToResizeColumns = false;
this.tangGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tangGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.tangGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.tangGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.tangGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.tangGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.T_OrderDetail_ID,
this.T_Finish,
this.T_Order,
this.T_Number,
this.T_Already,
this.T_FinishBtn});
this.tangGridView.Location = new System.Drawing.Point(10, 36);
this.tangGridView.MultiSelect = false;
this.tangGridView.Name = "tangGridView";
this.tangGridView.ReadOnly = true;
this.tangGridView.RowHeadersVisible = false;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.Black;
this.tangGridView.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.tangGridView.RowTemplate.Height = 60;
this.tangGridView.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.tangGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.tangGridView.Size = new System.Drawing.Size(363, 275);
this.tangGridView.TabIndex = 4;
this.tangGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.tangGridView_CellClick);
this.tangGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.tangGridView_CellContentClick);
//
// T_OrderDetail_ID
//
this.T_OrderDetail_ID.DataPropertyName = "OrderDetail_ID";
this.T_OrderDetail_ID.HeaderText = "OrderDetail_ID";
this.T_OrderDetail_ID.Name = "T_OrderDetail_ID";
this.T_OrderDetail_ID.ReadOnly = true;
this.T_OrderDetail_ID.Visible = false;
//
// T_Finish
//
this.T_Finish.DataPropertyName = "Finish";
this.T_Finish.HeaderText = "Finish";
this.T_Finish.Name = "T_Finish";
this.T_Finish.ReadOnly = true;
this.T_Finish.Visible = false;
//
// T_Order
//
this.T_Order.DataPropertyName = "Order";
this.T_Order.HeaderText = "屠宰顺序";
this.T_Order.Name = "T_Order";
this.T_Order.ReadOnly = true;
//
// T_Number
//
this.T_Number.DataPropertyName = "Number";
this.T_Number.HeaderText = "头数";
this.T_Number.Name = "T_Number";
this.T_Number.ReadOnly = true;
this.T_Number.Width = 80;
//
// T_Already
//
this.T_Already.DataPropertyName = "Already";
this.T_Already.HeaderText = "已宰";
this.T_Already.Name = "T_Already";
this.T_Already.ReadOnly = true;
this.T_Already.Width = 80;
//
// T_FinishBtn
//
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.T_FinishBtn.DefaultCellStyle = dataGridViewCellStyle3;
this.T_FinishBtn.HeaderText = "完毕";
this.T_FinishBtn.Name = "T_FinishBtn";
this.T_FinishBtn.ReadOnly = true;
this.T_FinishBtn.Text = "完毕";
this.T_FinishBtn.UseColumnTextForButtonValue = true;
//
// groupBox2
//
this.groupBox2.Controls.Add(this.maoScrollBar);
this.groupBox2.Controls.Add(this.maoGridView);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.mbPanel);
this.groupBox2.Location = new System.Drawing.Point(505, 525);
this.groupBox2.Location = new System.Drawing.Point(16, 525);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(294, 330);
this.groupBox2.Size = new System.Drawing.Size(783, 330);
this.groupBox2.TabIndex = 10;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "毛剥";
//
// maoScrollBar
//
this.maoScrollBar.Location = new System.Drawing.Point(373, 35);
this.maoScrollBar.Name = "maoScrollBar";
this.maoScrollBar.Size = new System.Drawing.Size(40, 278);
this.maoScrollBar.TabIndex = 52;
//
// maoGridView
//
this.maoGridView.AllowUserToAddRows = false;
this.maoGridView.AllowUserToDeleteRows = false;
this.maoGridView.AllowUserToResizeColumns = false;
this.maoGridView.AllowUserToResizeRows = false;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.maoGridView.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
this.maoGridView.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.maoGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
this.maoGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.maoGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.M_OrderDetail_ID,
this.M_Finish,
this.M_Order,
this.M_Number,
this.M_Already,
this.M_FinishBtn});
this.maoGridView.Location = new System.Drawing.Point(10, 35);
this.maoGridView.MultiSelect = false;
this.maoGridView.Name = "maoGridView";
this.maoGridView.ReadOnly = true;
this.maoGridView.RowHeadersVisible = false;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.Color.Black;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.Black;
this.maoGridView.RowsDefaultCellStyle = dataGridViewCellStyle8;
this.maoGridView.RowTemplate.Height = 60;
this.maoGridView.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
this.maoGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.maoGridView.Size = new System.Drawing.Size(363, 278);
this.maoGridView.TabIndex = 33;
this.maoGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.maoGridView_CellClick);
this.maoGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.maoGridView_CellContentClick);
//
// M_OrderDetail_ID
//
this.M_OrderDetail_ID.DataPropertyName = "OrderDetail_ID";
this.M_OrderDetail_ID.HeaderText = "OrderDetail_ID";
this.M_OrderDetail_ID.Name = "M_OrderDetail_ID";
this.M_OrderDetail_ID.ReadOnly = true;
this.M_OrderDetail_ID.Visible = false;
//
// M_Finish
//
this.M_Finish.DataPropertyName = "Finish";
this.M_Finish.HeaderText = "Finish";
this.M_Finish.Name = "M_Finish";
this.M_Finish.ReadOnly = true;
this.M_Finish.Visible = false;
//
// M_Order
//
this.M_Order.DataPropertyName = "Order";
this.M_Order.HeaderText = "屠宰顺序";
this.M_Order.Name = "M_Order";
this.M_Order.ReadOnly = true;
//
// M_Number
//
this.M_Number.DataPropertyName = "Number";
this.M_Number.HeaderText = "头数";
this.M_Number.Name = "M_Number";
this.M_Number.ReadOnly = true;
this.M_Number.Width = 80;
//
// M_Already
//
this.M_Already.DataPropertyName = "Already";
this.M_Already.HeaderText = "已宰";
this.M_Already.Name = "M_Already";
this.M_Already.ReadOnly = true;
this.M_Already.Width = 80;
//
// M_FinishBtn
//
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.Padding = new System.Windows.Forms.Padding(5, 10, 5, 10);
this.M_FinishBtn.DefaultCellStyle = dataGridViewCellStyle7;
this.M_FinishBtn.HeaderText = "完毕";
this.M_FinishBtn.Name = "M_FinishBtn";
this.M_FinishBtn.ReadOnly = true;
this.M_FinishBtn.Text = "完毕";
this.M_FinishBtn.UseColumnTextForButtonValue = true;
//
// label11
//
this.label11.AutoSize = true;
@ -195,12 +456,15 @@
// mbPanel
//
this.mbPanel.Location = new System.Drawing.Point(12, 37);
this.mbPanel.Location = new System.Drawing.Point(431, 35);
this.mbPanel.Name = "mbPanel";
this.mbPanel.Size = new System.Drawing.Size(270, 276);
this.mbPanel.Size = new System.Drawing.Size(337, 278);
this.mbPanel.TabIndex = 1;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.vScrollBar2);
this.groupBox3.Controls.Add(this.label12);
this.groupBox3.Controls.Add(this.historyGrid);
this.groupBox3.Location = new System.Drawing.Point(826, 175);
@ -210,6 +474,13 @@
this.groupBox3.TabStop = false;
this.groupBox3.Text = "记录";
//
// vScrollBar2
//
this.vScrollBar2.Location = new System.Drawing.Point(425, 36);
this.vScrollBar2.Name = "vScrollBar2";
this.vScrollBar2.Size = new System.Drawing.Size(40, 566);
this.vScrollBar2.TabIndex = 52;
//
// label12
//
this.label12.AutoSize = true;
@ -228,6 +499,8 @@
this.historyGrid.AllowUserToResizeRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.historyGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
this.historyGrid.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
@ -237,9 +510,18 @@
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle10.Font = new System.Drawing.Font("宋体", 12F);
dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.historyGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10;
this.historyGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.H_ID,
this.H_SID,
this.H_Livestock_ID,
this.H_ReadWeight,
this.H_Index,
@ -255,6 +537,9 @@
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218)))));
this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle13;
this.historyGrid.RowTemplate.Height = 40;
this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
@ -329,21 +614,17 @@
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// vScrollBar2
//
this.vScrollBar2.Location = new System.Drawing.Point(1248, 143);
this.vScrollBar2.Name = "vScrollBar2";
this.vScrollBar2.Size = new System.Drawing.Size(40, 566);
this.vScrollBar2.TabIndex = 52;
//
// enableWeight
//
this.enableWeight.AutoCheck = false;
this.enableWeight.AutoSize = true;
this.enableWeight.Font = new System.Drawing.Font("宋体", 15F);
this.enableWeight.Location = new System.Drawing.Point(10, 91);
this.enableWeight.Font = new System.Drawing.Font("宋体", 18F);
this.enableWeight.Location = new System.Drawing.Point(12, 91);
this.enableWeight.Name = "enableWeight";
this.enableWeight.Size = new System.Drawing.Size(108, 24);
this.enableWeight.Size = new System.Drawing.Size(125, 28);
this.enableWeight.TabIndex = 31;
this.enableWeight.Text = "启用称重";
this.enableWeight.UseVisualStyleBackColor = true;
@ -564,6 +845,7 @@
this.modifyPanel.Controls.Add(this.cancelBtn);
this.modifyPanel.Controls.Add(this.stateLabel);
this.modifyPanel.Location = new System.Drawing.Point(813, 107);
this.modifyPanel.Location = new System.Drawing.Point(826, 107);
this.modifyPanel.Name = "modifyPanel";
this.modifyPanel.Size = new System.Drawing.Size(438, 56);
this.modifyPanel.TabIndex = 36;
@ -600,19 +882,94 @@
this.discontPanel.TabIndex = 33;
//
// vScrollBar1
// statePic
//
this.vScrollBar1.Location = new System.Drawing.Point(455, 175);
this.vScrollBar1.Name = "vScrollBar1";
this.vScrollBar1.Size = new System.Drawing.Size(40, 566);
this.vScrollBar1.TabIndex = 51;
this.statePic.ErrorImage = null;
this.statePic.InitialImage = null;
this.statePic.Location = new System.Drawing.Point(219, 89);
this.statePic.Name = "statePic";
this.statePic.Size = new System.Drawing.Size(30, 30);
this.statePic.TabIndex = 38;
this.statePic.TabStop = false;
//
// H_SID
//
this.H_SID.DataPropertyName = "SID";
this.H_SID.HeaderText = "SID";
this.H_SID.Name = "H_SID";
this.H_SID.ReadOnly = true;
this.H_SID.Visible = false;
//
// H_Livestock_ID
//
this.H_Livestock_ID.HeaderText = "Livestock_ID";
this.H_Livestock_ID.Name = "H_Livestock_ID";
this.H_Livestock_ID.ReadOnly = true;
this.H_Livestock_ID.Visible = false;
//
// H_ReadWeight
//
this.H_ReadWeight.DataPropertyName = "ReadWeight";
this.H_ReadWeight.HeaderText = "";
this.H_ReadWeight.Name = "H_ReadWeight";
this.H_ReadWeight.ReadOnly = true;
this.H_ReadWeight.Width = 30;
//
// H_Index
//
this.H_Index.DataPropertyName = "Index";
this.H_Index.HeaderText = "序号";
this.H_Index.Name = "H_Index";
this.H_Index.ReadOnly = true;
this.H_Index.Width = 65;
//
// H_Technics
//
this.H_Technics.DataPropertyName = "Technics_Name";
this.H_Technics.HeaderText = "工艺";
this.H_Technics.Name = "H_Technics";
this.H_Technics.ReadOnly = true;
this.H_Technics.Width = 65;
//
// H_Livestock_Name
//
this.H_Livestock_Name.DataPropertyName = "Livestock_Name";
this.H_Livestock_Name.HeaderText = "级别";
this.H_Livestock_Name.Name = "H_Livestock_Name";
this.H_Livestock_Name.ReadOnly = true;
this.H_Livestock_Name.Width = 90;
//
// H_Weight
//
this.H_Weight.DataPropertyName = "Weight";
dataGridViewCellStyle11.Format = "#0.######";
this.H_Weight.DefaultCellStyle = dataGridViewCellStyle11;
this.H_Weight.HeaderText = "重量";
this.H_Weight.Name = "H_Weight";
this.H_Weight.ReadOnly = true;
this.H_Weight.Width = 70;
//
// H_Time
//
this.H_Time.DataPropertyName = "Time";
dataGridViewCellStyle12.Format = "MM/dd HH:mm";
dataGridViewCellStyle12.NullValue = null;
this.H_Time.DefaultCellStyle = dataGridViewCellStyle12;
this.H_Time.HeaderText = "时间";
this.H_Time.Name = "H_Time";
this.H_Time.ReadOnly = true;
//
// GradeFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1362, 741);
this.Controls.Add(this.vScrollBar2);
this.ClientSize = new System.Drawing.Size(1379, 865);
this.Controls.Add(this.vScrollBar1);
this.Controls.Add(this.statePic);
this.Controls.Add(this.discontPanel);
this.Controls.Add(this.discontBtn);
this.Controls.Add(this.modifyPanel);
@ -639,9 +996,13 @@
this.Name = "GradeFrom";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "称重定级";
this.Load += new System.EventHandler(this.GradeFrom_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tangGridView)).EndInit();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.maoGridView)).EndInit();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.historyGrid)).EndInit();
@ -650,6 +1011,7 @@
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.modifyPanel.ResumeLayout(false);
this.modifyPanel.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.statePic)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -661,6 +1023,7 @@
private BWP.WinFormControl.UDatePicker butcherTimeInput;
private System.Windows.Forms.Button syncBtn;
private BWP.WinFormControl.UDataGridView dataGridView;
private BWP.WinFormControl.UDataGridView tangGridView;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label orderLabel;
private System.Windows.Forms.Label label4;
@ -688,6 +1051,23 @@
private System.Windows.Forms.FlowLayoutPanel discontPanel;
private System.Windows.Forms.VScrollBar vScrollBar2;
private System.Windows.Forms.DataGridViewTextBoxColumn H_ID;
private System.Windows.Forms.VScrollBar tangScrollBar;
private System.Windows.Forms.VScrollBar maoScrollBar;
private BWP.WinFormControl.UDataGridView maoGridView;
private System.Windows.Forms.DataGridViewTextBoxColumn T_OrderDetail_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Finish;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Order;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn T_Already;
private System.Windows.Forms.DataGridViewButtonColumn T_FinishBtn;
private System.Windows.Forms.DataGridViewTextBoxColumn M_OrderDetail_ID;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Finish;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Order;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Number;
private System.Windows.Forms.DataGridViewTextBoxColumn M_Already;
private System.Windows.Forms.DataGridViewButtonColumn M_FinishBtn;
private System.Windows.Forms.PictureBox statePic;
private System.Windows.Forms.DataGridViewTextBoxColumn H_SID;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID;
private System.Windows.Forms.DataGridViewCheckBoxColumn H_ReadWeight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Index;


+ 430
- 115
WeighAndGrading/GradeFrom.cs View File

@ -1,4 +1,5 @@
using BO;
using BO.BO.BaseInfo;
using BO.BO.Bill;
using BO.Utils;
using BO.Utils.BillRpc;
@ -10,8 +11,10 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.IO.Ports;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@ -29,19 +32,34 @@ namespace WeighAndGrading
public Form Generate()
{
if (string.IsNullOrEmpty(ButcherAppContext.Context.UrlConfig.OfflineSqlConnection))
throw new Exception("请先设置离线数据库并保存");
if (!LocalGradeAndWeightBL.ConnectionTest())
throw new Exception("离线数据库连接失败");
return this;
}
#endregion
private delegate void InvokeHandler();
List<GradeAndWeight> list;
public const string DATA_PATH = "G_A_W_Data";
const short TANG_TECH = 0;
const short MAO_TECH = 1;
List<GradeAndWeight> tangList;
List<GradeAndWeight> maoList;
List<GradeAndWeight_Detail> details;
List<long> localTang, localMao;
string maoFilePath, tangFilePath;
string discontPath = Path.Combine(DATA_PATH, "Disconts.xml");
bool connection = false;
SerialPort weightPort;
int maxIndex = 0;
ConcurrentQueue<GradeAndWeight_Detail> noLivestockList = new ConcurrentQueue<GradeAndWeight_Detail>();
ConcurrentQueue<GradeAndWeight_Detail> noLivestockList;
ConcurrentQueue<GradeAndWeight_Detail> noWeightList = new ConcurrentQueue<GradeAndWeight_Detail>();
ConcurrentQueue<GradeAndWeight_Detail> noWeightList;
Thread syncWork;
Thread syncToServer;
#region weightNeed
private IDataFormat _dataFormat;
private Thread _inQueryThread;
@ -53,11 +71,18 @@ namespace WeighAndGrading
{
InitializeComponent();
butcherTimeInput.Date = DateTime.Today;
dataGridView.AutoGenerateColumns = false;
dataGridView.DataSource = null;
tangGridView.AutoGenerateColumns = false;
tangGridView.DataSource = null;
maoGridView.AutoGenerateColumns = false;
maoGridView.DataSource = null;
historyGrid.AutoGenerateColumns = false;
if (!Directory.Exists(DATA_PATH))
Directory.CreateDirectory(DATA_PATH);
maoFilePath = Path.Combine(DATA_PATH, "MaoList.xml");
tangFilePath = Path.Combine(DATA_PATH, "TangList.xml");
connection = ButcherAppContext.Context.UserConfig.Connection;
AddLivestockBtn();
BuildDiscontPanel();
BuildDiscontPanel(true);
weightPort = new SerialPort();
this.FormClosing += delegate
{
@ -65,6 +90,8 @@ namespace WeighAndGrading
DisableWeight();
if (syncWork != null && syncWork.IsAlive)
syncWork.Abort();
if (syncToServer != null && syncToServer.IsAlive)
syncToServer.Abort();
};
}
@ -72,10 +99,18 @@ namespace WeighAndGrading
void AddLivestockBtn()
{
var livestocks = BaseInfoRpcUtil.GetLivestockList();
var livestocks = new List<CTuple<long, string, short>>();
var fileName = Path.Combine(DATA_PATH, "Livestocks.xml");
if (connection)
{
livestocks = BaseInfoRpcUtil.GetLivestockList();
XmlUtil.SerializerObjToFile(livestocks, fileName);
}
else
livestocks = XmlUtil.DeserializeFromFile<List<CTuple<long, string, short>>>(fileName);
foreach (var item in livestocks)
{
var btn = new Button() { Name = "_" + item.Item1, Text = item.Item2, Tag = item, Size = new Size(70, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) };
var btn = new Button() { Name = "_" + item.Item1, Text = item.Item2, Tag = item, Size = new Size(90, 75), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 15 }, Font = new Font("宋体", 18) };
btn.Click += (sender, e) =>
{
if (details == null)
@ -91,8 +126,8 @@ namespace WeighAndGrading
modifyDetail.Livestock_ID = livestockTag.Item1;
modifyDetail.Livestock_Name = livestockTag.Item2;
modifyDetail.Technics = livestockTag.Item3;
modifyDetail.Technics_Name = livestockTag.Item3 == 0 ? "烫褪" : "毛剥";
GradeAndWeightRpc.UpdateLivestock(modifyDetail.ID, modifyDetail.Livestock_ID, modifyDetail.Livestock_Name, modifyDetail.Technics, modifyDetail.Technics_Name);
modifyDetail.Technics_Name = livestockTag.Item3 == TANG_TECH ? "烫褪" : "毛剥";
LocalGradeAndWeightBL.Update(modifyDetail, "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name");
historyGrid.Refresh();
modifyDetail = null;
modifyPanel.Hide();
@ -101,11 +136,27 @@ namespace WeighAndGrading
//var name = livestock.Technics == 0 ? "带皮白条" : "去皮白条";
//Print(name, entity.Index);
};
if (item.Item3 == 0)
if (item.Item3 == TANG_TECH)
ttPanel.Controls.Add(btn);
else
mbPanel.Controls.Add(btn);
}
SetMargin(ttPanel);
SetMargin(mbPanel);
}
void SetMargin(FlowLayoutPanel panel)
{
for (var i = 0; i < panel.Controls.Count; i++)
{
var c = panel.Controls[i];
if (i % 3 == 0)//left
c.Margin = new Padding(0, c.Margin.Top, c.Margin.Right, c.Margin.Bottom);
if ((i + 1) % 3 == 0)//right
c.Margin = new Padding(c.Margin.Left, c.Margin.Top, 0, c.Margin.Bottom);
if (i <= 2)//firstRow
c.Margin = new Padding(c.Margin.Left, 0, c.Margin.Right, c.Margin.Bottom);
}
}
private void closeBtn_Click(object sender, EventArgs e)
@ -115,12 +166,7 @@ namespace WeighAndGrading
private void syncBtn_Click(object sender, EventArgs e)
{
list = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value);
BindDataGrid();
tangRow = FindRowSetSelected(tangEntity);
maoRow = FindRowSetSelected(maoEntity);
dataGridView.Refresh();
details = GradeAndWeightRpc.GetDetails(butcherTimeInput.Date.Value, 50);
details = LocalGradeAndWeightBL.GetDetails(butcherTimeInput.Date.Value, 50);
FillQueue();
BindDetailGrid();
if (details.Any())
@ -144,15 +190,12 @@ namespace WeighAndGrading
{
while (true)
{
Thread.Sleep(5000);
this.Invoke(new InvokeHandler(delegate()
{
list = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value);
BindDataGrid();
tangRow = FindRowSetSelected(tangEntity);
maoRow = FindRowSetSelected(maoEntity);
dataGridView.Refresh();
BindTangGrid();
BindMaoGrid();
}));
Thread.Sleep(5000);
}
}
@ -178,25 +221,104 @@ namespace WeighAndGrading
}
}
void BindDataGrid()
void BindTangGrid()
{
VerifyConnection();
if (connection)
{
try
{
tangList = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, true);
}
catch (TimeoutException) { }
}
else
{
if (tangList == null)
tangList = new List<GradeAndWeight>();
}
tangGridView.DataSource = tangList.OrderBy(x => x.Order).OrderBy(x => x.Finish).ToList();
if (tangEntity == null && tangGridView.CurrentRow != null)
{
tangEntity = tangGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (tangEntity.Finish)
tangEntity = null;
}
foreach (DataGridViewRow row in tangGridView.Rows)
{
if ((bool)row.Cells["T_Finish"].Value)
row.DefaultCellStyle.BackColor = Color.YellowGreen;
if (tangEntity != null && tangEntity.OrderDetail_ID == (long)row.Cells["T_OrderDetail_ID"].Value)
{
tangEntity = row.DataBoundItem as GradeAndWeight;
if (tangEntity.Finish)
row.DefaultCellStyle.BackColor = Color.Yellow;
else
row.DefaultCellStyle.BackColor = tangGridView.RowsDefaultCellStyle.SelectionBackColor;
}
}
InitTangScrollBar();
tangGridView.ClearSelection();
try
{
if (tangRoll != -1)
tangGridView.FirstDisplayedScrollingRowIndex = tangRoll;
}
catch
{
tangRoll = -1;
}
tangGridView.Refresh();
}
void BindMaoGrid()
{
dataGridView.DataSource = list.OrderBy(x => x.Order).OrderBy(x => x.Finish).ToList();
foreach (DataGridViewRow row in dataGridView.Rows)
VerifyConnection();
if (connection)
{
try
{
maoList = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, false);
}
catch (TimeoutException) { }
}
else
{
if ((bool)row.Cells["D_Finish"].Value)
if (maoList == null)
maoList = new List<GradeAndWeight>();
}
maoGridView.DataSource = maoList.OrderBy(x => x.Order).OrderBy(x => x.Finish).ToList();
if (maoEntity == null && maoGridView.CurrentRow != null)
{
maoEntity = maoGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (maoEntity.Finish)
maoEntity = null;
}
foreach (DataGridViewRow row in maoGridView.Rows)
{
if ((bool)row.Cells["M_Finish"].Value)
row.DefaultCellStyle.BackColor = Color.YellowGreen;
if (maoEntity != null && maoEntity.OrderDetail_ID == (long)row.Cells["M_OrderDetail_ID"].Value)
{
maoEntity = row.DataBoundItem as GradeAndWeight;
if (maoEntity.Finish)
row.DefaultCellStyle.BackColor = Color.Yellow;
else
row.DefaultCellStyle.BackColor = maoGridView.RowsDefaultCellStyle.SelectionBackColor;
}
}
InitScrollBar1();
dataGridView.ClearSelection();
InitMaoScrollBar();
maoGridView.ClearSelection();
try
{
if (leftRoll != -1)
dataGridView.FirstDisplayedScrollingRowIndex = leftRoll;
if (maoRoll != -1)
maoGridView.FirstDisplayedScrollingRowIndex = maoRoll;
}
catch
{
leftRoll = -1;
maoRoll = -1;
}
maoGridView.Refresh();
}
void BindDetailGrid()
@ -209,7 +331,7 @@ namespace WeighAndGrading
{
foreach (DataGridViewRow row in historyGrid.Rows)
{
if ((long)row.Cells["H_ID"].Value == lastSelectID)
if ((long)row.Cells["H_SID"].Value == lastSelectID)
{
historyGrid.CurrentCell = row.Cells[row.Cells.Count - 1];
break;
@ -465,10 +587,10 @@ namespace WeighAndGrading
lock (_obj)
{
var currentRow = livestock.Item3 == 0 ? tangEntity : maoEntity;
var tech = livestock.Item3 == 0 ? "烫褪" : "毛剥";
var tech = livestock.Item3 == TANG_TECH ? "烫褪" : "毛剥";
GradeAndWeight_Detail first;
if (noLivestockList.TryPeek(out first) && first.Livestock_ID == 0)
if (noLivestockList.TryPeek(out first) && first.Livestock_ID == null)
{
noLivestockList.TryDequeue(out first);
if (currentRow != null)
@ -478,7 +600,13 @@ namespace WeighAndGrading
first.Livestock_Name = livestock.Item2;
first.Technics = livestock.Item3;
first.Technics_Name = tech;
GradeAndWeightRpc.UpdateOrInsertDetail(first, true);
if (disBtn != null)
{
first.Weight = (first.Weight ?? 0) - Convert.ToDecimal(disBtn.Tag);
SetBtnUnCheck(disBtn);
disBtn = null;
}
LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight");
historyGrid.Refresh();
}
else//add
@ -495,10 +623,16 @@ namespace WeighAndGrading
entity.Technics_Name = tech;
entity.Time = DateTime.Now;
entity.Date = butcherTimeInput.Date.Value;
if (disBtn != null)
{
entity.Weight = -Convert.ToDecimal(disBtn.Tag);
SetBtnUnCheck(disBtn);
disBtn = null;
}
if (details.Count == 50)
details.RemoveAt(49);
details.Insert(0, entity);
GradeAndWeightRpc.UpdateOrInsertDetail(entity, true);
LocalGradeAndWeightBL.Insert(entity);
noWeightList.Enqueue(entity);
BindDetailGrid();
}
@ -507,7 +641,7 @@ namespace WeighAndGrading
currentRow.Already = currentRow.Already + 1;
orderLabel.Text = currentRow.Order.ToString();
alreadyLabel.Text = currentRow.Already.ToString();
dataGridView.Refresh();
tangGridView.Refresh();
}
else
{
@ -530,7 +664,7 @@ namespace WeighAndGrading
first.Weight = (first.Weight ?? 0) + weight;
else
first.Weight = weight;
GradeAndWeightRpc.UpdateOrInsertDetail(first);
LocalGradeAndWeightBL.Update(first, "Weight");
historyGrid.Refresh();
}
else//add
@ -544,7 +678,7 @@ namespace WeighAndGrading
if (details.Count == 50)
details.RemoveAt(49);
details.Insert(0, entity);
GradeAndWeightRpc.UpdateOrInsertDetail(entity);
LocalGradeAndWeightBL.Insert(entity);
noLivestockList.Enqueue(entity);
BindDetailGrid();
}
@ -564,10 +698,10 @@ namespace WeighAndGrading
if (e.RowIndex < 0)
return;
var currentRow = historyGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail;
lastSelectID = currentRow.ID;
lastSelectID = currentRow.SID;
if (e.ColumnIndex == 2)
{
if (lastCheckItem != null && lastCheckItem.ID != currentRow.ID)
if (lastCheckItem != null && lastCheckItem.SID != currentRow.SID)
lastCheckItem.ReadWeight = false;
lastCheckItem = currentRow;
lastCheckItem.ReadWeight = !lastCheckItem.ReadWeight;
@ -583,7 +717,7 @@ namespace WeighAndGrading
foreach (var item in details)
{
stack.Push(item);
if (item.ID == lastCheckItem.ID)
if (item.SID == lastCheckItem.SID)
break;
}
while (stack.Count > 0)
@ -601,122 +735,202 @@ namespace WeighAndGrading
modifyPanel.Show();
}
DataGridViewRow tangRow;
DataGridViewRow maoRow;
private void dataGridView_CellClick(object sender, DataGridViewCellEventArgs e)
private void tangGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
var entity = dataGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (entity.Technics_Name == "烫褪")
if (e.ColumnIndex == tangGridView.Columns.Count - 1)
return;
var entity = tangGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (tangEntity != null)
{
if (tangRow != null)
foreach (DataGridViewRow row in tangGridView.Rows)
{
if (tangEntity.Finish)
tangRow.DefaultCellStyle.BackColor = Color.YellowGreen;
else
tangRow.DefaultCellStyle.BackColor = dataGridView.RowsDefaultCellStyle.BackColor;
if (tangEntity.OrderDetail_ID == (long)row.Cells["T_OrderDetail_ID"].Value)
{
row.DefaultCellStyle.BackColor = tangEntity.Finish ? Color.YellowGreen : tangGridView.RowsDefaultCellStyle.BackColor;
break;
}
}
tangRow = dataGridView.CurrentRow;
tangRow.DefaultCellStyle.BackColor = tangRow.DefaultCellStyle.SelectionBackColor = entity.Finish ? Color.YellowGreen : dataGridView.RowsDefaultCellStyle.SelectionBackColor;
tangEntity = entity;
}
tangEntity = entity;
tangGridView.CurrentRow.DefaultCellStyle.SelectionBackColor = tangEntity.Finish ? Color.Yellow : tangGridView.RowsDefaultCellStyle.SelectionBackColor;
tangGridView.Refresh();
}
private void tangGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
if (e.ColumnIndex != tangGridView.ColumnCount - 1)
return;
var entity = tangGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (entity.Finish)
return;
entity.Finish = true;
VerifyConnection();
if (connection)
GradeAndWeightRpc.SetGradeFinish(entity.OrderDetail_ID, TANG_TECH);
else
{
if (maoRow != null)
localTang = XmlUtil.DeserializeFromFile<List<long>>(tangFilePath);
if (!localTang.Contains(entity.OrderDetail_ID))
{
if (maoEntity.Finish)
maoRow.DefaultCellStyle.BackColor = Color.YellowGreen;
else
maoRow.DefaultCellStyle.BackColor = dataGridView.RowsDefaultCellStyle.BackColor;
localTang.Add(entity.OrderDetail_ID);
SaveEntityToLocal(true);
}
maoRow = dataGridView.CurrentRow;
maoRow.DefaultCellStyle.BackColor = maoRow.DefaultCellStyle.SelectionBackColor = entity.Finish ? Color.YellowGreen : Color.Yellow;
maoEntity = entity;
var f = tangList.FirstOrDefault(x => x.OrderDetail_ID == entity.OrderDetail_ID);
if (f != null)
f.Finish = true;
}
BindTangGrid();
}
if (e.ColumnIndex == dataGridView.ColumnCount - 1 && !entity.Finish)
private void maoGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
if (e.ColumnIndex == maoGridView.Columns.Count - 1)
return;
var entity = maoGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (maoEntity != null)
{
entity.Finish = true;
GradeAndWeightRpc.SetGradeFinish(entity.OrderDetail_ID, entity.Technics);
BindDataGrid();
if (entity.Technics == 0)
{
maoRow = FindRowSetSelected(maoEntity);
tangEntity = null;
tangRow = null;
}
else
foreach (DataGridViewRow row in maoGridView.Rows)
{
tangRow = FindRowSetSelected(tangEntity);
maoEntity = null;
maoRow = null;
if (maoEntity.OrderDetail_ID == (long)row.Cells["M_OrderDetail_ID"].Value)
{
row.DefaultCellStyle.BackColor = maoEntity.Finish ? Color.YellowGreen : maoGridView.RowsDefaultCellStyle.BackColor;
break;
}
}
}
dataGridView.Refresh();
maoEntity = entity;
maoGridView.CurrentRow.DefaultCellStyle.SelectionBackColor = maoEntity.Finish ? Color.Yellow : maoGridView.RowsDefaultCellStyle.SelectionBackColor;
maoGridView.Refresh();
}
DataGridViewRow FindRowSetSelected(GradeAndWeight tag)
private void maoGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (tag == null)
return null;
foreach (DataGridViewRow row in dataGridView.Rows)
if (e.RowIndex == -1)
return;
if (e.ColumnIndex != maoGridView.ColumnCount - 1)
return;
var entity = maoGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (entity.Finish)
return;
entity.Finish = true;
VerifyConnection();
if (connection)
GradeAndWeightRpc.SetGradeFinish(entity.OrderDetail_ID, MAO_TECH);
else
{
if ((long)row.Cells["D_OrderDetail_ID"].Value == tag.OrderDetail_ID && (string)row.Cells["D_Technics_Name"].Value == tag.Technics_Name)
localMao = XmlUtil.DeserializeFromFile<List<long>>(maoFilePath);
if (!localMao.Contains(entity.OrderDetail_ID))
{
if (tag.Finish)
row.DefaultCellStyle.BackColor = Color.YellowGreen;
else
row.DefaultCellStyle.BackColor = tag.Technics == 1 ? Color.Yellow : dataGridView.RowsDefaultCellStyle.SelectionBackColor;
if (tag.Technics == 0)
tangEntity = row.DataBoundItem as GradeAndWeight;
else
maoEntity = row.DataBoundItem as GradeAndWeight;
return row;
localMao.Add(entity.OrderDetail_ID);
SaveEntityToLocal(false);
}
var f = maoList.FirstOrDefault(x => x.OrderDetail_ID == entity.OrderDetail_ID);
if (f != null)
f.Finish = true;
}
return null;
BindMaoGrid();
}
private void discontBtn_Click(object sender, EventArgs e)
{
if (new BodyDiscontSetting().ShowDialog() == DialogResult.OK)
BuildDiscontPanel();
BuildDiscontPanel(false);
}
void BuildDiscontPanel()
Button disBtn = null;
void BuildDiscontPanel(bool firstLoad)
{
var disconts = GradeAndWeightRpc.GetBodyDiscontItem().Where(x => x.Discont > 0).OrderBy(x => x.ID);
var disconts = new List<BodyDiscontItem>();
if (!firstLoad)
VerifyConnection();
if (connection)
{
disconts = GradeAndWeightRpc.GetBodyDiscontItem();
XmlUtil.SerializerObjToFile(disconts, discontPath);
}
else
disconts = XmlUtil.DeserializeFromFile<List<BodyDiscontItem>>(discontPath);
disconts = disconts.Where(x => x.Discont > 0).OrderBy(x => x.ID).ToList();
discontPanel.Controls.Clear();
foreach (var item in disconts)
{
var btn = new Button() { Name = "_D" + item.ID, Text = item.Name, Tag = item.Discont, Size = new Size(70, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { Left = 0, Right = 0, Top = 10, Bottom = 10 }, Font = new Font("宋体", 15) };
var btn = new Button() { Name = "_D" + item.ID, Text = item.Name, Tag = item.Discont, Size = new Size(70, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { Bottom = 30 }, Font = new Font("宋体", 15) };
btn.Click += (sender, e) =>
{
if (modifyDetail == null)
throw new Exception("请先选择要扣重的记录");
modifyDetail.Weight = (modifyDetail.Weight ?? 0) - Convert.ToDecimal(btn.Tag);
GradeAndWeightRpc.UpdateWeight(modifyDetail.ID, modifyDetail.Weight);
historyGrid.Refresh();
modifyDetail = null;
modifyPanel.Hide();
{
if (disBtn != null)
SetBtnUnCheck(disBtn);
if (disBtn != btn)
{
disBtn = btn;
SetBtnChecked(disBtn);
}
else
disBtn = null;
}
else
{
modifyDetail.Weight = (modifyDetail.Weight ?? 0) - Convert.ToDecimal(btn.Tag);
LocalGradeAndWeightBL.Update(modifyDetail, "Weight");
historyGrid.Refresh();
modifyDetail = null;
modifyPanel.Hide();
}
};
discontPanel.Controls.Add(btn);
}
}
int leftRoll = -1;
private void InitScrollBar1()
readonly Color btnSelectForeColor = Color.FromArgb(255, 255, 255);
readonly Color btnSelectBackColor = Color.FromArgb(66, 163, 218);
Color btnUnSelectForeColor = SystemColors.ControlText;
Color btnUnSelectBackColor = Color.FromArgb(225, 225, 225);
void SetBtnChecked(Button btn)
{
btn.BackColor = btnSelectBackColor;
btn.ForeColor = btnSelectForeColor;
}
void SetBtnUnCheck(Button btn)
{
vScrollBar1.Maximum = (dataGridView.RowCount - dataGridView.DisplayedRowCount(false) + 30) * dataGridView.RowTemplate.Height;
vScrollBar1.Minimum = 0;
vScrollBar1.SmallChange = dataGridView.RowTemplate.Height;
vScrollBar1.LargeChange = dataGridView.RowTemplate.Height * 30;
this.vScrollBar1.Scroll += (sender, e) =>
btn.BackColor = btnUnSelectBackColor;
btn.ForeColor = btnUnSelectForeColor;
}
int tangRoll = -1;
private void InitTangScrollBar()
{
tangScrollBar.Maximum = (tangGridView.RowCount - tangGridView.DisplayedRowCount(false) + 30) * tangGridView.RowTemplate.Height;
tangScrollBar.Minimum = 0;
tangScrollBar.SmallChange = tangGridView.RowTemplate.Height;
tangScrollBar.LargeChange = tangGridView.RowTemplate.Height * 30;
this.tangScrollBar.Scroll += (sender, e) =>
{
tangRoll = e.NewValue / tangGridView.RowTemplate.Height;
tangGridView.FirstDisplayedScrollingRowIndex = tangRoll;
};
}
int maoRoll = -1;
private void InitMaoScrollBar()
{
maoScrollBar.Maximum = (maoGridView.RowCount - maoGridView.DisplayedRowCount(false) + 30) * maoGridView.RowTemplate.Height;
maoScrollBar.Minimum = 0;
maoScrollBar.SmallChange = maoGridView.RowTemplate.Height;
maoScrollBar.LargeChange = maoGridView.RowTemplate.Height * 30;
maoScrollBar.Scroll += (sender, e) =>
{
leftRoll = e.NewValue / dataGridView.RowTemplate.Height;
dataGridView.FirstDisplayedScrollingRowIndex = leftRoll;
maoRoll = e.NewValue / maoGridView.RowTemplate.Height;
maoGridView.FirstDisplayedScrollingRowIndex = maoRoll;
};
}
@ -733,5 +947,106 @@ namespace WeighAndGrading
historyGrid.FirstDisplayedScrollingRowIndex = rightRoll;
};
}
object _fileSaveObj = new object();
void SaveEntityToLocal(bool tang)
{
lock (_fileSaveObj)
{
if (tang)
XmlUtil.SerializerObjToFile(localTang, tangFilePath);
else
XmlUtil.SerializerObjToFile(localMao, maoFilePath);
}
}
void SyncLocalMainFinish(ref List<long> list, bool tang)
{
string path = maoFilePath;
short tech = MAO_TECH;
if (tang)
{
path = tangFilePath;
tech = TANG_TECH;
}
list = XmlUtil.DeserializeFromFile<List<long>>(path);
var count = list.Count;
if (count == 0)
return;
if (count >= 30)
count = 30;
var sync = list.GetRange(0, count);
foreach (var item in sync)
{
GradeAndWeightRpc.SetGradeFinish(item, tech);
list.Remove(item);
}
SaveEntityToLocal(tang);
}
bool? last = null;
void VerifyConnection()
{
connection = LoginRpcUtil.TestConnection();
if (last == connection)
return;
var png = "stop.png";
if (connection)
png = "working.png";
var imgPath = Path.Combine(Application.StartupPath, "BWP.WinFormControl.dll");
var s = Assembly.LoadFile(imgPath).GetManifestResourceStream("BWP.WinFormControl.Images." + png);
statePic.Image = Image.FromStream(s);
statePic.Refresh();
last = connection;
}
private void GradeFrom_Load(object sender, EventArgs e)
{
syncToServer = new Thread(ToServerTask);
syncToServer.Start();
}
void ToServerTask()
{
while (true)
{
this.Invoke(new InvokeHandler(delegate()
{
VerifyConnection();
if (connection)
{
try
{
SyncLocalMainFinish(ref localTang, true);
SyncLocalMainFinish(ref localMao, false);
SyncDiscontToSever();
LocalGradeAndWeightBL.Sync();
}
catch (Exception ex)
{
File.WriteAllText(string.Format("{0:yyyyMMddHHmmss}log.txt", DateTime.Now), "错误:" + ex.Message + " \n详细信息:" + ex.StackTrace);
}
}
}));
Thread.Sleep(2000);
}
}
void SyncDiscontToSever()
{
var changeFlagPath = Path.Combine(GradeFrom.DATA_PATH, "DiscontsChanged.txt");
bool existFile = File.Exists(changeFlagPath);
if (existFile)
{
var list = XmlUtil.DeserializeFromFile<List<BodyDiscontItem>>(discontPath);
var changes = new List<CTuple<long, decimal?>>();
foreach (var item in list)
changes.Add(new CTuple<long, decimal?>(item.ID, item.Discont));
GradeAndWeightRpc.SaveBodyDiscontItem(changes);
File.Delete(changeFlagPath);
}
}
}
}

+ 28
- 16
WeighAndGrading/GradeFrom.resx View File

@ -117,52 +117,64 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="H_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="T_OrderDetail_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Livestock_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="T_Finish.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_ReadWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="T_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="T_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Technics.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="T_Already.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Livestock_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="T_FinishBtn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_OrderDetail_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_Finish.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_OrderDetail_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_Already.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Technics.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_FinishBtn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Finish.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_SID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Livestock_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Technics_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_ReadWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Already.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Technics.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_FinishBtn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Livestock_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

+ 63
- 0
WeighAndGrading/Properties/Resources.Designer.cs View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace WeighAndGrading.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WeighAndGrading.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

+ 120
- 0
WeighAndGrading/Properties/Resources.resx View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

+ 9
- 1
WeighAndGrading/WeighAndGrading.csproj View File

@ -34,7 +34,6 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
@ -70,6 +69,11 @@
<DependentUpon>GradeSettingFrom.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="WeightGradePrint.cs" />
</ItemGroup>
<ItemGroup>
@ -82,6 +86,10 @@
<EmbeddedResource Include="GradeSettingFrom.resx">
<DependentUpon>GradeSettingFrom.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BO\BO.csproj">


Loading…
Cancel
Save