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.

65 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mesnac.Action.Base;
using Mesnac.Controls.Base;
namespace Mesnac.Action.Intake.Qingquan
{
public class IntakeAction : DatabaseAction
{
private static bool _isFirstRun = true; //是否首次运行
#region RunIni
/// <summary>
/// 初始化
/// </summary>
/// <param name="runtime"></param>
private void Ini(RuntimeParameter runtime)
{
if (_isFirstRun)
{
Global.PublicVar.Instance.ProjectWizardName = runtime.ProjectWizardName;
_isFirstRun = false;
}
}
/// <summary>
/// 接口方法
/// </summary>
/// <param name="sender"></param>
public new void RunIni(RuntimeParameter runtime)
{
this.Ini(runtime);
base.RunIni(runtime); //必须调用
this.SetNetControlVisible();
}
/// <summary>
/// 设置网络版控件的可见性,如果是网络版则可见,如果是单机版则隐藏。
/// 以业务标识中是否包含NetType:Yes为网络控件评判标准
/// </summary>
public void SetNetControlVisible()
{
List<IBaseControl> controls = base.GetAllMCControls();
//如果是单机版则把网络版控件隐藏
if (base.NetType == NetTypes.Local)
{
foreach (IBaseControl c in controls)
{
//如果是网络控件
if (c.MCKey != null && c.MCKey.ToLower().Contains("NetType:Yes".ToLower()))
{
if (c.MCVisible == true)
{
c.MCVisible = false;
}
}
}
}
}
#endregion
}
}