예제 #1
0
 public static void UpdateVariantDetails(VariantDetails details)
 {
     try
     {
         using (_certonaService = new CertonaServiceClient())
         {
             try
             {
                 UserDTO user    = FormsAuthenticationWrapper.User;
                 var     request = new UpdateVariantDetailsRequest()
                 {
                     User          = user,
                     VariantID     = details.VariantId,
                     Name          = details.Name,
                     Description   = details.Description ?? "",
                     Explanation   = details.ContainerTitle ?? "",
                     CatalogID     = details.CatalogId,                          // passed back as is
                     MethodID      = details.MethodId,
                     Status        = details.Status,
                     NumberOfItems = details.NumberOfAssets,       // passed back as is
                     Priority      = details.Priority              // passed back as is
                 };
                 var response = _certonaService.UpdateVariantDetails(request);
                 if (!response.Success)
                 {
                     throw new ApplicationException("UpdateVariantDetails returned failure status");
                 }
             }
             catch (TimeoutException exception)
             {
                 _certonaService.Abort();
                 throw;
             }
             catch (CommunicationException exception)
             {
                 _certonaService.Abort();
                 throw;
             }
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }