diff --git a/BWP.B3_YunKen.Web/PluginClass.cs b/BWP.B3_YunKen.Web/PluginClass.cs
index 045615e..e52f01c 100644
--- a/BWP.B3_YunKen.Web/PluginClass.cs
+++ b/BWP.B3_YunKen.Web/PluginClass.cs
@@ -1,6 +1,9 @@
using BWP.B3Sale;
using TSingSoft.WebPluginFramework;
using BWP.B3UnitedInfos;
+using TSingSoft.WebPluginFramework.Pages;
+using BWP.Web.Pages.B3Sale.Bills.Order_;
+using BWP.Web.Pages.B3YunKen.Overlays;
namespace BWP.B3_YunKen.Web
{
@@ -8,12 +11,14 @@ namespace BWP.B3_YunKen.Web
{
public void OnInit() {
+ WpfPageFactory.RegisterPageOverlay(typeof(OrderEdit).FullName, typeof(OrderEdit_Ext).FullName);
GlobalFlags.On(B3SaleConsts.Flags.EnableStandardGoods);
GlobalFlags.On(B3SaleConsts.Flags.RecordLastSaleOutStoreDate);
GlobalFlags.On(B3SaleConsts.Flags.IsYunKen);
GlobalFlags.On(B3UnitedInfosConsts.GlobalFlags.库存支持品牌项);
+ GlobalFlags.On(B3SaleConsts.Flags.DriverNameAllowSame);
}
public void OnUnitInit()
diff --git a/BWP.B3_YunKen/BWP.B3_YunKen.csproj b/BWP.B3_YunKen/BWP.B3_YunKen.csproj
index fa78861..8bb0447 100644
--- a/BWP.B3_YunKen/BWP.B3_YunKen.csproj
+++ b/BWP.B3_YunKen/BWP.B3_YunKen.csproj
@@ -55,6 +55,7 @@
+
diff --git a/BWP.B3_YunKen/TypeIocs/DriverBeforeSaveTypeIoc.cs b/BWP.B3_YunKen/TypeIocs/DriverBeforeSaveTypeIoc.cs
new file mode 100644
index 0000000..fa35b5e
--- /dev/null
+++ b/BWP.B3_YunKen/TypeIocs/DriverBeforeSaveTypeIoc.cs
@@ -0,0 +1,37 @@
+using BWP.B3Sale.BL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using BWP.B3Sale.BO;
+using Forks.EnterpriseServices.BusinessInterfaces;
+using BWP.B3Frameworks;
+using Forks.EnterpriseServices.DomainObjects2.DQuery;
+using Forks.EnterpriseServices.DomainObjects2;
+
+namespace BWP.B3_YunKen.TypeIocs
+{
+ [TypeIOC(typeof(DriverBL), typeof(DriverBL.BaseBLIOCs.BeforeSave))]
+ public class DriverBeforeSaveTypeIoc : DriverBL.BaseBLIOCs.BeforeSave
+ {
+ public void Invoke(IDmoContext context, Driver dmo)
+ {
+ CheckNotAllowSameName(context, dmo);
+ }
+
+ private void CheckNotAllowSameName(IDmoContext context, Driver dmo)
+ {
+ var query = new DQueryDom(new JoinAlias(typeof(Driver)));
+ query.Where.Conditions.Add(DQCondition.EQ("IDCard", dmo.IDCard));
+ query.Where.Conditions.Add(DQCondition.InEQ("ID", dmo.ID));
+
+ query.Columns.Add(DQSelectColumn.Field("ID"));
+
+ var id = context.Session.ExecuteScalar(query);
+ if (id != null)
+ {
+ throw new Exception("身份证号:"+dmo.IDCard+" 已经存在单号:"+id+" 上");
+ }
+ }
+ }
+}