void eliminar() { if (MessageBox.Show("¿Esta seguro que desea eliminar el proveedor?", "Confirmacion", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Control_de_proveedores.eliminar(Convert.ToInt32(txtid_proveedor.Text)); } cbEstado.Enabled = false; }
private void frmProveedores_Load(object sender, EventArgs e) { txt_creado_por.Text = uno; txt_creado_por.Enabled = false; cbEstado.Enabled = false; mostrar(); cbEstado.DataSource = Control_de_proveedores.cargar(); cbEstado.DisplayMember = "Estado"; cbEstado.ValueMember = "id_estado"; }
void actuali() { act.id_proveedor = Convert.ToInt16(txtid_proveedor.Text); act.nombre = txtnombre.Text; act.direccion = txtdireccion.Text; act.telefono = txtTelefono.Text; act.nit = txtNIt.Text; act.rubro = txtRubro.Text; act.id_estados = Convert.ToInt16(cbEstado.SelectedValue.ToString()); Control_de_proveedores.actualizarusu(act); cbEstado.Enabled = false; }
void agregarpro() { agre.nombre = txtnombre.Text; agre.nit = txtNIt.Text; agre.rubro = txtRubro.Text; agre.id_estados = Convert.ToInt16(cbEstado.SelectedValue.ToString()); agre.telefono = txtTelefono.Text; agre.direccion = txtdireccion.Text; agre.Creado_por = uno; int retorno = Control_de_proveedores.agregar_usu(agre); cbEstado.Enabled = false; }
void mostrar() { dataGridView1.DataSource = Control_de_proveedores.mostrar_pro(); cbEstado.Enabled = false; }