예제 #1
0
 private void borrarTodaLaDataToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(this, "¿Seguro que quiere eliminar todo?", "Borrar data", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         service.removeAllData();
         MessageBox.Show(this, "Base de datos vaciada con exito", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information);
         service.LogOut();
     }
 }
예제 #2
0
 private void tsCerrarSesion_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(this, "¿Seguro que quiere cerrar sesion?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         service.LogOut();
         this.Hide();
         formInicioSesion formInicio = new formInicioSesion(service);
         formInicio.ShowDialog();
     }
 }