public void AutoBackup() { AppControllerBase.ErrorHandler = BackupErrorHandler; CompanyList companies = CompanyList.GetList(AppContext.User.GetInfo(), false); AppController.AutoBackup(); }
static void Main(string[] args) { try { AppController.SetDBPassword(); Principal.initnHManager(); AppController.AutoBackup(true); Console.WriteLine("Copia de seguridad realizada con EXITO"); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public void Run() { if (Status == EStatus.Working) { return; } Status = EStatus.Working; try { MyLogger.LogText("BAQUP START", "BaQup::Run"); try { AppController.Instance.InitFromService(BackupErrorHandler); Principal.Login(Library.SettingsMng.GetServicesUser(), Library.SettingsMng.GetServicesPassword()); Library.SettingsMng.Instance.SetBackupsPath(Properties.Settings.Default.BACKUPS_PATH); CompanyList companies = CompanyList.GetList(AppContext.User.GetInfo(), false); AppController.AutoBackup(companies.ToList <ISchemaInfo>(), true); MyLogger.LogText("BAQUP FINISH", "BaQup::Run"); } catch (Exception ex) { Status = EStatus.Error; MyLogger.LogException(ex, "BaQup::Run"); } Status = EStatus.Closed; } catch (Exception ex) { Status = EStatus.Error; MyLogger.LogException(ex, "BaQup::Run"); } finally { AppController.Instance.Close(); } }