Example #1
0
 private void dgvAlmacenes_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (tipo == 1)
         {
             if (dgvAlmacenes.CurrentRow.Index != -1 && almacenanterior != Convert.ToInt32(dgvAlmacenes.CurrentRow.Cells[codalmacen.Name].Value))
             {
                 frmLogin.iCodAlmacen  = Convert.ToInt32(dgvAlmacenes.CurrentRow.Cells[codalmacen.Name].Value);
                 frmLogin.AlmacenLogin = admalm.CargaAlmacen(frmLogin.iCodAlmacen);
                 frmLogin.sAlmacen     = frmLogin.AlmacenLogin.Nombre;
                 frmLogin.iCodSucursal = Convert.ToInt32(cmbSucursal.SelectedValue);
                 mdi_Menu.Cambio       = true;
             }
         }
         else if (tipo == 2)
         {
             if (dgvAlmacenes.CurrentRow.Index != -1)
             {
                 frmRequerimientosVigentes form = (frmRequerimientosVigentes)Application.OpenForms["frmRequerimientosVigentes"];
                 form.almadest = Convert.ToInt32(dgvAlmacenes.CurrentRow.Cells[codalmacen.Name].Value);
             }
         }
         this.Close();
     }
     catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); }
 }
Example #2
0
 private void dgvAlmacenes_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (tipo == 1)
         {
             if (dgvAlmacenes.CurrentRow.Index != -1 &&
                 almacenanterior != Convert.ToInt32(dgvAlmacenes.CurrentRow.Cells[codalmacen.Name].Value))
             {
                 frmLogin.iCodAlmacen  = Convert.ToInt32(dgvAlmacenes.CurrentRow.Cells[codalmacen.Name].Value);
                 frmLogin.AlmacenLogin = admalm.CargaAlmacen(frmLogin.iCodAlmacen);
                 frmLogin.sAlmacen     = frmLogin.AlmacenLogin.Nombre;
                 frmLogin.iCodSucursal = Convert.ToInt32(cmbSucursal.SelectedValue);
                 mdi_Menu.Cambio       = true;
             }
         }
         else if (tipo == 2)
         {
             if (dgvAlmacenes.CurrentRow.Index != -1)
             {
                 frmRequerimientosVigentes form = (frmRequerimientosVigentes)Application.OpenForms["frmRequerimientosVigentes"];
                 form.almadest = Convert.ToInt32(dgvAlmacenes.CurrentRow.Cells[codalmacen.Name].Value);
             }
         }
         this.Close();
     }
 }
Example #3
0
 private void btnGuardar_Click(object sender, EventArgs e)
 {
     if (Proceso == 0)
     {
         if (txtDiasVigencia.Text != "")
         {
             frmLogin.Configuracion.DiasVigencia     = Convert.ToInt32(txtDiasVigencia.Text);
             frmLogin.Configuracion.FacturasVencidas = chbfacturasVencidas.Checked;
         }
         if (AdmEmp.UpdateConfiguracion(frmLogin.Configuracion))
         {
             frmLogin.Configuracion = AdmEmp.CargaConfiguracion();
             MessageBox.Show("Los datos se guardaron correctamente", "Configuracion", MessageBoxButtons.OK,
                             MessageBoxIcon.Information);
         }
         this.Close();
     }
     else if (Proceso == 2)
     {
         if (Procede == 1)
         {
             if (txtComentario.Text != "")
             {
                 if (txtComentario.Text != "" && AdmReq.rechazado(CodRequerimiento, txtComentario.Text))
                 {
                     MessageBox.Show("El requerimiento ha sido rechazado correctamente", "Requerimiento",
                                     MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
                 this.Close();
                 frmRequerimientosVigentes form = (frmRequerimientosVigentes)Application.OpenForms["frmRequerimientosVigentes"];
                 form.CargaListaHistorial(frmLogin.iCodAlmacen);
             }
             else
             {
                 MessageBox.Show("ingrese Comentario");
             }
         }
         else if (Procede == 2)
         {
             if (txtComentario.Text != "")
             {
                 if (txtComentario.Text != "" && admNotaIngreso.anular(serie, numeracion, txtComentario.Text))
                 {
                     MessageBox.Show("La Transferencia ha sido anulada correctamente", "Transferencia", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
                 else
                 {
                     MessageBox.Show("Verifique.");
                 }
                 this.Close();
             }
             else
             {
                 MessageBox.Show("ingrese Comentario");
             }
         }
     }
 }