|
|
@ -13,6 +13,8 @@ using Forks.EnterpriseServices.SqlDoms; |
|
|
using Forks.Utils; |
|
|
using Forks.Utils; |
|
|
using TSingSoft.WebControls2; |
|
|
using TSingSoft.WebControls2; |
|
|
using TSingSoft.WebPluginFramework; |
|
|
using TSingSoft.WebPluginFramework; |
|
|
|
|
|
using BWP.B3Sale.BL; |
|
|
|
|
|
using Forks.EnterpriseServices.BusinessInterfaces; |
|
|
|
|
|
|
|
|
namespace BWP.Web.Pages.B3YunKen.Overlays |
|
|
namespace BWP.Web.Pages.B3YunKen.Overlays |
|
|
{ |
|
|
{ |
|
|
@ -43,6 +45,11 @@ namespace BWP.Web.Pages.B3YunKen.Overlays |
|
|
List<SaleForecast_Detail> LoadList() |
|
|
List<SaleForecast_Detail> LoadList() |
|
|
{ |
|
|
{ |
|
|
var list=new List<SaleForecast_Detail>(); |
|
|
var list=new List<SaleForecast_Detail>(); |
|
|
|
|
|
var factor = new PriceFactor { |
|
|
|
|
|
Customer_ID = Dmo.Customer_ID, |
|
|
|
|
|
Time = Dmo.Date, |
|
|
|
|
|
AccountingUnit_ID = Dmo.AccountingUnit_ID |
|
|
|
|
|
}; |
|
|
using (var session=Forks.EnterpriseServices.DomainObjects2.Dmo.NewSession()) |
|
|
using (var session=Forks.EnterpriseServices.DomainObjects2.Dmo.NewSession()) |
|
|
{ |
|
|
{ |
|
|
var maxid = GetMaxId(session); |
|
|
var maxid = GetMaxId(session); |
|
|
@ -72,16 +79,20 @@ namespace BWP.Web.Pages.B3YunKen.Overlays |
|
|
UnitNum = (Money<decimal>?)reader[4], |
|
|
UnitNum = (Money<decimal>?)reader[4], |
|
|
SecondNumber = (Money<decimal>?)reader[5], |
|
|
SecondNumber = (Money<decimal>?)reader[5], |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
list.Add(dmodetail); |
|
|
list.Add(dmodetail); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
foreach (SaleForecast_Detail forecastDetail in list) |
|
|
|
|
|
|
|
|
IRebateBL bl = BIFactory.Create<IRebateBL>(); |
|
|
|
|
|
foreach (SaleForecast_Detail detail in list) |
|
|
{ |
|
|
{ |
|
|
DmoUtil.RefreshDependency(forecastDetail, "SaleGoods_ID"); |
|
|
|
|
|
|
|
|
DmoUtil.RefreshDependency(detail, "SaleGoods_ID"); |
|
|
|
|
|
detail.Rebate = bl.GetRebate(factor.Customer_ID, factor.Time, detail.SaleGoods_ID); |
|
|
|
|
|
detail.SetPrice(factor); |
|
|
|
|
|
detail.NetPrice = detail.Price; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return list; |
|
|
return list; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|