コード例 #1
0
 private void GetSolutions()
 {
     if (Service == null)
     {
         return;
     }
     if (working)
     {
         return;
     }
     working = true;
     WorkAsync(new WorkAsyncInfo("Loading solutions",
                                 (eventargs) =>
     {
         var svc = new CrmServiceProxy(Service);
         var log = new PluginLogger("ShuffleBuilder", true, "");
         try
         {
             solutionsUnmanaged = CintDynEntity.RetrieveMultiple(svc, "solution",
                                                                 new string[] { "isvisible", "ismanaged" },
                                                                 new object[] { true, false },
                                                                 new ColumnSet("solutionid", "uniquename", "friendlyname", "version"), log);
         }
         finally
         {
             log.CloseLog();
         }
     })
     {
         PostWorkCallBack =
             (completedargs) =>
         {
             if (completedargs.Error != null)
             {
                 MessageBox.Show(completedargs.Error.Message);
             }
             working = false;
         }
     });
 }