Beispiel #1
0
 bool validartxt()
 {
     try
     {
         if (cbidPromocio.SelectedText != null)
         {
             if (TxtCodigoBarra.Text != "")
             {
                 if (TxtNombre.Text != "")
                 {
                     if (TxtDescripcion.Text != "")
                     {
                         if (TxtStock.Text != "" && TxtStock.Text != "0")
                         {
                             if (TxtStockMin.Text != "" && TxtStockMin.Text != "0")
                             {
                                 if (TxtCosto.Text != "")
                                 {
                                     if (TxtPrecioMin.Text != "")
                                     {
                                         if (TxtprecioVenta.Text != "")
                                         {
                                             if (TxtIva.Text != "")
                                             {
                                                 if (CbMedida.SelectedValue != null)
                                                 {
                                                     if (CbFamilia.SelectedValue != null)
                                                     {
                                                         if (cbpromocion.SelectedText != null)
                                                         {
                                                             if (cbProveedor.SelectedValue != null)
                                                             {
                                                                 if (CbEstatus.SelectedText != null)
                                                                 {
                                                                     if (TxtFechaCaducidad.Text != null)
                                                                     {
                                                                         return(true);
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                             else
                                             {
                                                 TxtIva.Focus();
                                             }
                                         }
                                         else
                                         {
                                             TxtprecioVenta.Focus();
                                         }
                                     }
                                     else
                                     {
                                         TxtPrecioMin.Focus();
                                     }
                                 }
                                 else
                                 {
                                     TxtCosto.Focus();
                                 }
                             }
                             else
                             {
                                 TxtStockMin.Focus();
                             }
                         }
                         else
                         {
                             TxtStock.Focus();
                         }
                     }
                     else
                     {
                         TxtDescripcion.Focus();
                     }
                 }
                 else
                 {
                     TxtNombre.Focus();
                 }
             }
             else
             {
                 TxtCodigoBarra.Focus();
             }
         }
     }
     catch (Exception e)
     {
         MessageBox.Show("Error consulte con su administrador error:" + e.ToString(), "Error");
     }
     return(false);
 }