private void CargarSeleccion()
        {
            sys_configuracion oSysConfig = new sys_configuracion();
            SysConfigImplement oSysConfigImplement = new SysConfigImplement();
            DataGridViewRow row = this.dgvConfig.CurrentRow;
            int id = Convert.ToInt32(row.Cells[0].Value);
            oSysConfig = oSysConfigImplement.Get(id);

            this.lblCodigo.Text = oSysConfig.id_configuracion.ToString();
            this.txtNombre.Text = oSysConfig.nombre;
            this.txtValor.Text = oSysConfig.valor;
            this.txtObsevacion.Text = oSysConfig.observacion;
            this.gbConfig.Enabled = false;
            Deshabilitar();
        }
 private void Guardar()
 {
     sys_configuracion oSysConfig = new sys_configuracion();
     SysConfigImplement oSysConfigImplement = new SysConfigImplement();
     if (this.lblCodigo.Text == "")
     {
         oSysConfig.nombre = this.txtNombre.Text;
         oSysConfig.valor = this.txtValor.Text;
         oSysConfig.observacion = this.txtObsevacion.Text;
         oSysConfigImplement.Save(oSysConfig);
     }
     else
     {
         DataGridViewRow row = this.dgvConfig.CurrentRow;
         int id = Convert.ToInt32(row.Cells[0].Value);
         oSysConfig = oSysConfigImplement.Get(id);
         oSysConfig.nombre = this.txtNombre.Text;
         oSysConfig.valor = this.txtValor.Text;
         oSysConfig.observacion = this.txtObsevacion.Text;
         oSysConfigImplement.Update(oSysConfig);
     }
     Deshabilitar();
     this.txtNombre.Text = "";
     this.txtValor.Text = "";
     this.txtObsevacion.Text = "";
     CargarGrid();
 }