Browse Source

需求单No.137511

master
xueyingcheng 8 years ago
parent
commit
a7cd21c6b9
2 changed files with 45 additions and 0 deletions
  1. +1
    -0
      B3_DongFangWanQi.Web/B3_DongFangWanQi.Web.csproj
  2. +44
    -0
      B3_DongFangWanQi.Web/TypeIOCs/OrderAfterSaveTypeIoc.cs

+ 1
- 0
B3_DongFangWanQi.Web/B3_DongFangWanQi.Web.csproj View File

@ -91,6 +91,7 @@
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PluginClass.cs" />
<Compile Include="TypeIOCs\OrderAfterSaveTypeIoc.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\B3_DongFangWanQi\B3_DongFangWanQi.csproj">


+ 44
- 0
B3_DongFangWanQi.Web/TypeIOCs/OrderAfterSaveTypeIoc.cs View File

@ -0,0 +1,44 @@
using BWP.B3Frameworks;
using BWP.B3Sale.BL;
using BWP.B3Sale.BO;
using Forks.EnterpriseServices.BusinessInterfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BWP.Web.TypeIOCs
{
[TypeIOC(typeof(OrderBL), typeof(OrderBL.BaseBLIOCs.AfterSave))]
class OrderAfterSaveTypeIoc : OrderBL.BaseBLIOCs.AfterSave
{
public void Invoke(IDmoContext context, Order dmo)
{
var year = Convert.ToDateTime(dmo.LoadTime).Year;
var month = Convert.ToDateTime(dmo.LoadTime).Month;
string strMonth = Convert.ToString(month);
if (strMonth.Length == 1)
{
strMonth = "0" + strMonth;
}
var day = Convert.ToDateTime(dmo.LoadTime).Day;
string orderID = Convert.ToString(dmo.ID);
if (orderID.Length == 1)
{
orderID = "00" + orderID;
}
else if (orderID.Length == 2)
{
orderID = "0" + orderID;
}
dmo.CustomerOrderNo = "DFWQ" + year + strMonth + orderID;
}
}
}

Loading…
Cancel
Save