private void NuevoButton_Click(object sender, EventArgs e) { ProveedorIdTextBox.Clear(); NombreEmpresaTextBox.Clear(); DireccionTextBox.Clear(); TelefonoMaskedTextBox.Clear(); EmailTextBox.Clear(); RNCTextBox.Clear(); NombreRepresentanteTextBox.Clear(); CelularMaskedTextBox.Clear(); ProveedorIdTextBox.ReadOnly = false; }
private void NuevoButton_Click(object sender, EventArgs e) { ProveedorIdTextBox.Clear(); NombreEmpresaTextBox.Clear(); DireccionTextBox.Clear(); TelefonoMaskedTextBox.Clear(); EmailTextBox.Clear(); RNCTextBox.Clear(); NombreRepresentanteTextBox.Clear(); CelularMaskedTextBox.Clear(); ProveedorIdTextBox.ReadOnly = false; miError.Clear(); ButtonGuardar.Text = "Guardar"; EliminarButton.Enabled = false; }
private bool Validar() { bool paso = true; if (SalidaIdTextBox.Text == string.Empty) { MessageBox.Show("SalidaId Vacio"); SalidaIdTextBox.Focus(); paso = false; } else if (ProveedorIdTextBox.Text == string.Empty || ProveedorIdTextBox.Text == "0") { MessageBox.Show("ProveedorId no Valido"); ProveedorIdTextBox.Focus(); paso = false; } else if (UsuarioIdTextBox.Text == string.Empty || UsuarioIdTextBox.Text == "0") { MessageBox.Show("UsuarioId no Valido"); UsuarioIdTextBox.Focus(); paso = false; } else if (FechaCompraDateTimePicker.Text == string.Empty) { MessageBox.Show("Fecha Vacia"); FechaCompraDateTimePicker.Focus(); paso = false; } else if (TotalTextBox.Text == string.Empty) { MessageBox.Show("No hay Productos Registrados"); TotalTextBox.Focus(); paso = false; } else if (SDetalleDataGrid.DataContext == null) { MessageBox.Show("Debe Agregar un Producto"); paso = false; } return(paso); }