Browse Source

需求单No.138109 【销售订单】增加字段{移动电话},保存时根据客户名称查找客户‘联系人’明细的一条明细的移动电话

master
duanluohua 8 years ago
parent
commit
f734bb2592
3 changed files with 35 additions and 0 deletions
  1. +1
    -0
      BWP.B3_YunKen.Web/Pages/B3YunKen/Overlays/OrderEdit_Ext.cs
  2. +1
    -0
      BWP.B3_YunKen/BWP.B3_YunKen.csproj
  3. +33
    -0
      BWP.B3_YunKen/TypeIoc/SaleOrderCustomerPhoneTypeIoc.cs

+ 1
- 0
BWP.B3_YunKen.Web/Pages/B3YunKen/Overlays/OrderEdit_Ext.cs View File

@ -16,6 +16,7 @@ namespace BWP.Web.Pages.B3YunKen.Overlays
config.Add("EngineNumber");
config.Add("VinNO");
config.Add("HandcarNumber");
config.Add("CellPhone");
}
protected override void AddFreightConfig(LayoutManager layOutManager, AutoLayoutConfig config)


+ 1
- 0
BWP.B3_YunKen/BWP.B3_YunKen.csproj View File

@ -75,6 +75,7 @@
<Compile Include="Rpcs\DriverRpc.cs" />
<Compile Include="TimerTask\NullifyCustomerTask.cs" />
<Compile Include="TypeIoc\DriverBeforeSaveTypeIoc.cs" />
<Compile Include="TypeIoc\SaleOrderCustomerPhoneTypeIoc.cs" />
<Compile Include="TypeIoc\SaleOutStoreFreightBearTypeIoc.cs" />
<Compile Include="TypeIoc\SaleOutStoreManyBillsSetFreightPriceIOC.cs" />
<Compile Include="TypeIoc\SaleOutStoreSetFreightPriceIOC.cs" />


+ 33
- 0
BWP.B3_YunKen/TypeIoc/SaleOrderCustomerPhoneTypeIoc.cs View File

@ -0,0 +1,33 @@
using System;
using BWP.B3Frameworks;
using BWP.B3Sale.BL;
using BWP.B3Sale.BO;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
using TSingSoft.WebPluginFramework;
namespace BWP.B3_YunKen.TypeIoc
{
[TypeIOC(typeof(OrderBL), typeof(OrderBL.IAddPhone))]
public class SaleOrderCustomerPhoneTypeIoc : OrderBL.IAddPhone
{
public void Invoke(Order dmo)
{
dmo.CellPhone = CustomerPhone(dmo.Customer_ID);
}
private string CustomerPhone(long? CustomerId)
{
var main = new JoinAlias(typeof(Customer));
var detail = new JoinAlias(typeof(CustomerLinkMan_Detail));
var dom = new DQueryDom(detail);
dom.From.AddJoin(JoinType.Left, new DQDmoSource(main), DQCondition.EQ(main, "ID", detail, "Customer_ID"));
dom.Where.Conditions.Add(DQCondition.And( DQCondition.EQ(detail, "Customer_ID", CustomerId), DQCondition.EQ(main, "ID", CustomerId)));
dom.Columns.Add(DQSelectColumn.Field("CellPhone", detail));
dom.Range = SelectRange.Top(1);
var result = dom.EExecuteScalar<string>();
return result;
}
}
}

Loading…
Cancel
Save