void SelectLugarAtencion()
{
ENTDictamen oENTDictamen = new ENTDictamen();
ENTResponse oENTResponse = new ENTResponse();
BPDictamen oBPDictamen = new BPDictamen();
try
{
// Formulario
oENTDictamen.LugarAtencionId = 0;
oENTDictamen.Nombre = "";
// Transacción
oENTResponse = oBPDictamen.SelectLugarAtencion(oENTDictamen);
// 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 combo
this.ddlLugarAtencion.DataTextField = "Nombre";
this.ddlLugarAtencion.DataValueField = "LugarAtencionId";
this.ddlLugarAtencion.DataSource = oENTResponse.dsResponse.Tables[1];
this.ddlLugarAtencion.DataBind();
// Agregar Item de selección
this.ddlLugarAtencion.Items.Insert(0, new ListItem("[Seleccione]", "0"));
}catch (Exception ex){
throw (ex);
}
}