Пример #1
0
        protected void BackupNow_OnClick(object sender, EventArgs e)
        {
            //DisplayErrorMessage("This functionality is not implemented");
            if (!canAccessSection)
            {
                DisplayAccessError();
                return;
            }

            try
            {
                Return returnObj = BackupHelper.BackupDatabase();

                if (returnObj.IsError)
                {
                    DisplayErrorMessage("Error backing up DB", returnObj.Error);
                }
                else
                {
                    DisplaySuccessMessage("Successfully backed up DB");
                    BindDbBackUpsList();
                }
            }
            catch (Exception ex)
            {
                ErrorHelper.LogException(ex);
                DisplayErrorMessage("Error backing up DB", ErrorHelper.CreateError(ex));
            }
        }
Пример #2
0
        private void btnRespaldar_Click(object sender, EventArgs e)
        {
            if (txtPhat.Text.Trim() == "")
            {
                MessageBox.Show("Falta información para realizar respaldo...", "MENSAJE DEL SISTEMA");
                return;
            }
            else
            {
                String RUTA = txtPhat.Text.Trim();
                SqlServerBackupRestore.BackupHelper Respaldo = new BackupHelper();
                Respaldo.BackupDatabase("anju", "sa", "4159", "AYALA\\AYALA", RUTA);

                //Respaldo.BackupDatabase("anju","sa","4159","ayala\\ayala",this.txtPhat.Text.Trim());
                MessageBox.Show("La Base de Datos ha sido respaldada exitosamente !!!", "MENSAJE DEL SISTEMA");
            }
        }