Ejemplo n.º 1
0
        private void ValidateRequest(DataAccessRequest dataAccessRequest, DataAccessConfiguration dataAccessConfiguration)
        {
            if (null == dataAccessRequest)
            {
                throw new DataAccessRequestException("Data Access Request object is null");
            }

            if (null == dataAccessConfiguration)
            {
                throw new DataAccessConfigurationException("Data Access Configuration object is null");
            }
        }
Ejemplo n.º 2
0
        public DataAccessResponse Exceute(DataAccessRequest DataAccessRequest)
        {
            DataAccessResponse Response = null;

            try
            {
                DataTable SecurityDataTable;
                DataTable ParameterDataTable;

                DataAccessConfiguration DataAccessConfig = (DataAccessConfiguration)ConfigurationManager.GetSection("DataAccessConfiguration");
                using (DataAccessManager Manager = new DataAccessManager(DataAccessRequest, DataAccessConfig))
                {
                    SecurityDataTable  = Manager.BuildSecurityDataTable();
                    ParameterDataTable = Manager.BuildParameterDataTable();
                    Response           = Manager.BuildResponse(ParameterDataTable);
                }
            }
            catch (DataAccessException Exception)
            { }
            return(Response);
        }
Ejemplo n.º 3
0
 internal DataAccessManager(DataAccessRequest dataAccessRequest, DataAccessConfiguration dataAccessConfiguration)
 {
     ValidateRequest(dataAccessRequest, dataAccessConfiguration);
     _dataAccessRequest       = dataAccessRequest;
     _dataAccessConfiguration = dataAccessConfiguration;
 }