//private void CargarDataGrid() //{ // DetalleDataGrid.ItemsSource = null; // DetalleDataGrid.ItemsSource = ordenes.OrdenesDetalle; //} private bool Validar() { bool paso = true; //if (string.IsNullOrWhiteSpace(ClienteIdTex.Text)) //{ // MessageBox.Show("El Campo ClienteId Debe LLenarse.."); // ClienteIdTex.Focus(); // paso = false; //} if (string.IsNullOrWhiteSpace(ProductoIdTex.Text)) { MessageBox.Show("Los Campos ProductoId---ClienteId--Y--Cantidad Debe LLenarse.."); ProductoIdTex.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(CantidadOdenTex.Text)) { MessageBox.Show("El Campo CANTIDAD no puede estar vacio"); CantidadOdenTex.Focus(); paso = false; } else { foreach (var caracter in CantidadOdenTex.Text) { if (!char.IsDigit(caracter)) { paso = false; MessageBox.Show("Escriba solo numeros en el campo CANTIDAD.."); } else if (!char.IsDigit(caracter)) { paso = true; } } } return(paso); }