public selectcatMedioComunicacion ( |
||
entMedioComunicacion | ||
return |
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;
}
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); } }