Esempio n. 1
0
        private void btnModificarCorredor_Click(object sender, EventArgs e)
        {
            dgvCorredor[0, pos].Value = txtIdProveedorCorredor.Text;
            dgvCorredor[1, pos].Value = txtNúmeroCorredor.Text;
            dgvCorredor[2, pos].Value = txtNombreCorredor.Text;
            dgvCorredor[3, pos].Value = txtApellidoCorredor.Text;
            dgvCorredor[4, pos].Value = txtTelCorredor.Text;
            dgvCorredor[5, pos].Value = txtCelularCorredor.Text;
            dgvCorredor[6, pos].Value = txtMailCorredor.Text;

            CorredorNegocio negocio = new CorredorNegocio();

            try
            {
                corredorLocal = new Corredor();
                corredorLocal.Id_Proveedor = Convert.ToInt32(txtIdProveedorCorredor.Text);
                corredorLocal.Número       = txtNúmeroCorredor.Text;
                corredorLocal.Nombre       = txtNombreCorredor.Text;
                corredorLocal.Apellido     = txtApellidoCorredor.Text;
                corredorLocal.Teléfono     = Convert.ToInt64(txtTelCorredor.Text);
                corredorLocal.Celular      = Convert.ToInt64(txtCelularCorredor.Text);
                corredorLocal.Mail         = txtMailCorredor.Text;

                negocio.modificarCorredor(corredorLocal);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Esempio n. 2
0
        private void cargarGrilla()
        {
            CorredorNegocio Corredores = new CorredorNegocio();

            try
            {
                dgvCorredor.DataSource = Corredores.ListarCorredores();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Esempio n. 3
0
        private void btnAgregarCorredor_Click(object sender, EventArgs e)
        {
            CorredorNegocio negocio = new CorredorNegocio();

            try
            {
                corredorLocal = new Corredor();
                corredorLocal.Id_Proveedor = Convert.ToInt32(txtIdProveedorCorredor.Text);
                corredorLocal.Número       = txtNúmeroCorredor.Text;
                corredorLocal.Nombre       = txtNombreCorredor.Text;
                corredorLocal.Apellido     = txtApellidoCorredor.Text;
                corredorLocal.Teléfono     = Convert.ToInt64(txtTelCorredor.Text);
                corredorLocal.Celular      = Convert.ToInt64(txtCelularCorredor.Text);
                corredorLocal.Mail         = txtMailCorredor.Text;

                negocio.agregarCorredor(corredorLocal);
                cargarGrilla();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }