Пример #1
0
        private int CargarUEN()
        {
            int valorUEN = 0;

            try
            {
                Sesion sesion = new Sesion();
                sesion = (Sesion)Session["Sesion" + Session.SessionID];
                List <CrmCatSolucion> list      = new List <CrmCatSolucion>();
                CN_CrmCatSoluciones   clscrmCat = new CN_CrmCatSoluciones();
                clscrmCat.ComboUen(sesion, ref list);
                ddlUENs.Items.Clear();
                if (list.Count > 0)
                {
                    ddlUENs.DataSource     = list;
                    ddlUENs.DataValueField = "Id";
                    ddlUENs.DataTextField  = "Descripcion";
                    ddlUENs.DataBind();

                    valorUEN = list[0].Id;
                    ddlUENs.SelectedValue = valorUEN.ToString();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(valorUEN);
        }