예제 #1
0
파일: Eliminar.cs 프로젝트: xoscar/FastSell
        private void button1_Click(object sender, EventArgs e)//Aceptar
        {
            if (txtClave.Text == _clave)
            {
                switch (_tipo)
                {
                //caso liquidar pedido
                case 0:
                    string _res = "";
                    _co.Abrir();
                    _co.LiquidarPedido(_pe, ref _res);
                    _co.Cerrar();
                    MessageBox.Show(_res, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    _adm.Enabled = true;
                    _adm.Refresh();
                    this.Close();
                    break;

                //caso liquidar nota
                case 1:
                    _res = "";
                    _co.Abrir();
                    _co.LiquidarNota(_no, ref _res);
                    _co.Cerrar();
                    MessageBox.Show(_res, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    _adm.Enabled = true;
                    _adm.Refresh();
                    this.Close();
                    break;

                //caso bloquear usuario
                case 2:
                    _res = "";
                    _co.Abrir();
                    _co.Bloquearusuario(_user, ref _res);
                    _co.Cerrar();
                    MessageBox.Show(_res, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    _adm.Enabled = true;
                    this.Close();
                    break;

                //caso desbloquear usuario
                case 3:
                    _res = "";
                    _co.Abrir();
                    _co.DesbloquearUsuario(_user, ref _res);
                    _co.Cerrar();
                    MessageBox.Show(_res, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    _adm.Enabled = true;
                    this.Close();
                    break;
                }
            }
            else
            {
                MessageBox.Show("Error en la clave", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
 private void PantallaTarjetaCliente_FormClosing(object sender, FormClosingEventArgs e)//Al cerrar
 {
     _adm.Enabled = true;
     _adm.Refresh();
     _adm.MostrarClientes();
 }
예제 #3
0
 private void PantallaAgregarPedido_FormClosing(object sender, FormClosingEventArgs e)//Al cerrar
 {
     _adm.Enabled = true;
     _adm.Refresh();
 }
예제 #4
0
 private void DetallesNota_FormClosing(object sender, FormClosingEventArgs e)
 {
     _adm.Enabled = true;
     _adm.Refresh();
 }