|
|
|
@ -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; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |