Beispiel #1
0
 public List<Columns> GetColumns(string tableName,string dbName)
 {
     List<Columns> allColumns = new List<Columns>();
     DatabaseAccess access = new DatabaseAccess();
     try
     {
         allColumns = access.GetColoumns(tableName,dbName);
     }
     catch (Exception excep)
     {
         throw new Exception("Error in fetching data" + excep);
     }
     return allColumns;
 }
Beispiel #2
0
 public List<Tables> GetAllDBTables(string dbName)
 {
     List<Tables> allTables = new List<Tables>();
     DatabaseAccess access = new DatabaseAccess();
     try
     {
         allTables = access.GetAllDBTables(dbName);
     }
     catch (Exception excp)
     {
         throw;
     }
     return allTables;
 }
Beispiel #3
0
 public DataTable GetResult(string query)
 {
     DatabaseAccess getData = new DatabaseAccess();
     DataTable resultData = new DataTable();
     try
     {
         if (query != null)
         {
             resultData = getData.GetResult(query);
         }
     }
     catch (Exception)
     {
         throw;
     }
     return resultData;
 }