コード例 #1
0
 private void RellenaImports()
 {
     if ((User.Identity.IsAuthenticated) && (this.idindicator.HasValue))
     {
         int?UserId = CalculaUserId();
         if (UserId.HasValue)
         {
             try
             {
                 using (Clases.cKPI_IMPORTS objImport = new Clases.cKPI_IMPORTS())
                 {
                     objImport.indicatorid = this.idindicator.Value;
                     objImport.userid      = UserId.Value;
                     lstImports.DataSource = objImport.ObtenerDatos(10, 1);
                     lstImports.DataBind();
                 }
             }
             catch (Exception excp)
             {
                 ExceptionUtility.LogException(excp, "Error en la función << RellenaImports() >>");
             }
             finally
             {
                 if (lstImports.Items.Count > 0)
                 {
                     importsItem.Visible = true;
                     ArtImports.Visible  = true;
                 }
                 else
                 {
                     importsItem.Visible = false;
                     ArtImports.Visible  = false;
                 }
             }
         }
         else
         {
             Response.Redirect("~/errors/notfound.aspx");
         }
     }
     else
     {
         Response.Redirect("~/errors/notfound.aspx");
     }
 }