Esempio n. 1
0
 private void bAnterior_Click(object sender, EventArgs e)
 {
     this.posicionLote--;
     if (this.posicionLote < lotes.Count && this.posicionLote >= 0)
     {
         RegistroLote lote = lotes.ElementAt(this.posicionLote);
         this.txbFGCodigo.Text  = lote.codigoRegistroLote;
         this.txbFGFecha.Text   = lote.fecha.ToShortDateString();
         this.txbFGLote.Text    = lote.lote;
         this.txbFGVersion.Text = lote.versionControl.ToString();
         this.ListarEsterilizaciones(lote.idRegistroLote);
         this.bGInforme.Enabled = true;
     }
     this.NavegacionGenerarInforme();
 }
Esempio n. 2
0
 private void bGenerarInforme_Click(object sender, EventArgs e)
 {
     this.panelRegistrarLote.Visible = false;
     this.panelRegistrarLote.Refresh();
     lotes = RegistroLote.listaRegistroLote();
     if (lotes.Count > 0)
     {
         RegistroLote lote = lotes.First();
         this.posicionLote      = 0;
         this.txbFGCodigo.Text  = lote.codigoRegistroLote;
         this.txbFGFecha.Text   = lote.fecha.ToShortDateString();
         this.txbFGLote.Text    = lote.lote;
         this.txbFGVersion.Text = lote.versionControl.ToString();
         this.ListarEsterilizaciones(lote.idRegistroLote);
         this.NavegacionGenerarInforme();
         this.bGenerarInforme.Enabled = true;
     }
     this.panelGeneradorInforme.Visible = true;
     this.panelGeneradorInforme.Refresh();
 }
Esempio n. 3
0
 private void bGuardar_Click(object sender, EventArgs e)
 {
     if (!(this.txbCodigo.Text != null && this.txbLote.Text != null && this.txbVersion != null))
     {
         MessageBox.Show("Debe ingresar todos los campos (*) requeridos!");
     }
     else
     {
         Int32 selectedRowCount = dataGridView1.Rows.GetRowCount(DataGridViewElementStates.Selected);
         if (selectedRowCount <= 0)
         {
             MessageBox.Show("Debe seleccionar minimamente una esterilizacion!");
         }
         else
         {
             RegistroLote lote = new RegistroLote();
             lote.codigoRegistroLote = this.txbCodigo.Text;
             lote.versionControl     = int.Parse(this.txbVersion.Text);
             lote.fecha = this.dateTimePicker1.Value;
             lote.lote  = this.txbLote.Text;
             lote.guardar();
             lote.obtenerId();
             if (selectedRowCount > 0)
             {
                 for (int i = 0; i < selectedRowCount; i++)
                 {
                     Esterilizacion.actualizarEsterilizacion(int.Parse(dataGridView1.SelectedRows[i].Cells[0].Value.ToString()), lote.idRegistroLote);
                 }
             }
             this.dataGridView1.DataSource = Esterilizacion.listaEsterilizacionesSinLote();
             this.dataGridView1.Refresh();
             this.txbLote.Text    = "";
             this.txbCodigo.Text  = "";
             this.txbVersion.Text = "";
             this.dateTimePicker1.Refresh();
         }
     }
 }
Esempio n. 4
0
        private void controlLotesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            RegistroLote control = new RegistroLote();

            control.Show();
        }