private void FrmProveedor_Load(object sender, EventArgs e) { verificacionIdioma(); try { DgvClientes.DataSource = ProveedoresController.Cargar_Proveedor(); } catch (Exception) { MessageBox.Show("Error al capturar datos"); } }
private void FrmProveedores_Load_1(object sender, EventArgs e) { verificacionIdioma(); try { cmbEstado.DataSource = ProveedoresController.Cargar_Estado(); cmbEstado.DisplayMember = "Estado"; cmbEstado.ValueMember = "idEstado_Proveedor"; } catch (Exception) { throw; } }
void EnvioDatos() { ProveedoresController agregar = new ProveedoresController(); agregar.DUI = txtDui.Text; agregar.NombreProveedor = txtPrimerNombre.Text; agregar.Direccion = txtDireccion.Text; agregar.CorreoProveedor = txtCorreoProveedor.Text; agregar.Descripcion = txtDescripcion.Text; agregar.EstadoProveedor = Convert.ToInt16(cmbEstado.SelectedValue); if (agregar.EnviarDatos_Controller() == false) { MessageBox.Show("El usuario no puedo ser ingresado", "Advertencia", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Warning); } else { LimpiarCampos(); } }