SelectRecomendacion_ByID() public méthode

Consulta una Recomendacion para un Expediente
BPRecomendacion.SelectRecomendacion_ByID 31-Agosto-2014 Ruben.Cobos
public SelectRecomendacion_ByID ( ENTRecomendacion oENTRecomendacion ) : ENTResponse
oENTRecomendacion SIAQ.Entity.Object.ENTRecomendacion Entidad de Tipo de Recomendación con los parámetros necesarios para la transacción
Résultat SIAQ.Entity.Object.ENTResponse
        void SelectRecomendacion_Detalle(ref GridView grdDetalle, Int32 RecomendacionId)
        {
            BPRecomendacion oBPRecomendacion = new BPRecomendacion();
            ENTRecomendacion oENTRecomendacion = new ENTRecomendacion();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formulario
                oENTRecomendacion.RecomendacionId = RecomendacionId;

                // Transacción
                oENTResponse = oBPRecomendacion.SelectRecomendacion_ByID(oENTRecomendacion);

                // Errores
                if (oENTResponse.GeneratesException) { throw new Exception(oENTResponse.sErrorMessage); }
                if (oENTResponse.sMessage != "") { throw new Exception(oENTResponse.sMessage); }

                // Llenado de control
                grdDetalle.DataSource = oENTResponse.dsResponse.Tables[2];
                grdDetalle.DataBind();

            }catch (Exception ex){
                throw (ex);
            }
        }
        void SelectAcuerdo_ForEdit(String RecomendacionId)
        {
            ENTRecomendacion oENTRecomendacion = new ENTRecomendacion();
            ENTResponse oENTResponse = new ENTResponse();
            BPRecomendacion oBPRecomendacion = new BPRecomendacion();

            RadioButton oRadioButton;

            try
            {
                // Formulario
                oENTRecomendacion.RecomendacionId = Int32.Parse(RecomendacionId);

                // Transacción
                oENTResponse = oBPRecomendacion.SelectRecomendacion_ByID(oENTRecomendacion);

                // Validaciones
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }

                // Mensaje de la BD
                if (oENTResponse.sMessage != "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + gcJavascript.ClearText(oENTResponse.sMessage) + "');", true); }

                // Llenado de formulario
                foreach (GridViewRow gvRow in this.gvAutoridad.Rows){

                    oRadioButton = (RadioButton)this.gvAutoridad.Rows[gvRow.RowIndex].FindControl("RowSelector");
                    if (oENTResponse.dsResponse.Tables[1].Rows[0]["AutoridadId"].ToString() == this.gvAutoridad.DataKeys[gvRow.RowIndex]["AutoridadId"].ToString()) { oRadioButton.Checked = true; }
                }

                this.gvAutoridadDetalle.DataSource = oENTResponse.dsResponse.Tables[2];
                this.gvAutoridadDetalle.DataBind();

                // Id a trabajar
                this.hddRecomendacionId.Value = RecomendacionId.ToString();

                // Estado del formulario
                this.btnAction.Text = "Modificar acuerdo";
                this.lblActionTitle.Text = "Modificar acuerdo";
                this.pnlAction.Visible = true;

                // Foco
                this.ckeApartado.Focus();

            }catch (Exception ex){
                throw (ex);
            }
        }