46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using ExtensionMethods;
|
||
using Kingdee.BOS;
|
||
using Kingdee.BOS.Core;
|
||
using Kingdee.BOS.Core.DynamicForm.PlugIn;
|
||
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
|
||
using Kingdee.BOS.Core.Validation;
|
||
using Kingdee.BOS.TCP;
|
||
using Kingdee.BOS.Util;
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using System.Text;
|
||
|
||
namespace EastChanger.STK_StockCountLoss
|
||
{
|
||
public class OperationEventPlugInEx : AbstractOperationServicePlugIn
|
||
{
|
||
public override void OnPreparePropertys(PreparePropertysEventArgs e)
|
||
{
|
||
base.OnPreparePropertys(e);
|
||
e.FieldKeys.Add("FSTATUS");
|
||
}
|
||
/// <summary>
|
||
/// 单据校验
|
||
/// </summary>
|
||
/// <param name="e"></param>
|
||
public override void OnAddValidators(AddValidatorsEventArgs e)
|
||
{
|
||
if (this.FormOperation.OperationId == 3)
|
||
{
|
||
base.OnAddValidators(e);
|
||
var validator = new CustomsSyncVaildators(5);
|
||
//是否需要校验,true是需要
|
||
validator.AlwaysValidate = true;
|
||
//校验单据头
|
||
validator.EntityKey = "FBillHead";
|
||
//加载校验器
|
||
e.Validators.Add(validator);
|
||
}
|
||
|
||
}
|
||
|
||
|
||
}
|
||
}
|