Browse Source

优化调整。

master
yibo 7 years ago
parent
commit
a44958a790
44 changed files with 4646 additions and 1483 deletions
  1. +1
    -0
      BO/BO.csproj
  2. +23
    -0
      BO/BO/BaseInfo/ProductBatch.cs
  3. +71
    -10
      BO/Utils/BillRpc/GradeAndWeightRpc.cs
  4. +15
    -0
      ButcherManage.BO/BaseInfo/BodyDiscont.cs
  5. +20
    -0
      ButcherManage.BO/BaseInfo/Livestock.cs
  6. +23
    -0
      ButcherManage.BO/Bill/GradeAndWeight.cs
  7. +63
    -0
      ButcherManage.BO/Bill/GradeAndWeight_Detail.cs
  8. +26
    -0
      ButcherManage.BO/Bill/OrderGradeFinishRelate.cs
  9. +5
    -0
      ButcherManage.BO/ButcherManage.BO.csproj
  10. +1
    -0
      ButcherManage.BO/Enums/DriveType.cs
  11. +48
    -0
      ButcherManage.BO/LocalBL/BaseInfoBL.cs
  12. +80
    -0
      ButcherManage.BO/LocalBL/BaseInfoSyncRpc.cs
  13. +57
    -0
      ButcherManage.BO/LocalBL/GradeAndWeightBL.cs
  14. +22
    -0
      ButcherManage.Form/ButcherManage.Form.csproj
  15. +1012
    -0
      ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.Designer.cs
  16. +625
    -0
      ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.cs
  17. +195
    -0
      ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.resx
  18. +93
    -0
      ButcherManage.Form/Properties/Resources.Designer.cs
  19. +130
    -0
      ButcherManage.Form/Properties/Resources.resx
  20. BIN
      ButcherManage.Form/Resources/close.png
  21. BIN
      ButcherManage.Form/Resources/title.png
  22. BIN
      ButcherManage.Form/Resources/wfLogo.png
  23. +31
    -0
      ButcherManage.Form/Utils/ControlsUtil.cs
  24. +9
    -0
      ButcherManage.Login/ButcherManage.Login.csproj
  25. BIN
      ButcherManage.Login/Images/close.png
  26. BIN
      ButcherManage.Login/Images/title.png
  27. BIN
      ButcherManage.Login/Images/wfLogo.png
  28. +27
    -0
      ButcherWeight/ButcherWeight.csproj
  29. +113
    -0
      ButcherWeight/Properties/Resources.Designer.cs
  30. +136
    -0
      ButcherWeight/Properties/Resources.resx
  31. BIN
      ButcherWeight/Resources/bgTitle.png
  32. BIN
      ButcherWeight/Resources/green.png
  33. BIN
      ButcherWeight/Resources/red.png
  34. BIN
      ButcherWeight/Resources/silvery.png
  35. BIN
      ButcherWeight/Resources/silvery1.png
  36. BIN
      ButcherWeight/Resources/yellow.png
  37. +1483
    -1387
      ButcherWeight/WeightForm.Designer.cs
  38. +33
    -3
      ButcherWeight/WeightForm.cs
  39. +248
    -54
      ButcherWeight/WeightForm.resx
  40. +5
    -1
      WeighAndGrading/BodyDiscontSetting.cs
  41. +7
    -3
      WeighAndGrading/DataViewForm.cs
  42. +11
    -15
      WeighAndGrading/GradeFrom.Designer.cs
  43. +32
    -9
      WeighAndGrading/GradeFrom.cs
  44. +1
    -1
      WeighAndGrading/WeightGradePrint.cs

+ 1
- 0
BO/BO.csproj View File

@ -66,6 +66,7 @@
<Compile Include="BO\BaseInfo\Customer.cs" />
<Compile Include="BO\BaseInfo\DeliverGoodsLine.cs" />
<Compile Include="BO\BaseInfo\Farmer.cs" />
<Compile Include="BO\BaseInfo\ProductBatch.cs" />
<Compile Include="BO\Bill\GradeAndWeight\DataConfirmList.cs" />
<Compile Include="BO\Bill\GradeAndWeight\GradeAndWeight.cs" />
<Compile Include="BO\Bill\GradeAndWeight\DetailLastIndex.cs" />


+ 23
- 0
BO/BO/BaseInfo/ProductBatch.cs View File

@ -0,0 +1,23 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BO.BO.BaseInfo
{
[MapToTable("Butcher_ProductBatch")]
[KeyField("ID", KeyGenType.assigned)]
public class ProductBatch
{
public long ID { get; set; }
public string Name { get; set; }
public DateTime? Date { get; set; }
[DbColumn(DefaultValue = 0)]
public int RowVersion { get; set; }
}
}

+ 71
- 10
BO/Utils/BillRpc/GradeAndWeightRpc.cs View File

@ -4,6 +4,7 @@ using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using Forks.JsonRpc.Client;
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@ -92,8 +93,15 @@ namespace BO.Utils.BillRpc
public static List<DataConfirmList> GetDataConfirmList(DateTime date, int? order)
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/GetDataConfirmList";
var result = RpcFacade.Call<string>(method, date, order);
return serializer.Deserialize<List<DataConfirmList>>(result);
try
{
var result = RpcFacade.Call<string>(method, date, order);
return serializer.Deserialize<List<DataConfirmList>>(result);
}
catch
{
return new List<DataConfirmList>();
}
}
}
@ -233,9 +241,9 @@ namespace BO.Utils.BillRpc
ClearUnSyncDelete();
var syncs = GetAllNeedSyncDetails();
foreach (var detail in syncs)
{
{
const string method = "/MainSystem/B3ClientService/Rpcs/BillRpc/GradeAndWeightRpc/UpdateOrInsertDetailOrDelete";
var id = RpcFacade.Call<long>(method, serializer.Serialize(detail));
var id = RpcFacade.Call<long>(method, JsonConvert.SerializeObject(detail));
if (detail.IsDeleted)
Delete(detail.SID);
else
@ -295,7 +303,7 @@ namespace BO.Utils.BillRpc
}
}
public static Dictionary<int,int> GetOrderIdx(DateTime date)
public static Dictionary<int, int> GetOrderIdx(DateTime date)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
@ -348,7 +356,7 @@ namespace BO.Utils.BillRpc
public static void UpdateHistory(DateTime dateTime)
{
var lastOrder = 0;
var orderIdx=1;
var orderIdx = 1;
using (var session = LocalDmoSession.New())
{
if (CheckTodayUpdated(dateTime, session))
@ -377,7 +385,7 @@ namespace BO.Utils.BillRpc
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
query.Columns.Add(DQSelectColumn.Field("SID"));
query.Where.Conditions.Add(DQCondition.And( DQCondition.EQ("Date", dateTime), DQCondition.IsNotNull(DQExpression.Field("OrderIndex"))));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Date", dateTime), DQCondition.IsNotNull(DQExpression.Field("OrderIndex"))));
return session.ExecuteScalar(query) != null;
}
@ -389,15 +397,15 @@ namespace BO.Utils.BillRpc
session.ExecuteNonQuery(update);
}
static List<Tuple<int,long>> Get20180411Data(DateTime dateTime,IDmoSession session)
static List<Tuple<int, long>> Get20180411Data(DateTime dateTime, IDmoSession session)
{
var query = new DQueryDom(new JoinAlias(typeof(GradeAndWeight_Detail)));
query.Columns.Add(DQSelectColumn.Field("Order"));
query.Columns.Add(DQSelectColumn.Field("SID"));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("Order"));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("SID"));
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Date",dateTime),DQCondition.IsNotNull(DQExpression.Field("Order"))));
var list = new List<Tuple<int,long>>();
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Date", dateTime), DQCondition.IsNotNull(DQExpression.Field("Order"))));
var list = new List<Tuple<int, long>>();
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
@ -407,5 +415,58 @@ namespace BO.Utils.BillRpc
}
return list;
}
public static List<ProductBatch> GetProductBatch()
{
var query = new DmoQuery(typeof(ProductBatch));
using (var session = LocalDmoSession.New())
{
return session.ExecuteList(query).Cast<ProductBatch>().ToList();
}
}
const string baseInfoRpcPath = @"/MainSystem/B3ClientService/Rpcs/SyncBaseInfoRpc/";
public static void LoadProductBatchFromServer()
{
using (var session = LocalDmoSession.New())
{
var local = GetLocalVersion(session);
var json = RpcFacade.Call<string>(baseInfoRpcPath + "SyncProductBatchByType", 0, JsonConvert.SerializeObject(local));
var result = JsonConvert.DeserializeObject<Tuple<List<ProductBatch>, List<ProductBatch>, List<long>>>(json);//insert,update,delete
foreach (var item in result.Item1)
session.Insert(item);
foreach (var item in result.Item2)
session.Update(item);
if (result.Item3.Any())
Delete(session, result.Item3);
session.Commit();
}
}
static List<Tuple<long, int>> GetLocalVersion(IDmoSession session)
{
var query = new DQueryDom(new JoinAlias(typeof(ProductBatch)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("RowVersion"));
//query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("Date", DateTime.Today.AddDays(-1)));
var list = new List<Tuple<long, int>>();
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
{
list.Add(new Tuple<long, int>((long)reader[0], (int)reader[1]));
}
}
return list;
}
static void Delete(IDmoSession session, List<long> ids)
{
var delete = new DQDeleteDom(typeof(ProductBatch));
delete.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("ID"), ids.Select(x => DQExpression.Value(x)).ToArray()));
session.ExecuteNonQuery(delete);
}
}
}

+ 15
- 0
ButcherManage.BO/BaseInfo/BodyDiscont.cs View File

@ -0,0 +1,15 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherManage.BO
{
[MapToTable("Butcher_BodyDiscont")]
public class BodyDiscont : BaseInfo
{
public decimal? Discont { get; set; }
}
}

