Exemple #1
0
 private void salida_Click(object sender, EventArgs e)
 {
     if (panel.SelectedRows.Count == 1)
     {
         if (unidadesSalida.Text == "" || int.Parse(unidadesSalida.Text) < 0)
         {
             MessageBox.Show("favor de introducir una cantidad valida");
         }
         else
         {
             int x = 0;
             x = Convert.ToInt32(panel.CurrentRow.Cells[3].Value);
             string y = "";
             y = Convert.ToString(panel.CurrentRow.Cells[0].Value);
             int w = int.Parse(unidadesSalida.Text);
             if (x >= w)
             {
                 ProductoFUN.salida(x, y, w);
                 panel.DataSource = ProductoFUN.consulta(searchdata.Text, searchdata.Text);
             }
             else
             {
                 MessageBox.Show("No hay existencia suficiente para realizar esa salida");
             }
         }
     }
     else
     {
         MessageBox.Show("seleccione linea");
     }
 }