diff --git a/B3DealerClient/B3DealerClient.csproj b/B3DealerClient/B3DealerClient.csproj index 832648b..d0cfdfa 100644 --- a/B3DealerClient/B3DealerClient.csproj +++ b/B3DealerClient/B3DealerClient.csproj @@ -78,10 +78,18 @@ + + - - - + + + + + + + + + @@ -125,15 +133,26 @@ RecordViewDialog.xaml + + CarcassSaleOutWindow.xaml + + RecordViewDialog.xaml + + + + FreshInStoreWindow.xaml FreshSaleOutWindow.xaml + + Test.xaml + @@ -240,6 +259,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -248,6 +271,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + diff --git a/B3DealerClient/BL/BaseInfoBL.cs b/B3DealerClient/BL/BaseInfoBL.cs index c844949..6aa04f6 100644 --- a/B3DealerClient/BL/BaseInfoBL.cs +++ b/B3DealerClient/BL/BaseInfoBL.cs @@ -23,6 +23,9 @@ namespace B3DealerClient.BL case "Store": dataKind = "授权仓库"; break; + case "DriverGoodsLine": + dataKind = "B3Dealer_送货线路"; + break; default: throw new Exception(string.Format("未知的数据源类型:{0}", typeName)); } diff --git a/B3DealerClient/BL/CarcassInStoreBL.cs b/B3DealerClient/BL/CarcassInStoreBL.cs index 1c359d4..9332d61 100644 --- a/B3DealerClient/BL/CarcassInStoreBL.cs +++ b/B3DealerClient/BL/CarcassInStoreBL.cs @@ -26,7 +26,7 @@ namespace B3DealerClient.BL { var method = MethodPath + "GetPayBillDetails"; var json = RpcFacade.Call(method, id); - var list= JsonConvert.DeserializeObject>(json); + var list = JsonConvert.DeserializeObject>(json); FillAlreadyInfo(list); return list; } @@ -40,11 +40,11 @@ namespace B3DealerClient.BL query.Columns.Add(DQSelectColumn.Sum("NetWeight")); query.Columns.Add(DQSelectColumn.Sum("Pics")); query.GroupBy.Expressions.Add(DQExpression.Field("DetailID")); - query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("MainID", details.First().PayBill_ID), DQCondition.InList(DQExpression.Field("DetailID"), details.Select(x => DQExpression.Value(x.ID)).ToArray()))); + query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("DetailID"), details.Select(x => DQExpression.Value(x.ID)).ToArray())); var list = query.EExecuteList(); foreach (var item in list) { - var first = details.FirstOrDefault(x => x.ID == item.Item1); + var first = details.First(x => x.ID == item.Item1); first.AlreadyNumber = item.Item2; first.AlreadySecondNumber = item.Item3; } diff --git a/B3DealerClient/BL/CarcassSaleOutBL.cs b/B3DealerClient/BL/CarcassSaleOutBL.cs new file mode 100644 index 0000000..2db0038 --- /dev/null +++ b/B3DealerClient/BL/CarcassSaleOutBL.cs @@ -0,0 +1,92 @@ +using B3DealerClient.BO; +using Forks.EnterpriseServices.DomainObjects2.DQuery; +using Forks.JsonRpc.Client; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using B3DealerClient.Utils; +using Forks.EnterpriseServices.DomainObjects2; + +namespace B3DealerClient.BL +{ + public static class CarcassSaleOutBL + { + const string MethodPath = @"/MainSystem/B3Dealer/Rpcs/SaleOutStoreRpc/"; + public static List GetDmoList(object condition) + { + var method = MethodPath + "GetSaleOutStoreList"; + var json = RpcFacade.Call(method, JsonConvert.SerializeObject(condition)); + var list = JsonConvert.DeserializeObject>(json); + FillAlreadyInfo(list); + return list; + } + + private static void FillAlreadyInfo(List list) + { + if (list.Count == 0) + return; + var query = new DQueryDom(new JoinAlias(typeof(CarcassSaleOut_Record))); + query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("DetailID"), list.Select(x => DQExpression.Value(x.ID)).ToArray())); + query.Columns.Add(DQSelectColumn.Field("DetailID")); + query.Columns.Add(DQSelectColumn.Sum("NetWeight")); + query.Columns.Add(DQSelectColumn.Sum("SecondNumber")); + query.GroupBy.Expressions.Add(DQExpression.Field("DetailID")); + var records = query.EExecuteList(); + foreach (var item in records) + { + var f = list.First(x => x.DetailID == item.Item1); + f.AlreadyNumber = item.Item2; + f.AlreadySecondNumber = item.Item3; + } + } + + public static List GetCustomers(object condition) + { + var method = MethodPath + "GetCustomers"; + var json = RpcFacade.Call(method, JsonConvert.SerializeObject(condition)); + return JsonConvert.DeserializeObject>(json); + } + + public static IEnumerable GetDetailRecords(long detailID) + { + var query = new DmoQuery(typeof(CarcassSaleOut_Record)); + query.Where.Conditions.Add(DQCondition.EQ("DetailID", detailID)); + query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID")); + return query.EExecuteList().Cast(); + } + + public static void Delete(long id) + { + var del = new DQDeleteDom(typeof(CarcassSaleOut_Record)); + del.Where.Conditions.Add(DQCondition.EQ("ID", id)); + del.EExecute(); + } + + public static void InsertRecord(CarcassSaleOut_Record record) + { + using (var session = DmoSession.New()) + { + session.Insert(record); + session.Commit(); + } + } + + public static void FinishAssign(long id) + { + var target = GetBillRecords(id); + + RpcFacade.Call(MethodPath + "FinishAssign", JsonConvert.SerializeObject(target), id); + } + + public static IEnumerable GetBillRecords(long billID) + { + var query = new DmoQuery(typeof(CarcassSaleOut_Record)); + query.Where.Conditions.Add(DQCondition.EQ("MainID", billID)); + query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID")); + return query.EExecuteList().Cast(); + } + } +} diff --git a/B3DealerClient/BL/FreshInStoreBL.cs b/B3DealerClient/BL/FreshInStoreBL.cs new file mode 100644 index 0000000..a317a31 --- /dev/null +++ b/B3DealerClient/BL/FreshInStoreBL.cs @@ -0,0 +1,92 @@ +using B3DealerClient.BO; +using Forks.EnterpriseServices.DomainObjects2; +using Forks.EnterpriseServices.DomainObjects2.DQuery; +using Forks.JsonRpc.Client; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using B3DealerClient.Utils; +using System.Collections; + +namespace B3DealerClient.BL +{ + public static class FreshInStoreBL + { + const string MethodPath = @"/MainSystem/B3Dealer/Rpcs/PayBillRpc/"; + public static List GetDmoList(object condition) + { + var method = MethodPath + "GetPayBillList"; + var json = RpcFacade.Call(method, JsonConvert.SerializeObject(condition)); + return JsonConvert.DeserializeObject>(json); + } + + public static List GetDmoDetailList(long id) + { + var method = MethodPath + "GetPayBillDetails"; + var json = RpcFacade.Call(method, id); + var list = JsonConvert.DeserializeObject>(json); + FillAlreadyInfo(list); + return list; + } + + static void FillAlreadyInfo(List details) + { + if (details.Count == 0) + return; + var query = new DQueryDom(new JoinAlias(typeof(FreshInStore_Record))); + query.Columns.Add(DQSelectColumn.Field("DetailID")); + query.Columns.Add(DQSelectColumn.Sum("Weight")); + query.Columns.Add(DQSelectColumn.Sum("Number")); + query.GroupBy.Expressions.Add(DQExpression.Field("DetailID")); + query.Where.Conditions.Add(DQCondition.InList(DQExpression.Field("DetailID"), details.Select(x => DQExpression.Value(x.ID)).ToArray())); + var list = query.EExecuteList(); + foreach (var item in list) + { + var first = details.First(x => x.ID == item.Item1); + first.AlreadyNumber = item.Item2; + first.AlreadySecondNumber = item.Item3; + } + } + + public static long FinishInStore(long id) + { + var target = GetReceiveInfo(id); + + return RpcFacade.Call(MethodPath + "FreshFinishInStore", JsonConvert.SerializeObject(target)); + } + + private static IList GetReceiveInfo(long id) + { + var query = new DmoQuery(typeof(FreshInStore_Record)); + query.Where.Conditions.Add(DQCondition.EQ("BillID",id)); + return query.EExecuteList(); + } + + public static void InsertRecord(FreshInStore_Record record) + { + using (var session = DmoSession.New()) + { + var id = GetExistID(session, record); + if (id.HasValue) + { + record.ID = id.Value; + session.Update(record); + } + else + session.Insert(record); + session.Commit(); + } + } + + static long? GetExistID(IDmoSession session, FreshInStore_Record record) + { + var query = new DQueryDom(new JoinAlias(typeof(FreshInStore_Record))); + query.Columns.Add(DQSelectColumn.Field("ID")); + query.Where.Conditions.Add(DQCondition.EQ("DetailID", record.DetailID)); + return query.EExecuteScalar(session); + } + } +} diff --git a/B3DealerClient/BO/CarcassInStore.cs b/B3DealerClient/BO/CarcassInStore.cs deleted file mode 100644 index feda4ed..0000000 --- a/B3DealerClient/BO/CarcassInStore.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace B3DealerClient.BO -{ - public class CarcassInStore : NotificationObject - { - private long mID; - public long ID - { - get { return mID; } - set - { - mID = value; - RaisePropertyChanged("ID"); - } - } - - private string mSupplier_Name; - public string Supplier_Name - { - get { return mSupplier_Name; } - set - { - mSupplier_Name = value; - RaisePropertyChanged("Supplier_Name"); - } - } - - private DateTime? mDate; - public DateTime? Date - { - get { return mDate; } - set - { - mDate = value; - RaisePropertyChanged("Date"); - } - } - - private DateTime? mArrivedDate; - public DateTime? ArrivedDate - { - get { return mArrivedDate; } - set - { - mArrivedDate = value; - RaisePropertyChanged("ArrivedDate"); - } - } - - private string mStore_Name; - public string Store_Name - { - get { return mStore_Name; } - set - { - mStore_Name = value; - RaisePropertyChanged("Store_Name"); - } - } - - private bool mSelected; - public bool Selected - { - get { return mSelected; } - set - { - mSelected = value; - RaisePropertyChanged("Selected"); - } - } - - private List mDetails = new List(); - public List Details - { - get { return mDetails; } - set - { - mDetails = value; - RaisePropertyChanged("Details"); - } - } - } -} diff --git a/B3DealerClient/BO/CarcassInStore/CarcassInStore.cs b/B3DealerClient/BO/CarcassInStore/CarcassInStore.cs new file mode 100644 index 0000000..9a2d711 --- /dev/null +++ b/B3DealerClient/BO/CarcassInStore/CarcassInStore.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + public class CarcassInStore : NotificationObject + { + public long ID { get; set; } + + public string Supplier_Name { get; set; } + + public DateTime? Date { get; set; } + + public DateTime? ArrivedDate { get; set; } + + public string Store_Name { get; set; } + + private bool mSelected; + public bool Selected + { + get { return mSelected; } + set + { + mSelected = value; + RaisePropertyChanged("Selected"); + } + } + + private List mDetails = new List(); + public List Details + { + get { return mDetails; } + set + { + mDetails = value; + RaisePropertyChanged("Details"); + } + } + } +} diff --git a/B3DealerClient/BO/CarcassInStore/CarcassInStore_Detail.cs b/B3DealerClient/BO/CarcassInStore/CarcassInStore_Detail.cs new file mode 100644 index 0000000..f194835 --- /dev/null +++ b/B3DealerClient/BO/CarcassInStore/CarcassInStore_Detail.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + public class CarcassInStore_Detail : NotificationObject + { + public long ID { get; set; } + + public long PayBill_ID { get; set; } + + public string Goods_Name { get; set; } + + public decimal? Number { get; set; } + + public decimal? SecondNumber { get; set; } + + private decimal? mAlreadyNumber; + public decimal? AlreadyNumber + { + get { return mAlreadyNumber; } + set + { + mAlreadyNumber = value; + RaisePropertyChanged("AlreadyNumber"); + } + } + + private decimal? mAlreadySecondNumber; + public decimal? AlreadySecondNumber + { + get { return mAlreadySecondNumber; } + set + { + mAlreadySecondNumber = value; + RaisePropertyChanged("AlreadySecondNumber"); + } + } + + private bool mSelected; + public bool Selected + { + get { return mSelected; } + set + { + mSelected = value; + RaisePropertyChanged("Selected"); + } + } + + private readonly ObservableCollection mDetails = new ObservableCollection(); + public ObservableCollection Details { get { return mDetails; } } + } +} diff --git a/B3DealerClient/BO/CarcassInStore/CarcassInStore_Receive.cs b/B3DealerClient/BO/CarcassInStore/CarcassInStore_Receive.cs new file mode 100644 index 0000000..87cbcc2 --- /dev/null +++ b/B3DealerClient/BO/CarcassInStore/CarcassInStore_Receive.cs @@ -0,0 +1,52 @@ +using Forks.EnterpriseServices.DomainObjects2; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + [MapToTable("B3DealerClient_CarcassInStore_Receive")] + [KeyField("ID", KeyGenType.identity)] + public class CarcassInStore_Receive : NotificationObject + { + [JsonIgnore] + public long ID{get;set;} + + public long DetailID{get;set;} + + public long MainID{get;set;} + + public string Goods_Name{get;set;} + + public decimal Weight{get;set;} + + public decimal Discont{get;set;} + + public decimal NetWeight{get;set;} + + public decimal Pics{get;set;} + + private DateTime mDate = DateTime.Now; + public DateTime Date + { + get { return mDate; } + set { mDate = value; } + } + + private bool mSelected; + [NonDmoProperty] + [JsonIgnore] + public bool Selected + { + get { return mSelected; } + set + { + mSelected = value; + RaisePropertyChanged("Selected"); + } + } + } +} diff --git a/B3DealerClient/BO/CarcassInStore_Detail.cs b/B3DealerClient/BO/CarcassInStore_Detail.cs deleted file mode 100644 index 01224df..0000000 --- a/B3DealerClient/BO/CarcassInStore_Detail.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace B3DealerClient.BO -{ - public class CarcassInStore_Detail : NotificationObject - { - private long mID; - public long ID - { - get { return mID; } - set - { - mID = value; - RaisePropertyChanged("ID"); - } - } - - private long mPayBill_ID; - public long PayBill_ID - { - get { return mPayBill_ID; } - set - { - mPayBill_ID = value; - RaisePropertyChanged("PayBill_ID"); - } - } - - private string mGoods_Name; - public string Goods_Name - { - get { return mGoods_Name; } - set - { - mGoods_Name = value; - RaisePropertyChanged("Goods_Name"); - } - } - - private decimal? mNumber; - public decimal? Number - { - get { return mNumber; } - set - { - mNumber = value; - RaisePropertyChanged("Number"); - } - } - - private decimal? mSecondNumber; - public decimal? SecondNumber - { - get { return mSecondNumber; } - set - { - mSecondNumber = value; - RaisePropertyChanged("SecondNumber"); - } - } - - private decimal? mAlreadyNumber; - public decimal? AlreadyNumber - { - get { return mAlreadyNumber; } - set - { - mAlreadyNumber = value; - RaisePropertyChanged("AlreadyNumber"); - } - } - - private decimal? mAlreadySecondNumber; - public decimal? AlreadySecondNumber - { - get { return mAlreadySecondNumber; } - set - { - mAlreadySecondNumber = value; - RaisePropertyChanged("AlreadySecondNumber"); - } - } - - private bool mSelected; - public bool Selected - { - get { return mSelected; } - set - { - mSelected = value; - RaisePropertyChanged("Selected"); - } - } - - private readonly ObservableCollection mDetails=new ObservableCollection(); - public ObservableCollection Details { get { return mDetails; } } - } -} diff --git a/B3DealerClient/BO/CarcassInStore_Receive.cs b/B3DealerClient/BO/CarcassInStore_Receive.cs deleted file mode 100644 index 4067b3e..0000000 --- a/B3DealerClient/BO/CarcassInStore_Receive.cs +++ /dev/null @@ -1,127 +0,0 @@ -using Forks.EnterpriseServices.DomainObjects2; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace B3DealerClient.BO -{ - [MapToTable("B3DealerClient_CarcassInStore_Receive")] - [KeyField("ID", KeyGenType.identity)] - public class CarcassInStore_Receive : NotificationObject - { - private long mID; - [JsonIgnore] - public long ID - { - get { return mID; } - set - { - mID = value; - RaisePropertyChanged("ID"); - } - } - - private long mDetailID; - public long DetailID - { - get { return mDetailID; } - set - { - mDetailID = value; - RaisePropertyChanged("DetailID"); - } - } - - private long mMainID; - public long MainID - { - get { return mMainID; } - set - { - mMainID = value; - RaisePropertyChanged("MainID"); - } - } - - private string mGoods_Name; - public string Goods_Name - { - get { return mGoods_Name; } - set - { - mGoods_Name = value; - RaisePropertyChanged("Goods_Name"); - } - } - - private decimal mWeight; - public decimal Weight - { - get { return mWeight; } - set - { - mWeight = value; - RaisePropertyChanged("Weight"); - } - } - - private decimal mDiscont; - public decimal Discont - { - get { return mDiscont; } - set - { - mDiscont = value; - RaisePropertyChanged("Discont"); - } - } - - private decimal mNetWeight; - public decimal NetWeight - { - get { return mNetWeight; } - set - { - mNetWeight = value; - RaisePropertyChanged("NetWeight"); - } - } - - private decimal mPics; - public decimal Pics - { - get { return mPics; } - set - { - mPics = value; - RaisePropertyChanged("Pics"); - } - } - - private DateTime mDate = DateTime.Now; - public DateTime Date - { - get { return mDate; } - set - { - mDate = value; - RaisePropertyChanged("Date"); - } - } - - private bool mSelected; - [NonDmoProperty] - public bool Selected - { - get { return mSelected; } - set - { - mSelected = value; - RaisePropertyChanged("Selected"); - } - } - } -} diff --git a/B3DealerClient/BO/CarcassSaleOut/CarcassSaleOut.cs b/B3DealerClient/BO/CarcassSaleOut/CarcassSaleOut.cs new file mode 100644 index 0000000..86a9a86 --- /dev/null +++ b/B3DealerClient/BO/CarcassSaleOut/CarcassSaleOut.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + public class CarcassSaleOut : NotificationObject + { + public long ID { get; set; } + + public string Customer_Name { get; set; } + + public string Driver_Name { get; set; } + + public string Store_Name { get; set; } + + public DateTime? LoadTime { get; set; } + + public long DetailID { get; set; } + + public string Goods_Name { get; set; } + + public decimal? Number { get; set; } + + public decimal? SecondNumber { get; set; } + + private decimal? mAlreadyNumber; + public decimal? AlreadyNumber + { + get { return mAlreadyNumber; } + set + { + mAlreadyNumber = value; + RaisePropertyChanged("AlreadyNumber"); + } + } + + private decimal? mAlreadySecondNumber; + public decimal? AlreadySecondNumber + { + get { return mAlreadySecondNumber; } + set + { + mAlreadySecondNumber = value; + RaisePropertyChanged("AlreadySecondNumber"); + } + } + + private bool mAssignFinished; + public bool AssignFinished + { + get { return mAssignFinished; } + set + { + mAssignFinished = value; + RaisePropertyChanged("AssignFinished"); + } + } + + private bool mSelected; + public bool Selected + { + get { return mSelected; } + set + { + mSelected = value; + RaisePropertyChanged("Selected"); + } + } + } +} diff --git a/B3DealerClient/BO/CarcassSaleOut/CarcassSaleOut_Record.cs b/B3DealerClient/BO/CarcassSaleOut/CarcassSaleOut_Record.cs new file mode 100644 index 0000000..3d213f9 --- /dev/null +++ b/B3DealerClient/BO/CarcassSaleOut/CarcassSaleOut_Record.cs @@ -0,0 +1,52 @@ +using Forks.EnterpriseServices.DomainObjects2; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + [MapToTable("B3DealerClient_CarcassSaleOut_Record")] + [KeyField("ID", KeyGenType.identity)] + public class CarcassSaleOut_Record : NotificationObject + { + [JsonIgnore] + public long ID { get; set; } + + public long DetailID { get; set; } + + public long MainID { get; set; } + + public string Goods_Name { get; set; } + + public decimal Weight { get; set; } + + public decimal Discont { get; set; } + + public decimal NetWeight { get; set; } + + public decimal SecondNumber { get; set; } + + private DateTime mDate = DateTime.Now; + public DateTime Date + { + get { return mDate; } + set { mDate = value; } + } + + private bool mSelected; + [NonDmoProperty] + [JsonIgnore] + public bool Selected + { + get { return mSelected; } + set + { + mSelected = value; + RaisePropertyChanged("Selected"); + } + } + } +} diff --git a/B3DealerClient/BO/CarcassSaleOut/CustomerObj.cs b/B3DealerClient/BO/CarcassSaleOut/CustomerObj.cs new file mode 100644 index 0000000..c5bf413 --- /dev/null +++ b/B3DealerClient/BO/CarcassSaleOut/CustomerObj.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + public class CustomerObj : NotificationObject + { + public long ID { get; set; } + + public string Name { get; set; } + + public bool Finished { get; set; } + + private bool mSelected; + public bool Selected + { + get { return mSelected; } + set + { + mSelected = value; + RaisePropertyChanged("Selected"); + } + } + + public bool Equals(CustomerObj obj) + { + return this.ID == obj.ID && this.Finished == obj.Finished; + } + } +} diff --git a/B3DealerClient/BO/FreshInStore/FreshInStore.cs b/B3DealerClient/BO/FreshInStore/FreshInStore.cs new file mode 100644 index 0000000..b7f4625 --- /dev/null +++ b/B3DealerClient/BO/FreshInStore/FreshInStore.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + public class FreshInStore : NotificationObject + { + public long ID { get; set; } + + public string Supplier_Name { get; set; } + + public DateTime? Date { get; set; } + + public DateTime? ArrivedDate { get; set; } + + public string Store_Name { get; set; } + + private bool mSelected; + public bool Selected + { + get { return mSelected; } + set + { + mSelected = value; + RaisePropertyChanged("Selected"); + } + } + + private List mDetails = new List(); + public List Details + { + get { return mDetails; } + set + { + mDetails = value; + RaisePropertyChanged("Details"); + } + } + } +} diff --git a/B3DealerClient/BO/FreshInStore/FreshInStore_Detail.cs b/B3DealerClient/BO/FreshInStore/FreshInStore_Detail.cs new file mode 100644 index 0000000..04567a9 --- /dev/null +++ b/B3DealerClient/BO/FreshInStore/FreshInStore_Detail.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + public class FreshInStore_Detail : NotificationObject + { + public long ID { get; set; } + + public long PayBill_ID { get; set; } + + public string Goods_Name { get; set; } + + public decimal? Number { get; set; } + + public decimal? SecondNumber { get; set; } + + private decimal? mAlreadyNumber; + public decimal? AlreadyNumber + { + get { return mAlreadyNumber; } + set + { + mAlreadyNumber = value; + RaisePropertyChanged("AlreadyNumber"); + } + } + + private decimal? mAlreadySecondNumber; + public decimal? AlreadySecondNumber + { + get { return mAlreadySecondNumber; } + set + { + mAlreadySecondNumber = value; + RaisePropertyChanged("AlreadySecondNumber"); + } + } + + private bool mSelected; + public bool Selected + { + get { return mSelected; } + set + { + mSelected = value; + RaisePropertyChanged("Selected"); + } + } + } +} diff --git a/B3DealerClient/BO/FreshInStore/FreshInStore_Record.cs b/B3DealerClient/BO/FreshInStore/FreshInStore_Record.cs new file mode 100644 index 0000000..1e6629a --- /dev/null +++ b/B3DealerClient/BO/FreshInStore/FreshInStore_Record.cs @@ -0,0 +1,24 @@ +using Forks.EnterpriseServices.DomainObjects2; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace B3DealerClient.BO +{ + [MapToTable("B3DealerClient_FreshInStore_Record")] + [KeyField("ID", KeyGenType.identity)] + public class FreshInStore_Record + { + [JsonIgnore] + public long ID { get; set; } + public long BillID { get; set; } + public long DetailID { get; set; } + + public decimal? Weight { get; set; } + + public decimal? Number { get; set; } + } +} diff --git a/B3DealerClient/Dialogs/BaseInfoDialog.xaml.cs b/B3DealerClient/Dialogs/BaseInfoDialog.xaml.cs index d27ca2e..d16ccb8 100644 --- a/B3DealerClient/Dialogs/BaseInfoDialog.xaml.cs +++ b/B3DealerClient/Dialogs/BaseInfoDialog.xaml.cs @@ -40,6 +40,9 @@ namespace B3DealerClient.Dialogs case "Store": this.Title = "仓库"; break; + case "DriverGoodsLine": + this.Title="送货线路"; + break; default: break; } diff --git a/B3DealerClient/Utils/ValueConverter.cs b/B3DealerClient/Utils/ValueConverter.cs index 58c7ba8..1e3543b 100644 --- a/B3DealerClient/Utils/ValueConverter.cs +++ b/B3DealerClient/Utils/ValueConverter.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -9,12 +10,12 @@ namespace B3DealerClient.Utils { public class NullToBoolConverter : IValueConverter { - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return value != null; } - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } diff --git a/B3DealerClient/Windows/CarcassInStoreWindow_/CarcassInStoreWindow.xaml b/B3DealerClient/Windows/CarcassInStoreWindow_/CarcassInStoreWindow.xaml index 89fe9aa..3810bca 100644 --- a/B3DealerClient/Windows/CarcassInStoreWindow_/CarcassInStoreWindow.xaml +++ b/B3DealerClient/Windows/CarcassInStoreWindow_/CarcassInStoreWindow.xaml @@ -129,7 +129,6 @@ --> - @@ -173,7 +172,6 @@ --> - @@ -211,7 +209,6 @@ --> - @@ -253,7 +250,7 @@ - - - - - - + + + + + + + @@ -86,10 +83,11 @@ + - @@ -260,10 +263,10 @@ - + + + + + + diff --git a/B3DealerClient/Windows/Test.xaml.cs b/B3DealerClient/Windows/Test.xaml.cs new file mode 100644 index 0000000..e2d61e1 --- /dev/null +++ b/B3DealerClient/Windows/Test.xaml.cs @@ -0,0 +1,44 @@ +using B3DealerClient.BO; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace B3DealerClient.Windows +{ + /// + /// Test.xaml 的交互逻辑 + /// + public partial class Test : Window + { + List Items; + public Test() + { + InitializeComponent(); + Items = new List(); + Items.Add(new NameIDPair() { ID = 1, Name = "张三" }); + Items.Add(new NameIDPair() { ID = 2, Name = "张1" }); + Items.Add(new NameIDPair() { ID = 3, Name = "张2" }); + Items.Add(new NameIDPair() { ID = 4, Name = "张4" }); + Items.Add(new NameIDPair() { ID = 5, Name = "张5" }); + Items.Add(new NameIDPair() { ID = 6, Name = "张6" }); + lb .ItemsSource = Items; + } + + private void BtnClick(object sender, MouseButtonEventArgs e) + { + var btn = sender as Button; + var tag = btn.Tag as NameIDPair; + MessageBox.Show(tag.ID.ToString()); + } + } +}