SIAQ.BusinessProcess.Object.BPMedioComunicacion.selectcatMedioComunicacion C# (CSharp) Method

selectcatMedioComunicacion() public method

Metodo para obtener las catMedioComunicacion del sistema
BPcatMedioComunicacion.selectcatMedioComunicacion 27/ene/2014 Generador
public selectcatMedioComunicacion ( ENTMedioComunicacion entMedioComunicacion ) : ENTResponse
entMedioComunicacion SIAQ.Entity.Object.ENTMedioComunicacion
return SIAQ.Entity.Object.ENTResponse
        public ENTResponse selectcatMedioComunicacion(ENTMedioComunicacion entMedioComunicacion)
        {
            ENTResponse oENTResponse = new ENTResponse();
            try
            {
                // Consulta a base de datos
                DAMedioComunicacion datacatMedioComunicacion = new DAMedioComunicacion();
                oENTResponse = datacatMedioComunicacion.selectcatMedioComunicacion(entMedioComunicacion);
                // 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

Ejemplo n.º 1
0
        private void selectMedioComunicacion_ForEdit(Int32 MedioComunicacionId)
        {
            BPMedioComunicacion oBPMedioComunicacion = new BPMedioComunicacion();
            ENTMedioComunicacion oENTMedioComunicacion = new ENTMedioComunicacion();
            ENTResponse oENTResponse = new ENTResponse();

            try
            {

                // Formulario
                oENTMedioComunicacion.MedioComunicacionId = MedioComunicacionId;
                oENTMedioComunicacion.Nombre = this.txtActionNombre.Text.Trim();

                // Transacción
                oENTResponse = oBPMedioComunicacion.selectcatMedioComunicacion(oENTMedioComunicacion);

                // Validaciones
                if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
                this.lblActionMessage.Text = oENTResponse.sMessage;

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

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