Пример #1
0
 private void porClaveDeLaCompraToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (isComprasShow)
     {
         frmResumenComprasID.Focus();
     }
     else
     {
         if (VerificarAdmin(this.usuario))
         {
             autorizacion_form form = new autorizacion_form();
             if (form.ShowDialog() == DialogResult.OK)
             {
                 if (form.ValorRetorno)
                 {
                     frmResumenComprasID.MdiParent = this;
                     frmResumenComprasID.Show();
                     isResumenComprasID = true;
                 }
             }
         }
         else
         {
             frmResumenComprasID.MdiParent = this;
             frmResumenComprasID.Show();
             isResumenComprasID = true;
         }
     }
 }
Пример #2
0
 private void importarExportarToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (isImpExpShow)
     {
         frmImporExp.Focus();
     }
     else
     {
         if (VerificarAdmin(this.usuario))
         {
             autorizacion_form form = new autorizacion_form();
             if (form.ShowDialog() == DialogResult.OK)
             {
                 if (form.ValorRetorno)
                 {
                     frmImporExp.MdiParent = this;
                     frmImporExp.Show();
                     isImpExpShow = true;
                 }
             }
         }
         else
         {
             frmImporExp.MdiParent = this;
             frmImporExp.Show();
             isImpExpShow = true;
         }
     }
 }
Пример #3
0
 private void datosDelTicketToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (isConfigShow)
     {
         frmConfig.Focus();
     }
     else
     {
         if (VerificarAdmin(this.usuario))
         {
             autorizacion_form form = new autorizacion_form();
             if (form.ShowDialog() == DialogResult.OK)
             {
                 if (form.ValorRetorno)
                 {
                     frmConfig.MdiParent = this;
                     frmConfig.Show();
                     isConfigShow = true;
                 }
             }
         }
         else
         {
             frmConfig.MdiParent = this;
             frmConfig.Show();
             isConfigShow = true;
         }
     }
 }
Пример #4
0
 private void generarCódigosToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (isGenCodiShow)
     {
         frmGenCodi.Focus();
     }
     else
     {
         if (VerificarAdmin(this.usuario))
         {
             autorizacion_form form = new autorizacion_form();
             if (form.ShowDialog() == DialogResult.OK)
             {
                 if (form.ValorRetorno)
                 {
                     frmGenCodi.MdiParent = this;
                     frmGenCodi.Show();
                     isGenCodiShow = true;
                 }
             }
         }
         else
         {
             frmGenCodi.MdiParent = this;
             frmGenCodi.Show();
             isGenCodiShow = true;
         }
     }
 }
Пример #5
0
 private void créditoAProveedoresToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (isCreditoProveShow)
     {
         frmCreditoProve.Focus();
     }
     else
     {
         if (VerificarAdmin(this.usuario))
         {
             autorizacion_form form = new autorizacion_form();
             if (form.ShowDialog() == DialogResult.OK)
             {
                 if (form.ValorRetorno)
                 {
                     frmCreditoProve.MdiParent = this;
                     frmCreditoProve.Show();
                     isCreditoProveShow = true;
                 }
             }
         }
         else
         {
             frmCreditoProve.MdiParent = this;
             frmCreditoProve.Show();
             isCreditoProveShow = true;
         }
     }
 }
        private void otorgar_descuento_button_Click(object sender, EventArgs e)
        {
            autorizacion_form form = new autorizacion_form();

            if (UsuarioActual.Privilegios.Equals("Administrador"))
            {
                descuento_textBox.Enabled = true;
                descuento_textBox.Focus();
                descuento_textBox.SelectionStart  = 0;
                descuento_textBox.SelectionLength = descuento_textBox.Text.Length;
            }

            else if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.ValorRetorno)
                {
                    descuento_textBox.Enabled = true;
                    descuento_textBox.Focus();
                    descuento_textBox.SelectionStart  = 0;
                    descuento_textBox.SelectionLength = descuento_textBox.Text.Length;
                }
            }
        }