Beispiel #1
0
        private void SaveContact()
        {
            ContactServiceClient contactService = null;

            try
            {
                AssociationForMatter association = GetControlData();
                contactService = new ContactServiceClient();
                ReturnValue returnValue = contactService.AddAssociationForMatter(_logonSettings.LogonId, association);
                if (returnValue.Success)
                {
                    Response.Redirect("~/Pages/Matter/EditMatter.aspx");
                }
                else
                {
                    throw new Exception(returnValue.Message);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (contactService.State != System.ServiceModel.CommunicationState.Faulted)
                {
                    contactService.Close();
                }
            }
        }
 private void SaveContact()
 {
     ContactServiceClient contactService = null;
     try
     {
         AssociationForMatter association = GetControlData();
         contactService = new ContactServiceClient();
         ReturnValue returnValue = contactService.AddAssociationForMatter(_logonSettings.LogonId, association);
         if (returnValue.Success)
         {
             Response.Redirect("~/Pages/Matter/EditMatter.aspx");
         }
         else
         {
             throw new Exception(returnValue.Message);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         if (contactService.State != System.ServiceModel.CommunicationState.Faulted)
             contactService.Close();
     }
 }