SIAQ.BusinessProcess.Object.BPPais.SelectPais C# (CSharp) Method

SelectPais() public method

Consulta el catálogo de Paises
BPPais.SelectPais 17-Marzo-2014 Ruben.Cobos
public SelectPais ( ENTPais oENTPais ) : ENTResponse
oENTPais SIAQ.Entity.Object.ENTPais Entidad de Pais con los filtros necesarios para la consulta
return SIAQ.Entity.Object.ENTResponse
        public ENTResponse SelectPais(ENTPais oENTPais)
        {
            DAPais oDAPais = new DAPais();
               ENTResponse oENTResponse = new ENTResponse();

               try
               {

              // Transacción en base de datos
              oENTResponse = oDAPais.SelectPais(oENTPais, this.sConnectionApplication, 0);

              // Validación de error en consulta
              if (oENTResponse.GeneratesException) { return oENTResponse; }

              // Validación de mensajes de la BD
              oENTResponse.sMessage = oENTResponse.dsResponse.Tables[0].Rows[0]["sResponse"].ToString();
              if (oENTResponse.sMessage != "") { return oENTResponse; }

               }catch (Exception ex){
              oENTResponse.ExceptionRaised(ex.Message);
               }

               // Resultado
               return oENTResponse;
        }

Usage Example

Example #1
0
        private void selectPais_ForEdit(Int32 PaisId)
        {
            BPPais oBPPais = new BPPais();
            ENTPais oENTPais = new ENTPais();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formulario
                oENTPais.PaisId = PaisId;
                oENTPais.Nombre = this.txtActionNombre.Text.Trim();
                oENTPais.Activo = Int16.Parse(this.ddlActionStatus.SelectedItem.Value);

                // Transacción
                oENTResponse = oBPPais.SelectPais(oENTPais);

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

                // Mensaje de la BD
                this.lblActionMessage.Text = oENTResponse.sMessage;

                // Llenado de formulario
                this.txtActionNombre.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Nombre"].ToString();
                this.txtActionDescripcion.Text = oENTResponse.dsResponse.Tables[1].Rows[0]["Descripcion"].ToString();
                this.ddlActionStatus.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["tiActivo"].ToString();

            }
            catch (Exception ex) { throw (ex); }
        }
All Usage Examples Of SIAQ.BusinessProcess.Object.BPPais::SelectPais