public Response() { SqlMapper = new ResponseMap(); sqlService = new SqlService(SqlConnection); //if (!System.Diagnostics.EventLog.SourceExists(APLServiceEventLog)) EventLog.CreateEventSource(APLServiceEventLog, "Application"); //Setup <APLServiceEventLog> event source manually through registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application //To resolve message IDs create a RG_EXPAND_SZ attribute, named "EventMessageFile" to: "C:\WINDOWS\Microsoft.NET\Framework\<current version>\EventLogMessages.dll" LocalServiceLog = new EventLog { Source = Helpers.Constants.ServiceEventLog }; }
public void GetEndpointsMapParameters(ref SqlService service) { //Map procedure... service.SqlProcedure = Names.SqlCommandAdministration; string sqlMessage = Names.SqlMessageGetEndpoints; //Map parameters... SqlServiceParameter[] parameters = { new SqlServiceParameter(Names.SqlMessage, SqlDbType.VarChar, 500, ParameterDirection.InputOutput, sqlMessage) }; service.SqlParameters.List = parameters; }
public void EndpointMapParameters(Endpoint endpoint, ref SqlService service) { //Map procedure... service.SqlProcedure = Names.SqlCommandAuthentication; //Map Endpoint to SQL DTO Table type... DataTable dtoDataTable = EndpointSqlDto.DataTable(endpoint); //Map parameters... SqlServiceParameter[] parameters = { new SqlServiceParameter(Names.ParameterDtoEndpoint, SqlDbType.Structured, Names.SqlParameterDtoTypeEndpoint, ParameterDirection.Input, dtoDataTable), new SqlServiceParameter(Names.SqlMessage, SqlDbType.VarChar, 500, ParameterDirection.InputOutput, Names.SqlMessageRequestEndpoint) }; service.SqlParameters.List = parameters; }
public void SelectLoginMapParameters(Credential login, ref SqlService service) { //Map procedure... service.SqlProcedure = Names.SqlCommandAuthentication; string sqlMessage = (login.Refresh) ? Names.SqlMessageRefreshCredential : Names.SqlMessageAuthenticate; //Map login to SQL DTO Credential Table type... DataTable dtoDataTable = CredentialSqlDto.DataTable(login); //Map parameters... SqlServiceParameter[] parameters = { new SqlServiceParameter(Names.ParameterDtoCredential, SqlDbType.Structured, Names.SqlParameterDtoTypeCredential, ParameterDirection.Input, dtoDataTable), new SqlServiceParameter(Names.SqlMessage, SqlDbType.VarChar, 500, ParameterDirection.InputOutput, sqlMessage) }; service.SqlParameters.List = parameters; }