Ejemplo n.º 1
0
        private void CargarGrid()
        {
            EstadoSocioImplement oEstadoSocioImplement = new EstadoSocioImplement();

            this.dgvEstadoSocio.DataSource = oEstadoSocioImplement.Buscar("");
            this.dgvEstadoSocio.Enabled = true;
        }
Ejemplo n.º 2
0
 private void CargarSeleccion()
 {
     cod_estados_socios oEstadoSocio = new cod_estados_socios();
     EstadoSocioImplement oEstadoSocioImplement = new EstadoSocioImplement();
     DataGridViewRow row = this.dgvEstadoSocio.CurrentRow;
     int id = Convert.ToInt32(row.Cells[0].Value);
     oEstadoSocio = oEstadoSocioImplement.Get(id);
     this.lblCodigo.Text = oEstadoSocio.id_estado_socio.ToString();
     this.txtNombre.Text = oEstadoSocio.estado_socio;
     this.cmbFacturar.SelectedValue = oEstadoSocio.facturar.Value? "1":"0";
     this.chkSeleccionable.Checked = oEstadoSocio.seleccionable.Value;
     this.chkFechaFin.Checked = oEstadoSocio.requiere_fin.Value;
     this.txtMeses.Text = oEstadoSocio.duracion_meses.ToString();
     this.gbEstadoConexion.Enabled = false;
     Deshabilitar();
 }
 private void CargarPnl1Estados()
 {
     EstadoSocioImplement oEstadoSocioImplement = new EstadoSocioImplement();
     oEstadoSocioImplement.CargarCombo(this.pnl1CmbEstado, "Seleccione Estado");
 }
Ejemplo n.º 4
0
        private void CargarEstadosConexion()
        {
            EstadoSocioImplement oEstadoSocioImplement = new EstadoSocioImplement();
            List<cod_estados_socios> _listEstadosConexion = oEstadoSocioImplement.GetAll();

            foreach (cod_estados_socios estadoConexion in _listEstadosConexion)
            {
                chkListEstadoConexion.Items.Add(estadoConexion.estado_socio);
            }
        }
Ejemplo n.º 5
0
        private void Guardar()
        {
            cod_estados_socios oEstadoSocio = new cod_estados_socios();
            EstadoSocioImplement oEstadoSocioImplement = new EstadoSocioImplement();

            if (this.lblCodigo.Text == "")
            {
                oEstadoSocio.estado_socio = this.txtNombre.Text;
                oEstadoSocio.facturar = this.cmbFacturar.SelectedValue.ToString() == "0" ? false : true;
                oEstadoSocio.seleccionable = this.chkSeleccionable.Checked;
                oEstadoSocio.requiere_fin = this.chkFechaFin.Checked;
                oEstadoSocio.duracion_meses = this.txtMeses.Text==""?0:int.Parse(this.txtMeses.Text);
                oEstadoSocioImplement.Save(oEstadoSocio);
            }
            else
            {

                DataGridViewRow row = this.dgvEstadoSocio.CurrentRow;
                int id = Convert.ToInt32(row.Cells[0].Value);
                oEstadoSocio = oEstadoSocioImplement.Get(id);
                oEstadoSocio.estado_socio = this.txtNombre.Text;
                oEstadoSocio.facturar = this.cmbFacturar.SelectedValue == "0" ? false : true;
                oEstadoSocio.seleccionable = this.chkSeleccionable.Checked;
                oEstadoSocio.requiere_fin = this.chkFechaFin.Checked;
                oEstadoSocio.duracion_meses = this.txtMeses.Text == "" ? 0 : int.Parse(this.txtMeses.Text);
                oEstadoSocioImplement.Update(oEstadoSocio);
            }
            Deshabilitar();
            Limpiar();
            CargarGrid();
        }
Ejemplo n.º 6
0
 private void ModificarEstadoSocio()
 {
     HabilitarBotones();
     this.gbEstadoConexion.Enabled = true;
     cod_estados_socios oEstadoSocio = new cod_estados_socios();
     EstadoSocioImplement oEstadoSocioImplement = new EstadoSocioImplement();
     DataGridViewRow row = this.dgvEstadoSocio.CurrentRow;
     int id = Convert.ToInt32(row.Cells[0].Value);
     oEstadoSocio = oEstadoSocioImplement.Get(id);
     this.lblCodigo.Text = oEstadoSocio.id_estado_socio.ToString();
     this.txtNombre.Text = oEstadoSocio.estado_socio;
     this.cmbFacturar.SelectedValue = oEstadoSocio.facturar;
     this.chkSeleccionable.Checked = oEstadoSocio.seleccionable.Value;
     this.dgvEstadoSocio.Enabled = false;
 }
Ejemplo n.º 7
0
 private void CargarEstadoConexion()
 {
     EstadoSocioImplement oEstadoSocioImplement = new EstadoSocioImplement();
     oEstadoSocioImplement.CargarCombo(this.cmbEstadoConexion, "Seleccione");
 }