You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.3 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3Sale.BO;
using Forks.EnterpriseServices.BusinessInterfaces;
using TSingSoft.WebPluginFramework.BIPlugins.BLEvents;
namespace BWP.B3QingDaoWanFu.BLActions
{
public class SaleForecastBLAction : IBLMethodAction
{
//需求单 141760 修改业务逻辑
public void Execute(IDmoContext context, object dmo, object parameter)
{
//时 分
var bill = dmo as SaleForecast;
var shi = Convert.ToInt32(parameter.ToString().Split(',')[0]);
var fen = Convert.ToInt32(parameter.ToString().Split(',')[1]);
var = bill.DeliveryTime.Value.Date;
var = DateTime.Today;
var = DateTime.Now;
if ( == )
{
if ( > new DateTime(.Year, .Month, .Day, shi, fen, 0))
{
throw new Exception(string.Format("审核失败,超出订货时间{0}时,{1}分不允许订货", shi, fen));
}
}
else if ( > )
{
throw new Exception("提货日期不符,请修改提货日期");
}
}
public void Execute111(IDmoContext context, object dmo, object parameter)
{
//时 分
var bill = dmo as SaleForecast;
var shi =Convert.ToInt32(parameter.ToString().Split(',')[0]);
var fen = Convert.ToInt32(parameter.ToString().Split(',')[1]);
var = bill.CreateTime.Value.Date;
var = bill.DeliveryTime.Value.Date;
if ( == )
{
if (DateTime.Now > new DateTime(.Year, .Month, .Day, shi, fen, 0))
{
throw new Exception("超时间订货,请于"+shi+"时"+fen+"分 前订货");
}
}
else if(> )
{
throw new Exception("创建日期不能大于提货日期");
}
}
public string Name {
get { return "B3QingDaoWanFu.销售预报审核控制时间"; }
}
public string Description {
get { return "销售预报审核控制时间"; }
}
public IList<string> Features
{
get { return new List<string>(); }
}
}
}