Ejemplo n.º 1
0
        private DBresponse fillColumns(DBresponse response)
        {
            if (response.isValid && columns == null)
            {
                try
                {
                    DataTable table = response.table;
                    columns = table.Columns;
                }
                catch (Exception ex)
                {
                    response.isValid   = false;
                    response.exception = ex.ToString();
                }
            }

            return(response);
        }
Ejemplo n.º 2
0
        public ManagerBase(DAL _dal, string table)
        {
            dal = _dal;

            string     sql      = createQuery(Queries.QUERY_GENERIC_TOP_ONE_SELECT, table, string.Empty, string.Empty);
            DBresponse response = dal.fillAdapter(sql);

            if (!response.isValid)
            {
                throw new Exception(response.exception);
            }
            else
            {
                response = fillColumns(response);
                if (!response.isValid)
                {
                    throw new Exception(response.exception);
                }
            }
        }