Exemple #1
0
 private void btnRegistrar_Click(object sender, EventArgs e)
 {
     if (DatosSistema.EstaCajaAbierta)
     {
         if (detalles != null)
         {
             foreach (var item in detalles)
             {
                 int i = 0;
                 if (decimal.TryParse(dgvGrilla.Rows[i].Cells["CantidadProducto"].Value.ToString(), out decimal cantidad))
                 {
                     _articuloServicio.AgregarStock(item.Key, cantidad);
                     i++;
                 }
             }
             RegistrarListadoArticulos();
         }
         else
         {
             MessageBox.Show("No se puede Registrar una lista de articulos vacía.", "Advertencia");
         }
     }
     else
     {
         MessageBox.Show("La caja debe estar abierta.", "Advertencia");
     }
 }