+ 20
- 0
ButcherManage.BO/BaseInfo/Livestock.cs View File

@ -0,0 +1,20 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherManage.BO
{
[MapToTable("Butcher_Livestock")]
public class Livestock : BaseInfo
{
public short Technics { get; set; }
public int? SortNum { get; set; }
[NonDmoProperty]
public string Technics_Name { get { return Technics == 0 ? "烫褪" : "毛剥"; } }
}
}

+ 23
- 0
ButcherManage.BO/Bill/GradeAndWeight.cs View File

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherManage.BO
{
public class GradeAndWeight
{
public long? WeightID { get; set; }
public long OrderDetail_ID { get; set; }
public int Order { get; set; }
public int Number { get; set; }
public int Already { get; set; }
public bool Finish { get; set; }
}
}

+ 63
- 0
ButcherManage.BO/Bill/GradeAndWeight_Detail.cs View File

@ -0,0 +1,63 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherManage.BO
{
[Serializable]
[MapToTable("GradeAndWeight_Detail")]
[KeyField("SID", KeyGenType.identity)]
public class GradeAndWeight_Detail
{
/// <summary>
/// 本地ID
/// </summary>
public long SID { get; set; }
public long? OrderDetail_ID { get; set; }
public int? Order { get; set; }
public int Index { get; set; }
public int? OrderIndex { get; set; }
public DateTime Date { get; set; }
public short? Technics { get; set; }
public string Technics_Name { get; set; }
public long? Livestock_ID { get; set; }
public string Livestock_Name { get; set; }
public decimal? Weight { get; set; }
[DbColumn(DbType = SqlDbType.DateTime)]
public DateTime Time { get; set; }
/// <summary>
/// ServerID
/// </summary>
public long ID { get; set; }
public bool Sync { get; set; }
/// <summary>
/// 是否删除的
/// </summary>
public bool IsDeleted { get; set; }
//掉猪
public bool IsDrop { get; set; }
public string BarCode { get; set; }
public long? ProductBatch_ID { get; set; }
}
}

+ 26
- 0
ButcherManage.BO/Bill/OrderGradeFinishRelate.cs View File

@ -0,0 +1,26 @@
using Forks.EnterpriseServices.DomainObjects2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherManage.BO
{
[MapToTable("OrderGradeFinishRelate")]
public class OrderGradeFinishRelate
{
public OrderGradeFinishRelate(int order, DateTime date, short technics)
{
Order = order;
Date = date;
Technics = technics;
}
public int Order { get; set; }
public DateTime Date { get; set; }
public short Technics { get; set; }
}
}

+ 5
- 0
ButcherManage.BO/ButcherManage.BO.csproj View File

@ -55,6 +55,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BaseInfo\BodyDiscont.cs" />
<Compile Include="BaseInfo\Livestock.cs" />
<Compile Include="BaseInfo\ProductBatch.cs" />
<Compile Include="BaseInfo\Worker.cs" />
<Compile Include="Base\Base.cs" />
@ -66,6 +68,9 @@
<Compile Include="Bill\PickOutConfirmLocal.cs" />
<Compile Include="EntityExpand.cs" />
<Compile Include="Enums\DriveType.cs" />
<Compile Include="LocalBL\BaseInfoBL.cs" />
<Compile Include="LocalBL\BaseInfoSyncRpc.cs" />
<Compile Include="LocalBL\GradeAndWeightBL.cs" />
<Compile Include="LocalBL\HotPickBL.cs" />
<Compile Include="LocalBL\OrderConfirmBL.cs" />
<Compile Include="LocalBL\PickOutConfirmBL.cs" />


+ 1
- 0
ButcherManage.BO/Enums/DriveType.cs View File

@ -11,5 +11,6 @@ namespace ButcherManage.BO.Enums
= 103,
线 = 104,
线 = 105,
= 106,
}
}

+ 48
- 0
ButcherManage.BO/LocalBL/BaseInfoBL.cs View File

@ -0,0 +1,48 @@
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherManage.BO.LocalBL
{
public static class BaseInfoBL
{
public static List<T> GetList<T>(int range = 10, params string[] extendFields)
where T : BaseInfo, new()
{
var query = new DQueryDom(new JoinAlias(typeof(T)));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("Name"));
foreach (var field in extendFields)
query.Columns.Add(DQSelectColumn.Field(field));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true));
query.Range = SelectRange.Top(range);
var result = new List<T>();
var type = typeof(T);
using (var session = DmoSession.New())
{
using (var reader = session.ExecuteReader(query))
{
while (reader.Read())
{
var entity = new T();
result.Add(entity);
entity.ID = (long)reader[0];
entity.Name = (string)reader[1];
var idx = 2;
foreach (var field in extendFields)
{
type.GetProperty(field).SetValue(entity, reader[idx]);
idx++;
}
}
}
}
return result;
}
}
}

+ 80
- 0
ButcherManage.BO/LocalBL/BaseInfoSyncRpc.cs View File

@ -0,0 +1,80 @@
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ButcherManage.BO.LocalBL
{
public static class BaseInfoSyncRpc
{
const string baseInfoRpcPath = @"/MainSystem/B3ClientService/Rpcs/SyncBaseInfoRpc/";
static void TruncateTable(Type type, IDmoSession session)
{
var table = DmoInfo.Get(type).MappedDBObject;
var sql = string.Format("truncate table [{0}]", table);
session.ExecuteSqlNonQuery(sql);
}
public static void SyncBaseInfo<T>(string methodName = null)
where T : BaseInfo
{
var type = typeof(T);
if (string.IsNullOrEmpty(methodName))
methodName = "Sync" + type.Name;
var json = SimpleRest.Call<string>(baseInfoRpcPath + methodName);
var list = JsonConvert.DeserializeObject<List<T>>(json);
using (var session = DmoSession.New())
{
TruncateTable(type, session);
foreach (var item in list)
session.Insert(item);
session.Commit();
}
}
public static void SyncBodyDiscont()
{
var json = SimpleRest.Call<string>(baseInfoRpcPath + "SyncBodyDiscont");
var list = JsonConvert.DeserializeObject<List<BodyDiscont>>(json);
using (var session = DmoSession.New())
{
DeleteLocal(session, list.Select(x => x.ID));
var exist = GetLocal(session);
foreach (var item in list)
{
if (exist.Any(x => x == item.ID))
UpdateName(session, item);
else
session.Insert(item);
}
session.Commit();
}
}
static void DeleteLocal(IDmoSession session, IEnumerable<long> ids)
{
var del = new DQDeleteDom(typeof(BodyDiscont));
del.Where.Conditions.Add(DQCondition.NotInList(DQExpression.Field("ID"), ids.Select(x => DQExpression.Value(x)).ToArray()));
session.ExecuteNonQuery(del);
}
static List<long> GetLocal(IDmoSession session)
{
var query = new DQueryDom(new JoinAlias(typeof(BodyDiscont)));
query.Columns.Add(DQSelectColumn.Field("ID"));
return query.EExecuteList<long>(session);
}
static void UpdateName(IDmoSession session, BodyDiscont entity)
{
var update = new DQUpdateDom(typeof(BodyDiscont));
update.Columns.Add(new DQUpdateColumn("Name", entity.Name));
update.Where.Conditions.Add(DQCondition.EQ("ID", entity.ID));
session.ExecuteNonQuery(update);
}
}
}

+ 57
- 0
ButcherManage.BO/LocalBL/GradeAndWeightBL.cs View File

@ -0,0 +1,57 @@
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ButcherManage.BO;
namespace ButcherManage.BO.LocalBL
{
public static class GradeAndWeightBL
{
public static IEnumerable<Livestock> GetLivestock()
{
var query = new DQueryDom(new JoinAlias(typeof(Livestock)));
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("SortNum"));
query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("Name"));
query.Columns.Add(DQSelectColumn.Field("Technics"));
using (var session = DmoSession.New())
{
var list = query.EExecuteList<long, string, short>(session);
return list.Select(x => new Livestock { ID = x.Item1, Name = x.Item2, Technics = x.Item3 });
}
}
public static IEnumerable<BodyDiscont> GetBodyDiscont()
{
var dom = new DmoQuery(typeof(BodyDiscont));
dom.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID"));
using (var session = DmoSession.New())
{
return session.ExecuteList(dom).Cast<BodyDiscont>();
}
}
//public static void SetGradeFinish(int order, DateTime date, short technics)
//{
// using (var session = DmoSession.New())
// {
// if (Finished(session, date, order, technics))
// return;
// session.Insert(new OrderGradeFinishRelate(order, date, technics));
// session.Commit();
// }
//}
//static bool Finished(IDmoSession session, DateTime date, int order, short technics)
//{
// var query = new DQueryDom(new JoinAlias(typeof(OrderGradeFinishRelate)));
// query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Order", order), DQCondition.EQ("Date", date), DQCondition.EQ("Technics", technics)));
// query.Columns.Add(DQSelectColumn.Create(DQExpression.Value("1"), "c"));
// return session.ExecuteScalar(query) != null;
//}
}
}

+ 22
- 0
ButcherManage.Form/ButcherManage.Form.csproj View File

@ -72,6 +72,12 @@
<DependentUpon>PickOutConfirm.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="Utils\ControlsUtil.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="HotPickSelector_\HotPickSelector.resx">
@ -83,6 +89,10 @@
<EmbeddedResource Include="PickOutConfirm_\PickOutConfirm.resx">
<DependentUpon>PickOutConfirm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ButcherManage.BO\ButcherManage.BO.csproj">
@ -96,6 +106,18 @@
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="Resources\wfLogo.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\title.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\close.png" />
</ItemGroup>
<ItemGroup>
<Folder Include="GradeAndWeight_\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>if $(Configuration)==Debug (


+ 1012
- 0
ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.Designer.cs
File diff suppressed because it is too large
View File


+ 625
- 0
ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.cs View File

