private void ModificarCodene()
 {
     HabilitarBotonesCO();
     this.gbCodene.Enabled = true;
     codene oCodene = new codene();
     CodeneImplement oCodeneImplement = new CodeneImplement();
     DataGridViewRow row = this.dgvCOCodene.CurrentRow;
     int id = Convert.ToInt32(row.Cells[0].Value);
     oCodene = oCodeneImplement.Get(id);
     this.lblCOCodigo.Text = oCodene.id_codene.ToString();
     this.dtpCoFechaAlta.Value = oCodene.fechaAlta.Value;
     this.dtpCOFechaResolucion.Value = oCodene.FechaBaja.Value;
     this.dgvCOCodene.Enabled = false;
 }
        private void GuardarCodene()
        {
            codene oCodene = new codene();
            CodeneImplement oCodeneImplement = new CodeneImplement();
            if (this.lblCOCodigo.Text == "")
            {

                oCodene.fechaAlta = dtpCoFechaAlta.Value;
                oCodene.FechaBaja = dtpCOFechaResolucion.Value;
                oCodene.id_socio = _idSocio;
                oCodeneImplement.Save(oCodene);
            }
            else
            {
                DataGridViewRow row = this.dgvCOCodene.CurrentRow;
                int id = Convert.ToInt32(row.Cells[0].Value);
                oCodene = oCodeneImplement.Get(id);
                oCodene.id_socio = _idSocio;
                oCodene.fechaAlta = dtpCoFechaAlta.Value;
                oCodene.FechaBaja = dtpCOFechaResolucion.Value;
                oCodeneImplement.Update(oCodene);

            }
            DeshabilitarCodene();
            LimpiarCodene();
            CargarGridCodene();
        }
        private void EliminarCodene()
        {
            if (this.dgvCOCodene.CurrentRow != null)
            {
                _eliminoC = true;
                DataGridViewRow row = this.dgvCOCodene.CurrentRow;
                int id = Convert.ToInt32(row.Cells[0].Value);
                CodeneImplement oCodeneImplement = new CodeneImplement();

                oCodeneImplement.Delete(id);
                DeshabilitarCodene();
                LimpiarCodene();

                CargarGridCodene();
            }
        }
        private void CargarSeleccionCodene()
        {
            if (!_eliminoC)
            {
                codene oCodene = new codene();
                CodeneImplement oCodeneImplement = new CodeneImplement();
                DataGridViewRow row = this.dgvCOCodene.CurrentRow;
                int id = Convert.ToInt32(row.Cells[0].Value);
                oCodene = oCodeneImplement.Get(id);

                this.lblCOCodigo.Text = oCodene.id_codene.ToString();
                this.dtpCoFechaAlta.Text = oCodene.fechaAlta.ToString();
                this.dtpCOFechaResolucion.Text = oCodene.FechaBaja.ToString();
                this.gbCodene.Enabled = false;
                DeshabilitarCodene();
            }
        }
 private void cargarGrillaCodene()
 {
     CodeneImplement oCodeneImplement = new CodeneImplement();
     this.dgvCOCodene.DataSource = oCodeneImplement.GetByIdSocio(_idSocio);
     this.dgvPJProceso.Enabled = false;
 }
 private void CargarGridCodene()
 {
     CodeneImplement oCodeneImplement = new CodeneImplement();
      this.dgvCOCodene.DataSource = oCodeneImplement.GetByIdSocio(_idSocio);
      this.dgvCOCodene.Enabled = true;
      _eliminoC = false;
 }