Example #1
0
 private void txtSerie_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F1)
     {
         if (Application.OpenForms["frmSerie"] != null)
         {
             Application.OpenForms["frmSerie"].Activate();
         }
         else
         {
             frmSerie form = new frmSerie();
             //form.DocSeleccionado = 18;
             form.DocSeleccionado = CodDocumento;
             form.Sigla           = txtDocRef.Text;
             form.Proceso         = 3;
             form.ShowDialog();
             ser            = form.ser;
             CodSerie       = ser.CodSerie;
             txtSerie.Text  = ser.Serie;
             txtNumero.Text = ser.Numeracion.ToString().PadLeft(9, '0');
             txtdoc.Text    = txtDocRef.Text + " " + ser.Serie + " - " + ser.Numeracion.ToString().PadLeft(9, '0');
             if (CodSerie != 0)
             {
                 ProcessTabKey(true);
                 if (txtSerie.Text == "")
                 {
                     txtSerie.Focus();
                 }
             }
         }
     }
 }
Example #2
0
 private void txtSerie_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F1)
     {
         if (Application.OpenForms["frmSerie"] != null)
         {
             Application.OpenForms["frmSerie"].Activate();
         }
         else
         {
             frmSerie form = new frmSerie();
             form.Proceso         = 3;
             form.DocSeleccionado = CodDocumento;
             form.ShowDialog();
             ser      = form.ser;
             CodSerie = ser.CodSerie;
             manual   = Convert.ToInt32(ser.PreImpreso);
             if (CodSerie != 0)
             {
                 txtSerie.Text = ser.Serie;
                 //if (Procede != 4) txtNumero.Text = ser.Numeracion.ToString();
                 //else txtNumero.Text = numSerie;
             }
             if (CodSerie != 0)
             {
                 ProcessTabKey(true);
             }
         }
     }
 }
Example #3
0
 private void btnSeries_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["frmSerie"] != null)
     {
         Application.OpenForms["frmSerie"].Activate();
     }
     else
     {
         frmSerie frm = new frmSerie();
         //frm.MdiParent = this.MdiParent;
         frm.DocSeleccionado = doc.CodTipoDocumento;
         frm.Sigla           = doc.Sigla;
         frm.ShowDialog();
     }
 }
Example #4
0
 private void txtSerie_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F1)
     {
         if (Application.OpenForms["frmSerie"] != null)
         {
             Application.OpenForms["frmSerie"].Activate();
         }
         else
         {
             frmSerie form = new frmSerie();
             form.DocSeleccionado = doc.CodTipoDocumento;
             form.Sigla           = doc.Sigla;
             form.Proceso         = 3;
             form.ShowDialog();
             ser      = form.ser;
             CodSerie = ser.CodSerie;
             num      = ser.Numeracion;
             if (CodSerie != 0)
             {
                 if (ser.PreImpreso)
                 {
                     CodSerie          = ser.CodSerie;
                     txtSerie.Text     = ser.Serie;
                     txtcodserie.Text  = ser.CodSerie.ToString();
                     txtNumero.Enabled = true;
                     txtNumero.Text    = "";
                 }
                 else
                 {
                     CodSerie          = ser.CodSerie;
                     txtSerie.Text     = ser.Serie;
                     txtcodserie.Text  = ser.CodSerie.ToString().PadLeft(3, '0');
                     txtNumero.Text    = ser.Numeracion.ToString().PadLeft(6, '0');
                     txtNumero.Enabled = false;
                 }
             }
             else
             {
                 txtDocRef.Focus();
             }
             if (CodSerie != 0)
             {
                 ProcessTabKey(true);
             }
         }
     }
 }
Example #5
0
 private void txtSerie_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F1)
     {
         if (Application.OpenForms["frmSerie"] != null)
         {
             Application.OpenForms["frmSerie"].Activate();
         }
         else
         {
             frmSerie form = new frmSerie();
             form.Proceso         = 3;
             form.DocSeleccionado = CodDocumento;
             form.ShowDialog();
             ser      = form.ser;
             CodSerie = ser.CodSerie;
             num      = ser.Numeracion;
             if (CodSerie != 0)
             {
                 txtcodserie.Text = ser.CodSerie.ToString();
                 txtSerie.Text    = ser.Serie;
             }
             if (CodSerie != 0)
             {
                 ProcessTabKey(true);
             }
         }
     }
     //if (txtcomentario.Text == "")
     //{
     //    txtcomentario.Focus();
     //}
     else
     {
         btnGuardar.Enabled = true;
     }
 }