public void ReadProfiles()
 {
     try
     {
         _tableProfiles = new TableProfiles();
         if (SPDataSource == SPDataSourcer.API)
         {
             _tableProfiles.ReadSPProfiles(SPContext.Current.Site.ID);
         }
         else
         {
             _tableProfiles.ReadSqlSPProfiles(SPConnectionString, SPSiteProfiles);
         }
     }
     catch (Exception ex)
     {
         if (_labelError == null)
         {
             _labelError = new Label();
         }
         _labelError.ForeColor = System.Drawing.Color.Red;
         _labelError.Text      = "Помилка при отриманні профілів користувача!<br/><br/>\n\n" + ex.Message;
         _labelError.Visible   = true;
     }
 }
Beispiel #2
0
 public void ReadProfiles()
 {
     try
     {
         if (_webPart != null && _webPart.SPDataSource == UserShortVerticalList.SPDataSourcer.SQL)
         {
             _users.ReadSqlSPProfiles(_webPart.SPConnectionString, _webPart.SPSiteProfiles);
         }
         else
         {
             _users.ReadSPProfiles(SPContext.Current.Site.ID);
         }
     }
     catch (Exception ex)
     {
         labelError.Text    = "Помилка при отриманні профілів користувача!<br/><br/>\n\n" + ex.Message;
         labelError.Visible = true;
     }
 }