@ -0,0 +1,625 @@
using ButcherManage.BO;
using ButcherManage.BO.Enums;
using ButcherManage.BO.LocalBL;
using ButcherManage.BO.Utils;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using ButcherManage.Utils;
using WinFormControl;
using System.IO;
namespace ButcherManage.GradeAndWeight_
{
public partial class GradeAndWeightForm : Form, IWithRoleForm
{
#region IWithRoleForm
public List<short> RoleName
{
get { return new List<short> { (short). }; }
}
public Form Generate()
{
return this;
}
#endregion
BindingList<GradeAndWeight> tangList;
BindingList<GradeAndWeight> maoList;
BindingList<GradeAndWeight_Detail> details;
long? batchID = null;
int maxIndex = 0;
readonly ConcurrentQueue<GradeAndWeight_Detail> noLivestockList;
Dictionary<int, int> orderMaxIdx;
Thread syncTangGrid, syncMaoGrid, syncDetailGrid;
Thread syncToServer;
GradeAndWeight_Detail modifyDetail = null;
GradeAndWeight tangEntity;
GradeAndWeight maoEntity;
public GradeAndWeightForm()
{
InitializeComponent();
netStateWatch1.GetConnectState = () => LoginUtil.TestConnection(500);
datePicker.Text = DateTime.Today.ToString("yyyy-MM-dd");
productBatchSelect.SelectedIndexChanged += delegate
{
if (productBatchSelect.SelectedValue == null)
batchID = null;
else
batchID = (long)productBatchSelect.SelectedValue;
};
this.FormClosing += delegate
{
if (syncTangGrid != null && syncTangGrid.IsAlive)
syncTangGrid.Abort();
if (syncMaoGrid != null && syncMaoGrid.IsAlive)
syncMaoGrid.Abort();
if (syncDetailGrid != null && syncDetailGrid.IsAlive)
syncDetailGrid.Abort();
if (syncToServer != null && syncToServer.IsAlive)
syncToServer.Abort();
};
uWeightControl1.ReceivedValue += AddWeightDetail;
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
var height = (Screen.PrimaryScreen.Bounds.Height - 236) / 2;
groupBox1.Height = groupBox2.Height = height;
groupBox2.Location = new Point(groupBox2.Location.X, 226 + height);
var initTask = new Thread(LoadBind);
initTask.Start();
syncToServer = new Thread(ToServerTask);
syncToServer.Start();
}
private void LoadBind()
{
this.Invoke(new Action(() =>
{
if (netStateWatch1.NetState)
{
BaseInfoSyncRpc.SyncBaseInfo<ProductBatch>();
BaseInfoSyncRpc.SyncBaseInfo<Livestock>();
BaseInfoSyncRpc.SyncBodyDiscont();
}
productBatchSelect.EBindComboBox<ProductBatch>(x => x.Date == DateTime.Today, 6, "Date");
BindLivestockBtn();
BindDiscountBtn();
}));
}
void BindLivestockBtn()
{
var livestocks = GradeAndWeightBL.GetLivestock();
var i = 0;
foreach (var item in livestocks)
{
i++;
var btn = new NButton() { Name = "_" + item.ID, Text = item.Name, Tag = item, Size = new Size(90, 75), Margin = new Padding { All = 15 }, Font = new Font("宋体", 18), PlaySound = true, PulseOnFocus = true };
btn.Click += (sender, e) =>
{
JiBieButtonClick(sender as NButton);
};
if (item.Technics == 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);
}
}
void BindDiscountBtn()
{
var disconts = GradeAndWeightBL.GetBodyDiscont().Where(x => (x.Discont ?? 0) != 0);
discontPanel.Controls.Clear();
foreach (var item in disconts)
{
var btn = new NButton() { Name = "_D" + item.ID, Text = item.Name, Tag = item.Discont, Size = new Size(60, 60), Margin = new Padding { Bottom = 30 }, Font = new Font("宋体", 15) };
btn.Click += (sender, e) =>
{
if (modifyDetail == null)
{
//if (disBtn != btn)
//{
// disBtn = btn;
//}
//else
// disBtn = null;
}
else
{
//modifyDetail.Weight = (modifyDetail.Weight ?? 0) - Convert.ToDecimal(btn.Tag);
//LocalGradeAndWeightBL.Update(modifyDetail, "Weight");
//cancelBtn_Click(sender, EventArgs.Empty);
}
};
discontPanel.Controls.Add(btn);
}
}
void JiBieButtonClick(NButton btn)
{
if (details == null)
{
MessageBox.Show("请先同步数据");
return;
}
try
{
var livestockTag = btn.Tag as Livestock;
if (modifyDetail == null)
{
AddDetail(livestockTag);
}
else
{
UpdateDetial(modifyDetail, livestockTag);
cancelBtn_Click(btn, EventArgs.Empty);
}
SetlblSucessVisibleTrue();
SetlblSucessVisibleFalse();
}
catch { throw; }
}
static object _obj = new object();
void AddDetail(Livestock livestock)
{
lock (_obj)
{
var n = 0;
var currentRow = livestock.Technics == 0 ? tangEntity : maoEntity;
GradeAndWeight_Detail first;
//TryPeek 尝试返回 ConcurrentQueue<T> 开头处的对象但不将其移除
//TryDequeue 尝试移除并返回并发队列开头处的对象。
if (noLivestockList.TryDequeue(out first))
{
if (currentRow != null)
{
first.OrderDetail_ID = currentRow.OrderDetail_ID;
first.Order = currentRow.Order;
n = currentRow.Already;
SetOrderInex(first);
}
first.Date = DateTime.Parse(datePicker.Text);
first.Livestock_ID = livestock.ID;
first.Livestock_Name = livestock.Name;
first.Technics = livestock.Technics;
first.Technics_Name = livestock.Name;
if (disBtn != null)
{
first.Weight = (first.Weight ?? 0) - Convert.ToDecimal(disBtn.Tag);
SetBtnUnCheck(disBtn);
disBtn = null;
}
var barCode = StartPrintNewEntity(first);
first.BarCode = barCode;
LocalGradeAndWeightBL.Update(first, "OrderDetail_ID", "Order", "OrderIndex", "Date", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name", "Weight", "BarCode");
var tag = details.FirstOrDefault(x => x.SID == first.SID);
if (first != null)
{
tag.Date = first.Date;
tag.Livestock_ID = first.Livestock_ID;
tag.Livestock_Name = first.Livestock_Name;
tag.Order = first.Order;
tag.OrderDetail_ID = first.OrderDetail_ID;
tag.Technics = first.Technics;
tag.Technics_Name = first.Technics_Name;
tag.Weight = first.Weight;
historyGrid.Refresh();
}
}
else//add
{
maxIndex++;
var entity = new GradeAndWeight_Detail();
entity.Index = maxIndex;
entity.ProductBatch_ID = batchID;
if (currentRow != null)
{
entity.OrderDetail_ID = currentRow.OrderDetail_ID;
entity.Order = currentRow.Order;
n = currentRow.Already;
SetOrderInex(entity);
}
entity.Date = DateTime.Parse(datePicker.Text);
entity.Livestock_ID = livestock.ID;
entity.Livestock_Name = livestock.Name;
entity.Technics = livestock.Technics;
entity.Technics_Name = livestock.Technics_Name;
entity.Time = DateTime.Now;
if (disBtn != null)
{
entity.Weight = -Convert.ToDecimal(disBtn.Tag);
SetBtnUnCheck(disBtn);
disBtn = null;
}
entity.Weight = 0;
entity.BarCode = StartPrintNewEntity(entity);
LocalGradeAndWeightBL.Insert(entity);
details.Insert(0, entity);
AfterAddBindDetailGrid();
}
if (currentRow != null)
{
currentRow.Already = n + 1;
orderLabel.Text = currentRow.Order.ToString();
alreadyLabel.Text = currentRow.Already.ToString();
if (livestock.Technics==0)
tangGridView.Refresh();
else
maoGridView.Refresh();
}
else
{
orderLabel.Text = string.Empty;
alreadyLabel.Text = string.Empty;
}
}
}
void UpdateDetial(GradeAndWeight_Detail detail, Livestock livestock)
{
var techIsEmpty = detail.Technics == null;
detail.Livestock_ID = livestock.ID;
detail.Livestock_Name = livestock.Name;
detail.Technics = livestock.Technics;
detail.Technics_Name = livestock.Technics_Name;
var current = livestock.Technics == 0 ? tangEntity : maoEntity;
if (current != null)
{
detail.Order = current.Order;
detail.OrderDetail_ID = current.OrderDetail_ID;
}
var updateFileNames = new List<string> { "Order", "OrderDetail_ID", "Livestock_ID", "Livestock_Name", "Technics", "Technics_Name" };
LocalGradeAndWeightBL.Update(detail, updateFileNames.ToArray());
if (techIsEmpty)
ResetQueue();
}
private void SetOrderInex(GradeAndWeight_Detail detail)
{
if (detail.Order == null)
return;
if (!orderMaxIdx.ContainsKey(detail.Order.Value))
orderMaxIdx.Add(detail.Order.Value, 0);
orderMaxIdx[detail.Order.Value] += 1;
detail.OrderIndex = orderMaxIdx[detail.Order.Value];
}
void SetlblSucessVisibleFalse()
{
System.Timers.Timer tm = new System.Timers.Timer(1000);
tm.Elapsed += delegate(object sender, System.Timers.ElapsedEventArgs e)
{
tm.Enabled = false;
this.Invoke(new Action(delegate
{
lblSucessed.Visible = false;
}));
tm.Dispose();
};
tm.Enabled = true;
}
void SetlblSucessVisibleTrue()
{
this.Invoke(new Action(delegate
{
lblSucessed.Visible = true;
Application.DoEvents();
}));
}
void AfterAddBindDetailGrid()
{
if (details.Count > 50)
details.RemoveAt(50);
BindDetailGrid();
}
void AddWeightDetail(decimal weight)
{
lock (_obj)
{
maxIndex++;
var entity = new GradeAndWeight_Detail();
entity.Index = maxIndex;
entity.ProductBatch_ID = batchID;
entity.Weight = (entity.Weight ?? 0) + weight;
entity.Time = DateTime.Now;
entity.Date = DateTime.Parse(datePicker.Text);
LocalGradeAndWeightBL.Insert(entity);
details.Insert(0, entity);
noLivestockList.Enqueue(entity);
}
AfterAddBindDetailGrid();
}
private void cancelBtn_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow row in historyGrid.Rows)
{
if (modifyDetail.SID == (long)row.Cells["H_SID"].Value)
{
row.DefaultCellStyle.BackColor = historyGrid.RowsDefaultCellStyle.BackColor;
break;
}
}
historyGrid.Refresh();
modifyDetail = null;
modifyPanel.Hide();
}
//删除选中
private void btnDeleteSelected_Click(object sender, EventArgs e)
{
if (MessageBox.Show("确定删除选中的称重记录?", "删除选中", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
return;
if (modifyDetail == null)
{
UMessageBox.Show("请选中要删除的记录");
return;
}
//删除选中 更新 IsDeleted 和 Sync
lock (_obj)
{
modifyDetail.IsDeleted = true;
LocalGradeAndWeightBL.Update(modifyDetail, "IsDeleted");
details.Remove(modifyDetail);
if (modifyDetail.Technics == null)
{
ResetQueue();
}
modifyDetail = null;
modifyPanel.Hide();
}
if (details.Any())
historyGrid.DataSource = details;
historyGrid.Refresh();
}
private void historyGrid_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0)
return;
var currentRow = historyGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail;
if (modifyDetail != null)
{
foreach (DataGridViewRow row in historyGrid.Rows)
{
if (modifyDetail.SID == (long)row.Cells["H_SID"].Value)
{
row.DefaultCellStyle.BackColor = historyGrid.RowsDefaultCellStyle.BackColor;
break;
}
}
}
modifyDetail = currentRow;
historyGrid.Refresh();
stateLabel.Text = string.Format("您正在修改序号为 {0} 的信息", modifyDetail.Index);
modifyPanel.Show();
}
private void tangGridView_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
if (e.ColumnIndex == tangGridView.Columns.Count - 1)
return;
var entity = tangGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (tangEntity != null)
{
foreach (DataGridViewRow row in tangGridView.Rows)
{
if (tangEntity.OrderDetail_ID == (long)row.Cells["T_OrderDetail_ID"].Value)
{
row.DefaultCellStyle.BackColor = tangEntity.Finish ? Color.YellowGreen : tangGridView.RowsDefaultCellStyle.BackColor;
break;
}
}
}
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)
{
tangEntity = null;
return;
}
entity.Finish = true;
LocalGradeAndWeightBL.SetGradeFinish(entity.Order,DateTime.Parse(datePicker.Text), 0);
tangEntity = null;
BindTangGrid();
}
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)
{
foreach (DataGridViewRow row in maoGridView.Rows)
{
if (maoEntity.OrderDetail_ID == (long)row.Cells["M_OrderDetail_ID"].Value)
{
row.DefaultCellStyle.BackColor = maoEntity.Finish ? Color.YellowGreen : maoGridView.RowsDefaultCellStyle.BackColor;
break;
}
}
}
maoEntity = entity;
maoGridView.CurrentRow.DefaultCellStyle.SelectionBackColor = maoEntity.Finish ? Color.Yellow : maoGridView.RowsDefaultCellStyle.SelectionBackColor;
maoGridView.Refresh();
}
private void maoGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1)
return;
if (e.ColumnIndex != maoGridView.ColumnCount - 1)
return;
var entity = maoGridView.CurrentRow.DataBoundItem as GradeAndWeight;
if (entity.Finish)
{
maoEntity = null;
return;
}
entity.Finish = true;
LocalGradeAndWeightBL.SetGradeFinish(entity.Order, DateTime.Parse(datePicker.Text), 1);
maoEntity = null;
BindMaoGrid();
}
private void discontBtn_Click(object sender, EventArgs e)
{
if (new BodyDiscontSetting().ShowDialog() == DialogResult.OK)
BuildDiscontPanel(false);
}
private void dropPigBtn_Click(object sender, EventArgs e)
{
if (modifyDetail == null)
{
UMessageBox.Show("请先选择要设置为掉猪的行", "错误");
return;
}
else
{
modifyDetail.IsDrop = !modifyDetail.IsDrop;
LocalGradeAndWeightBL.Update(modifyDetail, "IsDrop");
cancelBtn_Click(sender, EventArgs.Empty);
}
}
private void dataConfirmBtn_Click(object sender, EventArgs e)
{
new DataConfirm(butcherTimeInput.Date.Value).ShowDialog();
}
#region scrollBar
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) =>
{
maoRoll = e.NewValue / maoGridView.RowTemplate.Height;
maoGridView.FirstDisplayedScrollingRowIndex = maoRoll;
};
}
int rightRoll = -1;
private void InitDetailScrollBar()
{
vScrollBar2.Maximum = (historyGrid.RowCount - historyGrid.DisplayedRowCount(false) + 30) * historyGrid.RowTemplate.Height;
vScrollBar2.Minimum = 0;
vScrollBar2.SmallChange = historyGrid.RowTemplate.Height;
vScrollBar2.LargeChange = historyGrid.RowTemplate.Height * 30;
this.vScrollBar2.Scroll += (sender, e) =>
{
rightRoll = e.NewValue / historyGrid.RowTemplate.Height;
historyGrid.FirstDisplayedScrollingRowIndex = rightRoll;
};
}
#endregion
void ToServerTask()
{
while (true)
{
if (this.IsHandleCreated)
{
this.Invoke(new Action(() =>
{
if (netStateWatch1.NetState)
{
try
{
LocalGradeAndWeightBL.Sync();
}
catch (Exception ex)
{
File.WriteAllText(string.Format("Log\\{0:yyyyMMddHHmmss}log.txt", DateTime.Now), "错误:" + ex.Message + " \n详细信息:" + ex.StackTrace);
}
}
}));
}
Thread.Sleep(200);
}
}
private void closeBtn_Click(object sender, EventArgs e)
{
Close();
}
}
}

