using System; using System.Collections; using System.Collections.Generic; using System.Text; namespace Payroll.BO { public class Utils { public static void BackupDatabase(string filepath) { try { UtilsService Service = new UtilsService(); Service.BackupDatabase(filepath); } catch (Exception ex) { throw new Exception(ex.Message); } } public static ArrayList GetDatabases() { try { UtilsService Service = new UtilsService(); return Service.GetDatabases(); } catch (Exception ex) { throw new Exception(ex.Message); } } public static void RestorDatabase(string dbName,string filepath) { try { UtilsService Service = new UtilsService(); Service.RestorDatabase(dbName, filepath); } catch (Exception ex) { throw new Exception(ex.Message); } } public static void AttachSingleDB(string dbName, string filepath) { try { UtilsService Service = new UtilsService(); Service.AttachSingleDB(filepath,dbName); } catch (Exception ex) { throw new Exception(ex.Message); } } public static void RestorDatabase(string sDBName, string sBackupFilePath, string sToDataFilePath, string sToLogFilePath) { try { UtilsService Service = new UtilsService(); Service.RestorDatabase(sDBName, sBackupFilePath,sToDataFilePath,sToLogFilePath); } catch (Exception ex) { throw new Exception(ex.Message); } } } }