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

43 lines
1.2 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Threading;
using System.Collections;
using System.Data;
using BP.DA;
using BP.En;
using BP.Web;
using BP.Sys.Base;
namespace BP.Sys
{
/// <summary>
/// 事件Demo
/// </summary>
abstract public class EventDemo:EventBase
{
#region 属性.
#endregion 属性.
/// <summary>
/// 事件Demo
/// </summary>
public EventDemo()
{
this.Title = "事件demo执行演示.";
}
/// <summary>
/// 执行事件
/// 1如果遇到错误就抛出异常信息前台界面就会提示错误并不向下执行。
/// 2执行成功把执行的结果赋给SucessInfo变量如果不需要提示就赋值为空或者为null。
/// 3所有的参数都可以从 this.SysPara.GetValByKey中获取。
/// </summary>
public override void Do()
{
if (1 == 2)
throw new Exception("@执行错误xxxxxx.");
//如果你要向用户提示执行成功的信息,就给他赋值,否则就不必赋值。
this.SucessInfo = "执行成功提示.";
}
}
}