private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                Hide();
                using (LoginForm frmLogin = new LoginForm())
                {
                    frmLogin.ShowDialog();
                }
                if (Sesion.Instancia().UsuarioLogueado != null)
                {
                    Show();
                    Abrir();

                    if (!DigitoVerificador.ChequearDVs())
                    {
                        MessageBox.Show(ObtenerLeyenda("msgPruebaDVMal"), "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                    }

                    ChequearAlertasDeInsuficiencia();
                }
                else
                {
                    Application.Exit();
                }
            }
            catch (Exception ex)
            {
                Log.Grabar(ex);
            }
        }
 private void BtnCrearBackup_Click(object sender, EventArgs e)
 {
     try
     {
         sfdCrearBackup.ShowDialog();
         string filePath = sfdCrearBackup.FileName;
         if (string.IsNullOrWhiteSpace(filePath))
         {
             //MessageBox.Show(ObtenerLeyenda("msgUbicacionVaciaCrear"), ObtenerLeyenda("msgUbicacionVaciaCrearTitulo"),
             //    MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else if (DigitoVerificador.ChequearDVs())
         {
             Backup.HacerBackup(sfdCrearBackup.FileName);
             MessageBox.Show(ObtenerLeyenda("msgBackupCreado"), ObtenerLeyenda("msgBackupCreadoTitulo"),
                             MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show(ObtenerLeyenda("msgPruebaDVMal"), "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
     }
     catch
     {
         MostrarError();
     }
 }