Files
GateDge2023_ljy/08.昶东/EastChanger/STK_StockCountLoss/OperationEventPlugInEx.cs
PastSaid c31957eb64 a
2024-03-18 11:42:45 +08:00

46 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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