Example #1
0
        private void CargarSeleccion()
        {
            cod_estados_pj oEstadoPJ = new cod_estados_pj();
            EstadoPJImplement oEstadosPJImplement = new EstadoPJImplement();
            DataGridViewRow row = this.dgvstado.CurrentRow;
            int id = Convert.ToInt32(row.Cells[0].Value);
            oEstadoPJ = oEstadosPJImplement.Get(id);

            this.lblCodigo.Text = oEstadoPJ.id_cod_estado_pj.ToString();
            this.txtNombre.Text = oEstadoPJ.descripcion;
            this.gbEstado.Enabled = false;
            Deshabilitar();
        }
 private void CargarEstado()
 {
     EstadoPJImplement oEstadoPJImplement = new EstadoPJImplement();
     oEstadoPJImplement.CargarCombo(this.cmbPJEstado, "Seleccione Estado");
 }
Example #3
0
        private void Guardar()
        {
            cod_estados_pj oEstadoPJ = new cod_estados_pj();
            EstadoPJImplement oEstadosPJImplement = new EstadoPJImplement();
            if (this.lblCodigo.Text == "")
            {

                oEstadoPJ.descripcion = this.txtNombre.Text;
                oEstadosPJImplement.Save(oEstadoPJ);
            }
            else
            {
                DataGridViewRow row = this.dgvstado.CurrentRow;
                int id = Convert.ToInt32(row.Cells[0].Value);
                oEstadoPJ = oEstadosPJImplement.Get(id);
                oEstadoPJ.descripcion = this.txtNombre.Text;
                oEstadosPJImplement.Update(oEstadoPJ);
            }
            Deshabilitar();
            this.txtNombre.Text = "";
            CargarGrid();
        }
Example #4
0
 private void CargarGrid()
 {
     EstadoPJImplement oEstadosPJImplement = new EstadoPJImplement();
     this.dgvstado.DataSource = oEstadosPJImplement.Buscar("");
     this.dgvstado.Enabled = true;
 }