using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace digioz
{
    public class DatabaseUtilManagement
    {
        private static PortalSettings coPortalSettings;

        public static DataTable GetObject(string psSQL)
        {
            coPortalSettings = PortalSettingsManagement.GetPortalSettings();
            DataTable loDT = null;

            if (coPortalSettings.DBRelational == true)
            {
                IDataRelational loDB = DataFactory.GetDataObject(coPortalSettings);

                try
                {
                    loDB.openConnection();
                    loDT = loDB.QueryDBDataset(psSQL);
                    loDB.closeConnection();
                }
                catch
                {

                }
            }
            return loDT;
        }
    }
}
