using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace CommonLib
{
///
/// 系统关闭模式
///
public enum ENUMCloseAction
{
caNone,
caRelogin,
caClose,
caReStart
}
///
/// 系统全局类
///
public sealed class ERPInfo
{
public string AccountBook;
///
/// 用户id
///
public int EmployeeId = 0;
///
/// 用户密码
///
public string Password = "";
///
/// 用户昵称
///
public string EmployeeName = "";
///
/// 左边菜单ID
///
public string GroupId = string.Empty;
///
/// 软件打开模块
///
public int SoftOpenMode = 0;
///
/// 登录结果
///
public bool LoginResult = false;
///
/// 所选子系统
///
public int SubSysId = 0;
///
/// 子系统名称
///
public string SubSysName = string.Empty;
///
/// 用户权限用逗号分割
///
public string Privilege = string.Empty;
///
/// 子系统数量
///
public int SubCount = 0;
///
/// 操作员名和昵称相同
///
public string OperatorName = "";
///
/// 计算机名
///
public string WSName = "";
///
/// 客户名称
///
public string ClientName = "";
///
/// 默认退出系统方式
///
public ENUMCloseAction ExitResult = ENUMCloseAction.caNone;
///
/// 如果无法连接则后面不在继续连接了
///
public bool bSmartClientIsOK = true;
///
/// 文件升级ip
///
public string UpdateIP = "";
///
/// 换肤路径
///
public string SkinPath = "";
///
/// 设置delphi公用库参数
///
public void SetDephiDllParams()
{
StringBuilder sb1 = new StringBuilder();
sb1.Append(OperatorName);
StringBuilder sb2 = new StringBuilder();
sb2.Append(WSName);
StringBuilder sb3 = new StringBuilder();
sb3.Append(SkinPath);
//给delphi库设置参数(用户id、子系统id、操作员名称、计算机名称)
PubUtil.Delphi_SetParams(EmployeeId, SubSysId, sb1, sb2, sb3);
}
//=============================================================================================================
private static ERPInfo _instance = null;
private ERPInfo()
{
}
public static ERPInfo Instance
{
get
{
if (_instance == null)
_instance = new ERPInfo();
return _instance;
}
}
///
/// 页面水印层
///
public Form WatermarkForm;
}
}