Browse Source

需求单No.137981

master
wugang 8 years ago
parent
commit
24ed11acd5
2 changed files with 50 additions and 3 deletions
  1. +46
    -0
      BWP.B3_YunKen/BLActions/CustomerWithDealerBLAction.cs
  2. +4
    -3
      BWP.B3_YunKen/BWP.B3_YunKen.csproj

+ 46
- 0
BWP.B3_YunKen/BLActions/CustomerWithDealerBLAction.cs View File

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3Frameworks.Utils;
using BWP.B3Sale.BL;
using BWP.B3Sale.BO;
using Forks.EnterpriseServices.BusinessInterfaces;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using TSingSoft.WebPluginFramework.BIPlugins.BLEvents;
namespace BWP.B3_YunKen.BLActions
{
public class CustomerWithDealerBLAction : IBLMethodAction
{
public string Description
{
get { return @"1、【客户档案】保存增加业务逻辑:若该客户同时为经销商档案,则{是否经销商}选择为否,不能保存,提示:该客户是经销商客户是否经销商不能选择为否(客户名称查询【经销商】档案基本属性的‘经销商’)
2**"; }
}
public void Execute(Forks.EnterpriseServices.BusinessInterfaces.IDmoContext context, object dmo, object parameter)
{
var customer = dmo as Customer;
if (customer != null) {
var id = InnerBLUtil.GetDmoProperty<Dealer, long?>(context.Session, "ID", new Tuple<string, object>("Customer_ID", customer.ID));
if (id != null && !customer.IsDealers)
throw new ApplicationException("该客户是经销商客户是否经销商不能选择为否(客户名称查询【经销商】档案基本属性的‘经销商’)");
var dealerID = InnerBLUtil.GetDmoProperty<Dealer_Detail, long?>(context.Session, "Dealer_ID", new Tuple<string, object>("Customer_ID", customer.ID));
if (dealerID != null && customer.IsDealers)
throw new ApplicationException("该客户属于【经销商】档案No." + dealerID + ",请先维护经销商档案");
}
}
public IList<string> Features
{
get { return new List<string>(); }
}
public string Name
{
get { return "B3_HaoYue.【客户】档案与【经销商】档案逻辑控制"; }
}
}
}

+ 4
- 3
BWP.B3_YunKen/BWP.B3_YunKen.csproj View File

@ -61,11 +61,12 @@
</Reference>
<Reference Include="Wpf.System, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a04fa581c0f74d43, processorArchitecture=MSIL" />
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="BLActions\CustomerWithDealerBLAction.cs" />
<Compile Include="BLActions\OrderBLIsSetWrappageActions.cs" />
<Compile Include="BLActions\SaleForecastBLIsSetWrappageActions.cs" />
<Compile Include="BLActions\SaleOutStoreBLIsSetWrappageActions.c.cs" />
<Compile Include="BLActions\CustomerDealerBLAction.cs" />
<Compile Include="BLActions\SaleOutStoreBLIsSetWrappageActions.c.cs" />
<Compile Include="BLActions\CustomerDealerBLAction.cs" />
<Compile Include="BL\Bill\Goods_PackageBL.cs" />
<Compile Include="BO\Bill\Goods_Package.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />


Loading…
Cancel
Save