Example #1
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            ProveedoresNegocio proNeg = new ProveedoresNegocio();

            try
            {
                if (dgvProv.SelectedRows.Count > 0)
                {
                    if (MessageBox.Show("Está seguro de que desea eliminar el registro?", "Seguro?", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        Proveedores aux = (Proveedores)dgvProv.CurrentRow.DataBoundItem;

                        proNeg.eliminar(aux.IdProveedor);
                        Proveedoress pro = new Proveedoress();
                        this.Close();
                        pro.Show();
                    }
                }
                else
                {
                    MessageBox.Show("Debe seleccionar un registro");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Example #2
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            ProveedoresNegocio ProvCrear = new ProveedoresNegocio();

            try
            {
                Proveedores Prov = new Proveedores();

                Prov.Cuit        = txtCuit.Text.Trim();
                Prov.Descripcion = txtDescripcion.Text.Trim();
                Prov.Direccion   = txtDireccion.Text.Trim();
                Prov.IdLocalidad = Convert.ToInt32(cbxCodigoPostal.Text.Trim());
                Prov.Telefono    = txtTelefono.Text.Trim();
                Prov.Mail        = txtMail.Text.Trim();
                Prov.Estado      = true;

                ProvCrear.AgregarProveedor(Prov);
                MessageBox.Show("Agregado con éxito");

                Proveedoress pro = new Proveedoress();
                this.Close();
                pro.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Example #3
0
 private void btnSalir_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Desea Salir?", "Salir", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         Proveedoress pro = new Proveedoress();
         this.Close();
         pro.Show();
     }
 }
Example #4
0
        private void TsmProveedores_Click(object sender, EventArgs e)
        {
            Proveedoress provListar = new Proveedoress();

            provListar.Show();
        }