unit UnitCBMSConst;
interface
Uses Types,Registry,SysUtils;
Type
TActionToDo=(atdDelete,atdOpen,atdModify,atdUpdate,atdLookFor,atdAdd);//定义所有的动作事件
Const
CB_RegRoot =DWORD($80000001);//HKEY_CURRENT_USER;
CB_RegKey ='/Software/CBNSoftware/CBMS';
CB_RegConnectionEntry='CBSConnectionString';
CB_RegConnectionPort= 'CBSConnectionPort';
CB_ConnType ='CB_ConnType';
CB_ConnDescription ='CB_ConnDescription';
CB_UseProxy ='CB_ConnUseProxy';
CB_Proxy ='CB_ConnProxy';
CB_ProxyByPass ='CB_ConnProxyByPass';
CB_ProxyUserName ='CB_ProxyUserName';
CB_ProxyUserPassword='CB_ProxyUserPassword';
CB_LoginUsername ='CB_LoginUserName';
CB_SvrDBServerName ='CB_SvrDBConn';
CB_SvrDBUserName ='CB_SvrDBUserName';
CB_SvrDbUserPassword='CB_SvrDBUserPassword';
CB_Enhydra_Address ='CB_SvrWebAddress';
SvrConfigFile='CBNSvc.dll';
Function GetConnectionString:String;
Function GetConnectionPort :Integer;
Function GetConnectionType:String;
Function GetConnectionDescription:String;
Function GetConnectionProxy:String;
Function GetConnectionProxyByPass:String;
Function GetConnectionUserName:String;
Function GetConnectionPassword:String;
Function GetSvrDBName:String;
Function GetSvrDbUserName:String;
Function GetSvrDbUserPassword:String;
Type
TUserType=(utSYSDBA,utEPGMGR,utDEVMGR,utPROMGR,utINFOMGR,utBILLMGR,utPHONEMGR,utError,utNoRole);
//所有操作员的类型。
var
Reg:TRegistry;
//KeyExists: Boolean;
//CurrentOperatorRoleID,CurrentOperatorRoleName:String;//系统当前的操作员的权限号与权限名。
implementation
Function GetConnectionString:String;
begin
Result:=Reg.ReadString(CB_RegConnectionEntry);
end;
Function GetConnectionPort :Integer;
begin
Result:=Reg.ReadInteger(CB_RegConnectionPort);
end;
Function GetConnectionType:String;
begin
Result:=Reg.ReadString(CB_ConnType);
end;
Function GetConnectionDescription:String;
begin
Result:=Reg.ReadString(CB_ConnDescription);
end;
Function GetConnectionProxy:String;
begin
Result:=Trim(Reg.ReadString(CB_Proxy));
end;
Function GetConnectionProxyByPass:String;
begin
Result:=Trim(Reg.ReadString(CB_ProxyByPass));
end;
Function GetConnectionUserName:String;
begin
Result:=Reg.ReadString(CB_ProxyUserName)
end;
Function GetConnectionPassword:String;
begin
Result:=Trim(Reg.ReadString(CB_ProxyUserPassword))
end;
Function GetSvrDBName:String;
begin
Result:=Trim(Reg.ReadString(CB_SvrDbServerName))
end;
Function GetSvrDbUserName:String;
begin
Result:=Trim(Reg.ReadString(CB_SvrDbUserName))
end;
Function GetSvrDbUserPassword:String;
begin
Result:=Trim(Reg.ReadString(CB_SvrDbUserPassWord))
end;
Initialization
Reg:=TRegistry.Create;
Reg.RootKey :=CB_RegRoot;
Reg.OpenKey(CB_RegKey, True);
Finalization
Reg.Free;
end.