+ 195
- 0
ButcherManage.Form/GradeAndWeight_/GradeAndWeightForm.resx View File

@ -0,0 +1,195 @@
<?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>
<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="T_Finish.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="T_WeightID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="T_Order.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="T_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="T_Already.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="T_Btn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dataGridViewTextBoxColumn6.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_SID.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">
<value>True</value>
</metadata>
<metadata name="H_IsDrop.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">
<value>True</value>
</metadata>
<metadata name="H_OrderIndex.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">
<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_Technics_Name.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">
<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>

+ 93
- 0
ButcherManage.Form/Properties/Resources.Designer.cs View File

@ -0,0 +1,93 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace ButcherManage.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("ButcherManage.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;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap close {
get {
object obj = ResourceManager.GetObject("close", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap title {
get {
object obj = ResourceManager.GetObject("title", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap wfLogo {
get {
object obj = ResourceManager.GetObject("wfLogo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

+ 130
- 0
ButcherManage.Form/Properties/Resources.resx View File

@ -0,0 +1,130 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="title" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\title.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wfLogo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wfLogo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="close" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

BIN
ButcherManage.Form/Resources/close.png View File

Before After
Width: 30  |  Height: 30  |  Size: 3.2 KiB

BIN
ButcherManage.Form/Resources/title.png View File

Before After
Width: 181  |  Height: 25  |  Size: 3.1 KiB

BIN
ButcherManage.Form/Resources/wfLogo.png View File

Before After
Width: 44  |  Height: 44  |  Size: 2.7 KiB

+ 31
- 0
ButcherManage.Form/Utils/ControlsUtil.cs View File

@ -0,0 +1,31 @@
using ButcherManage.BO;
using ButcherManage.BO.LocalBL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ButcherManage.Utils
{
public static class ControlsUtil
{
public static void EBindComboBox<T>(this ComboBox box, Func<T, bool> SetSelectIndex = null, int top = 10, params string[] extendFields)
where T : BaseInfo, new()
{
box.DisplayMember = "Name";
box.ValueMember = "ID";
var list = BaseInfoBL.GetList<T>(top, extendFields: extendFields);
box.DataSource = list;
if (SetSelectIndex != null)
{
var idx = list.FindIndex(x => SetSelectIndex(x));
if (idx > 0)
box.SelectedIndex = idx;
}
box.Refresh();
}
}
}

+ 9
- 0
ButcherManage.Login/ButcherManage.Login.csproj View File

@ -90,6 +90,15 @@
<ItemGroup>
<Resource Include="Images\login.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\wfLogo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\title.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Images\close.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
ButcherManage.Login/Images/close.png View File

Before After
Width: 30  |  Height: 30  |  Size: 3.2 KiB

BIN
ButcherManage.Login/Images/title.png View File

Before After
Width: 181  |  Height: 25  |  Size: 3.1 KiB

BIN
ButcherManage.Login/Images/wfLogo.png View File

Before After
Width: 44  |  Height: 44  |  Size: 2.7 KiB

+ 27
- 0
ButcherWeight/ButcherWeight.csproj View File

@ -50,6 +50,11 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="RecordView.cs">
<SubType>Form</SubType>
</Compile>
@ -84,6 +89,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="RecordView.resx">
<DependentUpon>RecordView.cs</DependentUpon>
</EmbeddedResource>
@ -94,6 +103,24 @@
<DependentUpon>WeightForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Resources\green.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\red.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\yellow.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\silvery.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\silvery1.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\bgTitle.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.


+ 113
- 0
ButcherWeight/Properties/Resources.Designer.cs View File

@ -0,0 +1,113 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace ButcherWeight.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("ButcherWeight.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;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap bgTitle {
get {
object obj = ResourceManager.GetObject("bgTitle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap green {
get {
object obj = ResourceManager.GetObject("green", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap red {
get {
object obj = ResourceManager.GetObject("red", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap silvery {
get {
object obj = ResourceManager.GetObject("silvery", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap yellow {
get {
object obj = ResourceManager.GetObject("yellow", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

+ 136
- 0
ButcherWeight/Properties/Resources.resx View File

@ -0,0 +1,136 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="red" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\red.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="green" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="yellow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\yellow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="silvery" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\silvery.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="bgTitle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bgTitle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

BIN
ButcherWeight/Resources/bgTitle.png View File

Before After
Width: 1  |  Height: 40  |  Size: 1.0 KiB

BIN
ButcherWeight/Resources/green.png View File

Before After
Width: 90  |  Height: 42  |  Size: 1.8 KiB

BIN
ButcherWeight/Resources/red.png View File

Before After
Width: 90  |  Height: 42  |  Size: 1.5 KiB

BIN
ButcherWeight/Resources/silvery.png View File

Before After
Width: 90  |  Height: 42  |  Size: 1.4 KiB

BIN
ButcherWeight/Resources/silvery1.png View File

Before After
Width: 90  |  Height: 42  |  Size: 1.4 KiB

BIN
ButcherWeight/Resources/yellow.png View File

Before After
Width: 90  |  Height: 42  |  Size: 1.6 KiB

+ 1483
- 1387
ButcherWeight/WeightForm.Designer.cs
File diff suppressed because it is too large
View File


+ 33
- 3
ButcherWeight/WeightForm.cs View File

@ -33,6 +33,25 @@ namespace ButcherWeight
}
#endregion
private Point mousePoint = new Point();
private void panel_title_MouseDown(object sender, MouseEventArgs e)
{
base.OnMouseDown(e);
this.mousePoint.X = e.X;
this.mousePoint.Y = e.Y;
}
private void panel_title_MouseMove(object sender, MouseEventArgs e)
{
base.OnMouseMove(e);
if (e.Button == MouseButtons.Left)
{
this.Top = Control.MousePosition.Y - mousePoint.Y;
this.Left = Control.MousePosition.X - mousePoint.X;
}
}
private delegate void InvokeHandler();
bool mainIsRun = false;
@ -47,6 +66,17 @@ namespace ButcherWeight
public WeightForm()
{
InitializeComponent();
foreach (var c in panel4.Controls)
{
if (c is Button)
{
var btn = c as Button;
btn.FlatStyle = FlatStyle.Flat;
btn.FlatAppearance.BorderSize = 0;
}
}
this.Width = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width;
this.Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height;
uDatePicker1.Date = DateTime.Today;
supplierSelect.Init("BaseInfoRpc/GetSupplierList");
purchaseTypeSelect.Init("BaseInfoRpc/GetPurchaseTypeList");
@ -147,10 +177,10 @@ namespace ButcherWeight
billGrid.DataSource = dmoList.OrderByDescending(x => x.ID).OrderBy(x => x.FinishWeight).ToList();
foreach (DataGridViewRow row in billGrid.Rows)
{
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");
row.DefaultCellStyle.BackColor = Color.FromArgb(236, 152, 62);
else if ((bool)row.Cells["M_FinishWeight"].Value)
row.DefaultCellStyle.BackColor = Color.FromArgb(23, 223, 51);
}
totalNumLbl.Text = dmoList.Sum(x => x.Number ?? 0).ToString();
billGrid.Refresh();


+ 248
- 54
ButcherWeight/WeightForm.resx View File

@ -117,154 +117,348 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="F_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="panel3.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAAEAAAAoCAIAAACw1AcgAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAACPSURBVBhXFcOHFoEAAEDR9wtGtmOnUKHsvT/czN4k
H0P3nMvM+DLTv0x1m2nZZlL6MHYWLUaaxVB9M1De9JUXvcKTbv5JJ/egLd1pZW80xRuNzJV6+kItdaaa
PFFJnDDiR/TYgXJ0TymypxjeoYW2qEETJWBS8G/I+9bkhDWysEL2rpA8S7Ju5wLR9e+a/wA97S5ZX5Ah
VwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="S_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="S_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_Farmer_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="S_Sanction_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="S_AbnormalItem_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_Farmer_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="S_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="S_AbnormalItem_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="S_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_Money.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="F_Farmer_IDCard.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="F_Farmer_BankAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_LiveColonyHouse_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="F_Farmer_Tel.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="F_Farmer_Address.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="D_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="H_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_SanctionMoney.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_Weight.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="M_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_MaoWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_PurchaseType_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_PiWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_Employee_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="D_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_Supplier_Name.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">
<metadata name="M_Car_Name.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">
<metadata name="M_B3ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_LiveColonyHouse_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_PrintNumber.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="M_FinishWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_LiveColonyHouse_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="H_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_HouseNames.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="S_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="M_Remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="S_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="D_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="S_Sanction_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="readPiBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAM7SURBVGhD7dpZTypBEIbh+XvHn+uCuOOuuIs77iK4
bxFQo/bxq5Nqa5oCROXmTF28CYlkiA8J09NdUTab/TM3N1ecn593CwsLbnFx0S0tLbnl5WW3srJCra6u
Urlczre2tpbIpAG7sBPMYAdDWMIUtjAGdPHm5sa9vb3Fen9/t75R6AhbGEezs7Pu9fXVamMwjmZmZtzz
83Osl5cX6weFnjAm6Eql4qrV6pd6enqyPtJstGBL0NPT0+7x8VGtXC5bLaQZIhhHU1NT7u7uznd/f1+3
h4cHS6QZcdIUxtHk5KS7vr6mcIfUur29tRqkmSF2hXE0MTHhzs/P3cXFRU2Xl5dWC2mGsIUxQZ+enrpi
sRirVCo17OzsLJFpFrLQEbYEPT4+7o6Ojqjj4+NYJycndSsUColMs+BCP3aFcTQ2Nub29vao/f39mg4O
DqwvpNmxK4yj0dFRt729HWtnZ6emfD5vKWlWoSeMCZo3TNbX12NtbGxYLRT6sStBZzIZv/sk450pLbmD
lcQ0E06zhHE0MjJC23m8TVovbP1ZtWlWHLvCmKCxu6SVzWatFtIMEUEPDw/Ts7jVvmBM0FhQIzwqWr8X
u3porPM4LK6tnydNPTSWH5x8g/X9pKlBtzFpatBtTJp6aO2N2u+O1TzN0kPz3bFR2l3V+lxZNMpD46jF
al8EPTQ0pC6yrd8LxgStPU5av5eHbrY5Yn0/2HpoDOdpYWDP+nqaISLowcHBminJZnuuVv1CR9jCmKA3
Nzcp7dQAhScHVjzNDLErQQ8MDDQ98+K2trYskWaEQk8YE3R4aru7u1uTdjBp5VUrdmRXgu7v7/fzB4eH
h75mR+nWZ9JKGrIrjAka0zThcIg2CCKTF0xSmoW0koYwha2HlqNM+APD15vOkRdOYqGHtGI/9oQtQff1
9flhPKTNmIVfgvUvicmxH3vCFsYEfXV1RYUTkRKekxdNcqELo3KwZFeCTqfTfsaX53kbwVufSRsJy44w
hS2MAV3EjzxPp8vB6hCe8cPkB/6Paf+zNJGwjMuesP0wLgG6Ay96e3tdKpWienp6qO7ubl9XV5evs7Mz
0UkLacRu7AjTD9tCOp3u+Au2mDGZwgrkuwAAAABJRU5ErkJggg==
</value>
</data>
<data name="weightSet.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAM7SURBVGhD7dpZTypBEIbh+XvHn+uCuOOuuIs77iK4
bxFQo/bxq5Nqa5oCROXmTF28CYlkiA8J09NdUTab/TM3N1ecn593CwsLbnFx0S0tLbnl5WW3srJCra6u
Urlczre2tpbIpAG7sBPMYAdDWMIUtjAGdPHm5sa9vb3Fen9/t75R6AhbGEezs7Pu9fXVamMwjmZmZtzz
83Osl5cX6weFnjAm6Eql4qrV6pd6enqyPtJstGBL0NPT0+7x8VGtXC5bLaQZIhhHU1NT7u7uznd/f1+3
h4cHS6QZcdIUxtHk5KS7vr6mcIfUur29tRqkmSF2hXE0MTHhzs/P3cXFRU2Xl5dWC2mGsIUxQZ+enrpi
sRirVCo17OzsLJFpFrLQEbYEPT4+7o6Ojqjj4+NYJycndSsUColMs+BCP3aFcTQ2Nub29vao/f39mg4O
DqwvpNmxK4yj0dFRt729HWtnZ6emfD5vKWlWoSeMCZo3TNbX12NtbGxYLRT6sStBZzIZv/sk450pLbmD
lcQ0E06zhHE0MjJC23m8TVovbP1ZtWlWHLvCmKCxu6SVzWatFtIMEUEPDw/Ts7jVvmBM0FhQIzwqWr8X
u3porPM4LK6tnydNPTSWH5x8g/X9pKlBtzFpatBtTJp6aO2N2u+O1TzN0kPz3bFR2l3V+lxZNMpD46jF
al8EPTQ0pC6yrd8LxgStPU5av5eHbrY5Yn0/2HpoDOdpYWDP+nqaISLowcHBminJZnuuVv1CR9jCmKA3
Nzcp7dQAhScHVjzNDLErQQ8MDDQ98+K2trYskWaEQk8YE3R4aru7u1uTdjBp5VUrdmRXgu7v7/fzB4eH
h75mR+nWZ9JKGrIrjAka0zThcIg2CCKTF0xSmoW0koYwha2HlqNM+APD15vOkRdOYqGHtGI/9oQtQff1
9flhPKTNmIVfgvUvicmxH3vCFsYEfXV1RYUTkRKekxdNcqELo3KwZFeCTqfTfsaX53kbwVufSRsJy44w
hS2MAV3EjzxPp8vB6hCe8cPkB/6Paf+zNJGwjMuesP0wLgG6Ay96e3tdKpWienp6qO7ubl9XV5evs7Mz
0UkLacRu7AjTD9tCOp3u+Au2mDGZwgrkuwAAAABJRU5ErkJggg==
</value>
</data>
<data name="exitBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAM7SURBVGhD7dpZTypBEIbh+XvHn+uCuOOuuIs77iK4
bxFQo/bxq5Nqa5oCROXmTF28CYlkiA8J09NdUTab/TM3N1ecn593CwsLbnFx0S0tLbnl5WW3srJCra6u
Urlczre2tpbIpAG7sBPMYAdDWMIUtjAGdPHm5sa9vb3Fen9/t75R6AhbGEezs7Pu9fXVamMwjmZmZtzz
83Osl5cX6weFnjAm6Eql4qrV6pd6enqyPtJstGBL0NPT0+7x8VGtXC5bLaQZIhhHU1NT7u7uznd/f1+3
h4cHS6QZcdIUxtHk5KS7vr6mcIfUur29tRqkmSF2hXE0MTHhzs/P3cXFRU2Xl5dWC2mGsIUxQZ+enrpi
sRirVCo17OzsLJFpFrLQEbYEPT4+7o6Ojqjj4+NYJycndSsUColMs+BCP3aFcTQ2Nub29vao/f39mg4O
DqwvpNmxK4yj0dFRt729HWtnZ6emfD5vKWlWoSeMCZo3TNbX12NtbGxYLRT6sStBZzIZv/sk450pLbmD
lcQ0E06zhHE0MjJC23m8TVovbP1ZtWlWHLvCmKCxu6SVzWatFtIMEUEPDw/Ts7jVvmBM0FhQIzwqWr8X
u3porPM4LK6tnydNPTSWH5x8g/X9pKlBtzFpatBtTJp6aO2N2u+O1TzN0kPz3bFR2l3V+lxZNMpD46jF
al8EPTQ0pC6yrd8LxgStPU5av5eHbrY5Yn0/2HpoDOdpYWDP+nqaISLowcHBminJZnuuVv1CR9jCmKA3
Nzcp7dQAhScHVjzNDLErQQ8MDDQ98+K2trYskWaEQk8YE3R4aru7u1uTdjBp5VUrdmRXgu7v7/fzB4eH
h75mR+nWZ9JKGrIrjAka0zThcIg2CCKTF0xSmoW0koYwha2HlqNM+APD15vOkRdOYqGHtGI/9oQtQff1
9flhPKTNmIVfgvUvicmxH3vCFsYEfXV1RYUTkRKekxdNcqELo3KwZFeCTqfTfsaX53kbwVufSRsJy44w
hS2MAV3EjzxPp8vB6hCe8cPkB/6Paf+zNJGwjMuesP0wLgG6Ay96e3tdKpWienp6qO7ubl9XV5evs7Mz
0UkLacRu7AjTD9tCOp3u+Au2mDGZwgrkuwAAAABJRU5ErkJggg==
</value>
</data>
<data name="deleteBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAQHSURBVGhD7dlnc9NYGIZh/SVMZygh3aYMSfCaQOi9
90xgKEP5qUzYhZ0liavaeXifIx1ZsbXZAEo+sO+H25OJzpEn19GoxQsajWqwsLAcXL6M4Pp1hLdvI7x3
D+GDBwgfP0b45AnCZ8+Snj/X8jkXGtGKZrQTQ1paU9qKsRfU68uxbMDTp8DiIvDyJfD6NfD2LfDuHfD+
PfDhQ9LHj1o+50IjWtGMdjSkpZjSlsZeMDsL3L0LPHwIyMpAVgpLS8ngV6+SiW/eJDvRhqMNjWhFM9rR
kJY0FVsae8HJkzA3b8LcuQMjh7559AhGVsLIYCOrYmSi7cULGNmRlosmzodWNKMdDWlJU7GlsRccOwZz
5QrMjRswcpgbWQFz/z6MrIadICtjJzM5H2m5nAuNaEUz2tGQljQVWxp7wdQUzPnzMJcuwVy9CiMncXuE
37qVrAgnyQne7kAbjjY0ohXNaEdDWtJUbGns+ePjiOfnEZ87h/jCBcSyMZarZSwD42vXEMukWFYmlh1o
BdGGRrSiGe1oSEuaii2NPX9kBPHcHOJ6HXGjgfjs2WTAwgJiWQ074eLF9XFH/+cGPWhEK5rRjoa0pKnY
0tjzDx1CJCfr6NQMoplZRHOnEZ2uI/qjkdQ4g+jMfJKsjpbLudDIedGOhrSkqdjS2PP370dUrSKq1RAd
P47oxIkU/lTSDBdAklsUrSDn47xoR0Na0lRsaez5e/YglHNIODGBcHISoZy4w+npJBlkkwnaBjkn50ZD
WtJUbGns+bt2ITxyBKGcR8KjR5NGR5PGxpJF0P47Wjk350hTsaWx15OP4PDh4WSATQZrm8h5FVjS2EL7
Bw8i0LYk2vahDxywBVqpOdcMuidXRcaro1ZezrUPvW+fzddKzbn2offutflaqTnXDLor93msp5Va5ppB
795t62mllrkq9Nam0NuUQm9TCr1NDUO7q6NWakN3HXofvTUN3Ufrk+HWNPxkmD6TFz2vaz/f0LsO95ZJ
3+CVV960D52+Nx2s6P2q9u8VGTIL3ZWPHv8LkMvXfqlBTxpb6KLBWnlZ6M7OneiNjGR1tVLKm9LYaxN6
dHRdXe2XGvSksYXujo3ZOvLLfG3thxr0c64WukXo8XFbJ1d7g1q5irb/jm32b84bOlcae0356ExO2tpp
LTYxkdXUNixvRTvn6Fxp7K3xiJ6aQkdaB80BaWvahjkn55ZBiyltaWyh29PTtpbUlNYYB0ir2qZyXrSj
IS2dq4VerVTQrlbRkpoSB66mrQz0TVvXoI9zs9ipKW1p7K1UKstNuTK2arUEmhvS3A6KvkTrl0GnbjS0
0DQVWzH+TOjaP/KDhL937LB9lb6k/ZX2p1aY83FetHOONJU+rVQqte8yXEiwsS/KlwAAAABJRU5ErkJg
gg==
</value>
</data>
<data name="printBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAM7SURBVGhD7dpZTypBEIbh+XvHn+uCuOOuuIs77iK4
bxFQo/bxq5Nqa5oCROXmTF28CYlkiA8J09NdUTab/TM3N1ecn593CwsLbnFx0S0tLbnl5WW3srJCra6u
Urlczre2tpbIpAG7sBPMYAdDWMIUtjAGdPHm5sa9vb3Fen9/t75R6AhbGEezs7Pu9fXVamMwjmZmZtzz
83Osl5cX6weFnjAm6Eql4qrV6pd6enqyPtJstGBL0NPT0+7x8VGtXC5bLaQZIhhHU1NT7u7uznd/f1+3
h4cHS6QZcdIUxtHk5KS7vr6mcIfUur29tRqkmSF2hXE0MTHhzs/P3cXFRU2Xl5dWC2mGsIUxQZ+enrpi
sRirVCo17OzsLJFpFrLQEbYEPT4+7o6Ojqjj4+NYJycndSsUColMs+BCP3aFcTQ2Nub29vao/f39mg4O
DqwvpNmxK4yj0dFRt729HWtnZ6emfD5vKWlWoSeMCZo3TNbX12NtbGxYLRT6sStBZzIZv/sk450pLbmD
lcQ0E06zhHE0MjJC23m8TVovbP1ZtWlWHLvCmKCxu6SVzWatFtIMEUEPDw/Ts7jVvmBM0FhQIzwqWr8X
u3porPM4LK6tnydNPTSWH5x8g/X9pKlBtzFpatBtTJp6aO2N2u+O1TzN0kPz3bFR2l3V+lxZNMpD46jF
al8EPTQ0pC6yrd8LxgStPU5av5eHbrY5Yn0/2HpoDOdpYWDP+nqaISLowcHBminJZnuuVv1CR9jCmKA3
Nzcp7dQAhScHVjzNDLErQQ8MDDQ98+K2trYskWaEQk8YE3R4aru7u1uTdjBp5VUrdmRXgu7v7/fzB4eH
h75mR+nWZ9JKGrIrjAka0zThcIg2CCKTF0xSmoW0koYwha2HlqNM+APD15vOkRdOYqGHtGI/9oQtQff1
9flhPKTNmIVfgvUvicmxH3vCFsYEfXV1RYUTkRKekxdNcqELo3KwZFeCTqfTfsaX53kbwVufSRsJy44w
hS2MAV3EjzxPp8vB6hCe8cPkB/6Paf+zNJGwjMuesP0wLgG6Ay96e3tdKpWienp6qO7ubl9XV5evs7Mz
0UkLacRu7AjTD9tCOp3u+Au2mDGZwgrkuwAAAABJRU5ErkJggg==
</value>
</data>
<data name="createBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAASRSURBVGhD7djrbxRVHMbxI2pDC7TSXVEMIN4qYrWC
Ag0BwWoKrQpIvMXLn6AxxsTERBM1KkYE7XV72YKlFQrlXi4WvP8rpi1gd3a27brrXh5/z8ye7ZRdSZVd
33hefCfZzDnz4vNi9jdH4Wh1A46vHsGpWmBoI3C2DjhXD5xvAIafkbYBF3ZIzwEXd5q80YQ2NKIVzWhH
Q1rSlLZirDC4ciR9ZgPSw/VIX2xE+vvtSP+4E+mfXkD655eR/uUV6VXpNaR/fd3kjSaOjRjRima0oyEt
aSq2NFY4UoWU/Eidq0PqfD1Sww1IXXhWFu6QDbLph+clPuBF6SXTjMSENjSilZjRzjGkJU0JLcYKA3ch
eXIdUqcFe2iz3HhSFmyRhbL4u6clbtwmbZfkQSZPNBEbGtGKZrSjIS3FlLY0Vji4FMnB1UgeW4vkifVy
YyOSpzYheboOyaGnpHokz2yRtiJ5tsHkjSa0oRGtaEY7GtKSpmJLY4X+25E49CASAzVIHHkUicE1SByt
ReLYeiSOb5AeR+LEJmmz28knTEx70IZGtKIZ7WhIS5qKLY0V+vyI91Yh3vcA4v3ViH9bg/jBVYgfegzx
gTXSWsQPr5NqTXkTGxrRima0oyEtaSq2NFborUAsuByxffcgtr8KsW9WINa7ErED1dJDiPU9LNVIj0zX
v+r/ndfCsREjWtGMdjSkJU3FlsYK++chGliMaMcSRDuXIdq1XLob0e57EQ3eJ1Uh2nN/phWmGWVcaEQr
mtGOhrSkqdjSWKGnBJNNfmkRpppvw1TLYky13oGptiXSUmmZW/udpnxpH8dKzGhHQ7GkKW1prBCcg8ju
cqkCkS8XIrKnUvJhYq9futXtq0Wma6WdxIx2jiEtaSq2NFboVrA/LZXKYH82T5oPe9eCTOWwP68wzSZa
aTca0pKmYktjle5SsD6am6dSt4/LTLNJe+WxpLEDPf5BCUKmokTbLPSV9252+t1U0LRrFvryuzc5XTEV
NO2ahb70zo1Ol00FTbtmocfenuN0yVTQtGsWevStG5zGTAVNu05Dv+k2Zipo2jULPfKG26ipoGlXA13k
DPR/VA60eUcXp5x3tJk6ilPO1GHm6OKUM0ebL8PilPNlaM46ilPOWYc+ZTIneIXLa5qFHn+/xC1zfqrL
d75q+vuu9tOuDnSK0B/OnVHIdF1d7UljB9r6pNRUxBzoZKdA7yrLFjIVJK8pjVVCLuHd892+cLNM15V2
1K40Vn92CPTeBU6Wbk9uIVPe8llpR+1KYwfabq6A3eQWzmR9bfo3aT/tSVsHOh5QiLTeAlsKt8iiTBaT
RSxkumbaiWZeQ5rSlsYqJpeJwEJEAoLd7hbOZLWZ/knaTTvSlLY0VrF2ge6qRKSzErYU7nCzAm4h06zS
XtqPljSlLY3VH4QO+hDp9sGWwl0+WLpOH0Kexk0z8trQSrvRkJY0pS2NVbRNjUwGyxHZ54fd40c46GZJ
oe7pxk158xrRTPvRkqa0FeNRQjdOtqrRiVb5U2yRCYQ1y8gnWU3ThUx58xrRjHY0pCVNxfa3aJtq/AtE
zMwwHDdDbgAAAABJRU5ErkJggg==
</value>
</data>
<data name="commitBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAaTSURBVGhD7dhXWxNpGMbxOVsIFgiIIl2pgkAAEZAu
iCCCIPa1fM7dtdCR3gMEUBAIJZRvcO9zT+YNYxx191JPnDn4H/Bm8nI9v3euIUGrmittqZ0v3765UIXb
3nrc8TaifbEZnUut6F66i4fLHXi83IWnvm488z3Ac98jvFh5jJcrT0K9Wnn6W2eelbPTgBY0oQ2NaEUz
2tGQljSlLY21yrni7crtGlQfNKHu8DYaD9vQfNiB1qNO3D3qRsfRQ3QdPcH9o2foPn6Gh8fP8ej4hd7j
45d6T45f/dapOdXcNKAFTWhDI1rRjHY0pCVNaUtjrXy2CGX78kOgATWBW6gPtKDxQLAPBPugE20H99F+
8AD3Dh+h61DAD59Kgm704PBPW6Tm5ew0oAVNaEMjWtGMdjSkJU1pS2Pt2mwBindvoGyvBhV79ajekzt7
vxkN+61o2r+L5v0OtAQ6cSfQhbaAoAceoCPwUO9e4JGtUnPTgBY0oQ2NaEUz2tGQljSlLY214pk8FPrL
Ubwj2DuCvVOPqt1G1O42o373Nhp2W9G414Zbe+1o3hP0vU607nXp3bFZam4a0IImtKERrWhGOxrSkqa6
rRhrRdM5yN8sReGWLGyJ/lY1yrfr5NnSgOrtJtT6Bdwv4P4W3PTfQaO/DU3+u3q3dtptlZqbBrSgCW1o
RCua0Y6GtKQpbWmsXZ3ORO66B/kbJSjYKINnowKln6pQ9knAP9WiclPu8M2bqN6Uu3zzFuo2BX7ztl7D
VoutUnPTgBY0oQ2NaEUz2tGQljSlLY213Kl0ZKxdRfZaEa58KMbVD9dQ+PE6PB8rUfKxCqUfq1G2Lg/0
9TpUrNejcr0BN9Zv6lVtyC+yUWpuGtCCJrShEa1oRjsa0pKmtKWxljWZgnRfLjJ8+chaKUDuigd5KwK+
Ko+T1TIUrZbDs1qBkrUbKF2rwrW1ar2ytRq96zZJzavmpwVNaEMjWtGMdjSkJU1pS2MtYzIRSd4spC7m
IH3xCjKWriJrqRA5Sx7kLhcjb7kE+culKFguQ6HvOop85XoeX8VnFfsqf8vC51Tz04ImtKERrWhGOxrS
kqa0pbGWPnEBCXOXkDiXgeT5LKTNC/hCLi4v5CFzQdAXCpDjLUKu14Mr3mK9PK/g2zTOrhxoQhsa0Ypm
tKMhLWlKWxprKePxOD+digvT6bg4fRmJMwI+I3f4TDbSZgV9VtBn85Axm6+XOSf4cwWhsucKbZF5Zhoo
D9rQiFY0ox0NaUlT2tJYSxyPhXv8IuLGkxA/kYLzE4I+kY6EyUu4OHkZSZOZSJ7MQspUsNSpbL20qRxb
puZXHrShEa1oRjsa0pKmtKWxljAWjbMjFxAtuUcuInYkEedGkxE/KuijqVIaLoyl6yWMCf7Y5VCJYxm2
yjw7LZQLjWhFM9rRkJY0pS2Ntfix0zg1eA6nB+NxZvA8zg4JuhQzlAD3kMAPJyJuOEnv3HCyXvxwiq1T
DsqFRrSiGe1oSEua0pbGWuyoC5F9MXD1uRHVH4tT/XE43S/w0pn+eJwdEHwp2ihmQA7BKeShfGil3GhI
S5rSlsY69B890aEiemL0InvccPXKxVJUr7zR6FSvbOT0mYlyopnyM5sGoUcE+q0sfKWIt/JGo8h3ckJO
ocw2VnYqGgeh/zkb7PV/K+K1HICNszKxzHA9gf5bFlQK3enHMpmeQP8lCyrTBU4/kMnUgf6VmUwd6F+Z
yfQE2upCq+eO0/ezsDyBtnpDeFZ/VZ2srcI6gX4jH1mcfllB6PcCbfEh2+nnReMgtOnrotPPLwQd0Sdf
I3udfkn8p5IOPSzQA7JgVb/T/8rKUKJxEHpYFoa+0aDTN7MyU4ltEHrIhcgR90nvv9Owk56VjTmTKY2D
0OOyMBbWqFUxXzZik6xmtzIKdxTbIPSgQE/GGskLE2HxEMyFb2TXwl3C3WhpuNJYh3ZNu0+aMiUXfzXZ
zJZZWajMdiZTHdpN6LnYYLNGM2FNG005fZZyCfdSjoYrjTX3gEAvyAKbN1LwZnxz4RvbLSsTs5lyNFxp
rENHLcUiatHIKy8yhf+1A3D6AlRP7GgY8hTbIHS/QPvigi3HwbVktGjkDWvBSS/cRXkZfrRUrjQOQq/K
wopcIIt6BFfoagMrdLtntqGVcjMcaUpbBb19eiEmiG2Am+9wPZ6QSjZ1kswmykm5GcCMtmLsJ3Sru8/l
d/e6oNcjvYsM9tbUG1OvbZ7Zwmyk3GioPPtcm+5+V+u/azUE+VLSRDEAAAAASUVORK5CYII=
</value>
</data>
<data name="readMaoBtn.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAqCAYAAAAzikzDAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAM7SURBVGhD7dpZTypBEIbh+XvHn+uCuOOuuIs77iK4
bxFQo/bxq5Nqa5oCROXmTF28CYlkiA8J09NdUTab/TM3N1ecn593CwsLbnFx0S0tLbnl5WW3srJCra6u
Urlczre2tpbIpAG7sBPMYAdDWMIUtjAGdPHm5sa9vb3Fen9/t75R6AhbGEezs7Pu9fXVamMwjmZmZtzz
83Osl5cX6weFnjAm6Eql4qrV6pd6enqyPtJstGBL0NPT0+7x8VGtXC5bLaQZIhhHU1NT7u7uznd/f1+3
h4cHS6QZcdIUxtHk5KS7vr6mcIfUur29tRqkmSF2hXE0MTHhzs/P3cXFRU2Xl5dWC2mGsIUxQZ+enrpi
sRirVCo17OzsLJFpFrLQEbYEPT4+7o6Ojqjj4+NYJycndSsUColMs+BCP3aFcTQ2Nub29vao/f39mg4O
DqwvpNmxK4yj0dFRt729HWtnZ6emfD5vKWlWoSeMCZo3TNbX12NtbGxYLRT6sStBZzIZv/sk450pLbmD
lcQ0E06zhHE0MjJC23m8TVovbP1ZtWlWHLvCmKCxu6SVzWatFtIMEUEPDw/Ts7jVvmBM0FhQIzwqWr8X
u3porPM4LK6tnydNPTSWH5x8g/X9pKlBtzFpatBtTJp6aO2N2u+O1TzN0kPz3bFR2l3V+lxZNMpD46jF
al8EPTQ0pC6yrd8LxgStPU5av5eHbrY5Yn0/2HpoDOdpYWDP+nqaISLowcHBminJZnuuVv1CR9jCmKA3
Nzcp7dQAhScHVjzNDLErQQ8MDDQ98+K2trYskWaEQk8YE3R4aru7u1uTdjBp5VUrdmRXgu7v7/fzB4eH
h75mR+nWZ9JKGrIrjAka0zThcIg2CCKTF0xSmoW0koYwha2HlqNM+APD15vOkRdOYqGHtGI/9oQtQff1
9flhPKTNmIVfgvUvicmxH3vCFsYEfXV1RYUTkRKekxdNcqELo3KwZFeCTqfTfsaX53kbwVufSRsJy44w
hS2MAV3EjzxPp8vB6hCe8cPkB/6Paf+zNJGwjMuesP0wLgG6Ay96e3tdKpWienp6qO7ubl9XV5evs7Mz
0UkLacRu7AjTD9tCOp3u+Au2mDGZwgrkuwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="msg_Supplier_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="S_AbnormalItem_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="msg_Car_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="S_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="msg_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="S_AbnormalItem_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<metadata name="farmerMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>417, 5</value>
</metadata>
<metadata name="S_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<metadata name="weightSerialPort.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>541, 13</value>
</metadata>
<metadata name="M_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="D_PiWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_FinishWeight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="D_MaoWeight.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">
<metadata name="D_Index.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">
<metadata name="D_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_Car_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="D_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_Supplier_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="D_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_Employee_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_Farmer_Address.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_PurchaseType_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_Farmer_Tel.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">
<metadata name="F_Farmer_BankAccount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_Farmer_IDCard.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_HouseNames.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_Money.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_SanctionMoney.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_Weight.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="M_Remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="weightSerialPort.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>268, 5</value>
<metadata name="F_Farmer_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="farmerMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>143, 5</value>
<metadata name="F_Index.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="msg_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_WeightBill_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="msg_Car_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="msg_Supplier_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="F_Farmer_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">


+ 5
- 1
WeighAndGrading/BodyDiscontSetting.cs View File

@ -45,9 +45,13 @@ namespace WeighAndGrading
var connection = LoginRpcUtil.TestConnection();
if (connection)
{
GradeAndWeightRpc.SaveBodyDiscontItem(list);
try
{
GradeAndWeightRpc.SaveBodyDiscontItem(list);
if (existFile)
File.Delete(changeFlagPath);
}
catch { }
}
else if (!existFile)
File.WriteAllText(changeFlagPath, string.Empty);


+ 7
- 3
WeighAndGrading/DataViewForm.cs View File

@ -318,7 +318,7 @@ namespace WeighAndGrading
{
list = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, tang);
}
catch (TimeoutException) { }
catch (Exception ex) { }
}
}
@ -546,8 +546,12 @@ namespace WeighAndGrading
VerifyConnection();
if (connection)
{
disconts = GradeAndWeightRpc.GetBodyDiscontItem();
XmlUtil.SerializerObjToFile(disconts, discontPath);
try
{
disconts = GradeAndWeightRpc.GetBodyDiscontItem();
XmlUtil.SerializerObjToFile(disconts, discontPath);
}
catch { }
}
else
disconts = XmlUtil.DeserializeFromFile<List<BodyDiscontItem>>(discontPath);


+ 11
- 15
WeighAndGrading/GradeFrom.Designer.cs View File

@ -104,8 +104,8 @@
this.btnStartWeight = new System.Windows.Forms.Button();
this.btnStopWeight = new System.Windows.Forms.Button();
this.dataConfirmBtn = new System.Windows.Forms.Button();
this.batchSelect = new BWP.WinFormControl.UComboBox();
this.label3 = new System.Windows.Forms.Label();
this.batchSelect = new System.Windows.Forms.ComboBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tangGridView)).BeginInit();
this.groupBox2.SuspendLayout();
@ -820,19 +820,6 @@
this.dataConfirmBtn.UseVisualStyleBackColor = true;
this.dataConfirmBtn.Click += new System.EventHandler(this.dataConfirmBtn_Click);
//
// batchSelect
//
this.batchSelect.CodeArgs = null;
this.batchSelect.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.batchSelect.EnableTopItem = true;
this.batchSelect.Font = new System.Drawing.Font("宋体", 14F);
this.batchSelect.FormattingEnabled = true;
this.batchSelect.Location = new System.Drawing.Point(603, 8);
this.batchSelect.Name = "batchSelect";
this.batchSelect.Range = 10;
this.batchSelect.Size = new System.Drawing.Size(204, 30);
this.batchSelect.TabIndex = 44;
//
// label3
//
this.label3.AutoSize = true;
@ -843,6 +830,15 @@
this.label3.TabIndex = 43;
this.label3.Text = "批次";
//
// batchSelect
//
this.batchSelect.Font = new System.Drawing.Font("宋体", 14F);
this.batchSelect.FormattingEnabled = true;
this.batchSelect.Location = new System.Drawing.Point(603, 11);
this.batchSelect.Name = "batchSelect";
this.batchSelect.Size = new System.Drawing.Size(204, 27);
this.batchSelect.TabIndex = 45;
//
// GradeFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@ -964,7 +960,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight;
private System.Windows.Forms.DataGridViewTextBoxColumn H_Time;
private BWP.WinFormControl.UComboBox batchSelect;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox batchSelect;
}
}

+ 32
- 9
WeighAndGrading/GradeFrom.cs View File

@ -86,7 +86,22 @@ namespace WeighAndGrading
maoGridView.DataSource = null;
historyGrid.AutoGenerateColumns = false;
historyGrid.DataSource = null;
batchSelect.Init("BaseInfoRpc/GetProductBatchList");
try
{
LocalGradeAndWeightBL.LoadProductBatchFromServer();
}
catch
{
#if DEBUG
throw;
#endif
}
batchSelect.DataSource = LocalGradeAndWeightBL.GetProductBatch();
batchSelect.DisplayMember = "Name";
batchSelect.ValueMember = "ID";
tangList = new List<GradeAndWeight>();
maoList = new List<GradeAndWeight>();
noLivestockList = new ConcurrentQueue<GradeAndWeight_Detail>();
@ -242,7 +257,7 @@ namespace WeighAndGrading
private void syncBtn_Click(object sender, EventArgs e)
{
if (batchSelect.LongValue == null)
if (batchSelect.SelectedValue == null)
throw new Exception("请先选择批次");
if (butcherTimeInput.Date.Value == new DateTime(2018, 3, 15))
LocalGradeAndWeightBL.UpdateHistory(butcherTimeInput.Date.Value);
@ -346,7 +361,7 @@ namespace WeighAndGrading
{
list = GradeAndWeightRpc.GetGradeAndWeightList(butcherTimeInput.Date.Value, tang);
}
catch (TimeoutException) { }
catch (Exception ex) { }
}
}
@ -765,7 +780,7 @@ namespace WeighAndGrading
maxIndex++;
var entity = new GradeAndWeight_Detail();
entity.Index = maxIndex;
entity.ProductBatch_ID = batchSelect.LongValue;
entity.ProductBatch_ID = (long)batchSelect.SelectedValue;
if (currentRow != null)
{
entity.OrderDetail_ID = currentRow.OrderDetail_ID;
@ -861,7 +876,7 @@ namespace WeighAndGrading
maxIndex++;
var entity = new GradeAndWeight_Detail();
entity.Index = maxIndex;
entity.ProductBatch_ID = batchSelect.LongValue;
entity.ProductBatch_ID = (long)batchSelect.SelectedValue;
entity.Weight = (entity.Weight ?? 0) + weight;
entity.Time = DateTime.Now;
entity.Date = butcherTimeInput.Date.Value;
@ -1036,8 +1051,12 @@ namespace WeighAndGrading
VerifyConnection();
if (connection)
{
disconts = GradeAndWeightRpc.GetBodyDiscontItem();
XmlUtil.SerializerObjToFile(disconts, discontPath);
try
{
disconts = GradeAndWeightRpc.GetBodyDiscontItem();
XmlUtil.SerializerObjToFile(disconts, discontPath);
}
catch { }
}
else
disconts = XmlUtil.DeserializeFromFile<List<BodyDiscontItem>>(discontPath);
@ -1215,8 +1234,12 @@ namespace WeighAndGrading
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);
try
{
GradeAndWeightRpc.SaveBodyDiscontItem(changes);
File.Delete(changeFlagPath);
}
catch { }
}
}


+ 1
- 1
WeighAndGrading/WeightGradePrint.cs View File

@ -56,7 +56,7 @@ namespace WeighAndGrading
var imgUrl = string.Format("TempImg\\_img{0}.png", id);
try
{
BwpClientPrint.BwpClientWebPrint.Create2DPic(entity._2DQRCode, imgUrl, 120);
BwpClientPrint.BwpClientWebPrint.Create2DPic(entity._2DQRCode, imgUrl, 100);
}
catch (Exception ex)
{


Loading…
Cancel
Save