public MatchingDetails RetrieveMatchingDetails(GMPossibleDuplicate gMPossibleDuplicate)
        {
            MatchingDetails matchingDetails = new MatchingDetails();

            matchingDetails = goldmineImportServiceConnector.GetMatchingDetails(gMPossibleDuplicate.LASTNAME, gMPossibleDuplicate.ZIP, gMPossibleDuplicate.PHONE1, gMPossibleDuplicate.PHONE2, gMPossibleDuplicate.UEMAILADDR);
            return(matchingDetails);
        }
コード例 #2
0
        public string ImportContact(GMPossibleDuplicate selectedProssibleDuplicate, User user)
        {
            string returnRecId = string.Empty;

            returnRecId = goldmineImportServiceConnector.ImportContact(selectedProssibleDuplicate, user);
            return(returnRecId);
        }
コード例 #3
0
 private void SetBasicDetails(GMPossibleDuplicate gMPossibleDuplicate)
 {
     if (gMPossibleDuplicate != null)
     {
         txtId.Text               = gMPossibleDuplicate.Id.ToString();
         txtDEAR.Text             = gMPossibleDuplicate.DEAR;
         txtSECR.Text             = gMPossibleDuplicate.SECR;
         txtLASTNAME.Text         = gMPossibleDuplicate.LASTNAME;
         txtPHONE1.Text           = gMPossibleDuplicate.PHONE1;
         txtPHONE2.Text           = gMPossibleDuplicate.PHONE2;
         txtUEMAILADDR.Text       = gMPossibleDuplicate.UEMAILADDR;
         txtADDRESS1.Text         = gMPossibleDuplicate.ADDRESS1;
         txtADDRESS2.Text         = gMPossibleDuplicate.ADDRESS2;
         txtZIP.Text              = gMPossibleDuplicate.ZIP;
         txtSTATE.Text            = gMPossibleDuplicate.STATE;
         txtCOUNTRY.Text          = gMPossibleDuplicate.COUNTRY;
         txtCITY.Text             = gMPossibleDuplicate.CITY;
         txtCreatedDate.Text      = gMPossibleDuplicate.Created.ToString();
         txtCallTime.Text         = gMPossibleDuplicate.CallTime;
         txtSector.Text           = gMPossibleDuplicate.Sector;
         txtEmploymentStatus.Text = gMPossibleDuplicate.TITLE;
         txtSource.Text           = gMPossibleDuplicate.NewSource;
         txtMedium.Text           = gMPossibleDuplicate.Medium;
         txtCampaign.Text         = gMPossibleDuplicate.Campaign;
         txtCreative.Text         = gMPossibleDuplicate.UNCREATIVE;
         txtLocation.Text         = gMPossibleDuplicate.KEY2;
         txtJobTitle.Text         = gMPossibleDuplicate.JobTitle;
     }
 }
コード例 #4
0
 private void SetMatchedDetails(GMPossibleDuplicate gMPossibleDuplicate)
 {
     SetMatchedPhone1(gMPossibleDuplicate.MatchedPHONE1);
     SetMatchedPhone2(gMPossibleDuplicate.MatchedPHONE2);
     SetMatchedEmail(gMPossibleDuplicate.MatchedEMAIL);
     SetMatchedPostCode(gMPossibleDuplicate.MatchedPostCode);
 }
コード例 #5
0
        public string CreateHistoryRecordForRiftId(GMPossibleDuplicate selectedPossibleDuplicate, string riftId, User user)
        {
            string historyRecordRecId = string.Empty;

            historyRecordRecId = goldmineImportServiceConnector.CreateHistoryRecordForRiftId(selectedPossibleDuplicate, riftId, user);
            return(historyRecordRecId);
        }
コード例 #6
0
        public bool DeletePossibleDuplicate(GMPossibleDuplicate selectedPossibleDuplicate, User user)
        {
            bool deletionSuccess = false;

            deletionSuccess = goldmineImportServiceConnector.DeletePossibleDuplicate(selectedPossibleDuplicate, user);
            return(deletionSuccess);
        }
コード例 #7
0
 void PDList_OnSelectedPossibleDuplicateChanged(object sender, EventArgs e)
 {
     selectedPossibleDuplicate = possibleDuplicateListControl.selectedPossibleDuplicate;
     // tell other controls the new selected possibleDuplicate
     possibleDuplicateOnControl.PossibleDuplicate      = possibleDuplicateListControl.selectedPossibleDuplicate;
     possibleDuplicateDetailsControl.PossibleDuplicate = possibleDuplicateListControl.selectedPossibleDuplicate;
     gdprControl.PossibleDuplicate = possibleDuplicateListControl.selectedPossibleDuplicate;
 }
        public string ImportContact(GMPossibleDuplicate possibleDuplicate, User user)
        {
            string                  returnedRecId           = string.Empty;
            string                  jsonResult              = string.Empty;
            ImportContactSO         importContactSO         = new ImportContactSO();
            GoldmineImportServiceDO goldmineImportServiceDO = new GoldmineImportServiceDO();
            string                  importContactSOAsJson   = string.Empty;

            // set importContactSO properties
            importContactSO = PropertyAddition.SetImportContactSOProperties(importContactSO, possibleDuplicate, user);

            // create URL and WebRequestObject
            string     URL            = string.Format("{0}ImportContact", goldmineImportServiceAddress);
            WebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(URL);

            httpWebRequest = ConnectorHelper.SetUpWebRequestObject(httpWebRequest);

            importContactSOAsJson = SerializationHelper.SerializeImportContactSO(importContactSO);

            using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
            {
                // send request to service
                try
                {
                    streamWriter.Write(importContactSOAsJson);
                    streamWriter.Flush();
                    streamWriter.Close();
                }
                catch (Exception ex)
                {
                    ClientLogger.WriteError(ex, "Error importing contact.\nMethod: GoldmineImportServiceConnector.ImportContact", ClientGlobalData.CurrentUser.SystemName);
                    throw ex;
                }

                // get response object
                HttpWebResponse httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
                using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
                {
                    jsonResult = streamReader.ReadToEnd();
                    jsonResult = ConnectorHelper.ChangeArrayParentheses(jsonResult);
                }

                // deserialize
                try
                {
                    goldmineImportServiceDO = JsonConvert.DeserializeObject <GoldmineImportServiceDO>(jsonResult);
                    returnedRecId           = goldmineImportServiceDO.ImportContactResult;
                }
                catch (Exception ex)
                {
                    ClientLogger.WriteError(ex, "Error deserializing result from importing contact.\nMethod: GoldmineImportServiceConnector.ImportContact", ClientGlobalData.CurrentUser.SystemName);
                    HandleDeserializationException(ex);
                }
            }

            return(returnedRecId);
        }
        private void dgvPossibleDuplicates_SelectionChanged(object sender, EventArgs e)
        {
            GMPossibleDuplicate selectedPossibleDuplicate = dgvPossibleDuplicates.CurrentRow.DataBoundItem as GMPossibleDuplicate;

            if (selectedPossibleDuplicate != null)
            {
                panelControl.selectedPossibleDuplicate = selectedPossibleDuplicate;
                SelectedPossibleDuplicateObjectChanged();
            }
        }
コード例 #10
0
 private void SetREPDetailsGroupBoxVisibility(GMPossibleDuplicate gMPossibleDuplicate)
 {
     if (gMPossibleDuplicate.EmailTypeEnum == EmailEnums.EmailType.Rep)
     {
         gbRepExtraDetails.Visible = true;
     }
     else
     {
         gbRepExtraDetails.Visible = false;
     }
 }
コード例 #11
0
 private void DisplayDuplicateDetails(GMPossibleDuplicate gMPossibleDuplicate)
 {
     SetREPDetailsGroupBoxVisibility(gMPossibleDuplicate);
     SetBasicDetails(gMPossibleDuplicate);
     if (gMPossibleDuplicate.CREATEBY != "" && gMPossibleDuplicate.CREATEBY != UIControl.UI_Config_Reader.ConfigReader.ReadServiceImportUserUSERNAME())
     {
         SetRepDetails(gMPossibleDuplicate);
     }
     SetCommentsArea(gMPossibleDuplicate);
     SetMatchedDetails(gMPossibleDuplicate);
 }
        public bool DeletePossibleDuplicate(GMPossibleDuplicate selectedPossibleDuplicate, User user)
        {
            bool   deletionSuccess = false;
            string jsonResult      = string.Empty;
            string deletePossibleDuplicateSOAsJson = string.Empty;
            DeletePossibleDuplicateSO deletePossibleDuplicateSO = new DeletePossibleDuplicateSO();
            GoldmineImportServiceDO   goldmineImportServiceDO   = new GoldmineImportServiceDO();

            deletePossibleDuplicateSO = PropertyAddition.SetDeletePossibleDuplicateSOProperties(deletePossibleDuplicateSO, selectedPossibleDuplicate, user);

            string     URL            = string.Format("{0}DeletePossibleDuplicate", goldmineImportServiceAddress);
            WebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(URL);

            httpWebRequest = ConnectorHelper.SetUpWebRequestObject(httpWebRequest);

            deletePossibleDuplicateSOAsJson = SerializationHelper.SerializeDeletePossibleDuplicateSO(deletePossibleDuplicateSO);

            using (StreamWriter streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
            {
                try
                {
                    streamWriter.Write(deletePossibleDuplicateSOAsJson);
                    streamWriter.Flush();
                    streamWriter.Close();
                }
                catch (Exception ex)
                {
                    ClientLogger.WriteError(ex, "Error deleteing Possible Duplicate.\nMethod: GoldmineImportServiceConnector.CreateHistoryRecordForRiftId", ClientGlobalData.CurrentUser.SystemName);
                    throw ex;
                }
            }

            // get response
            HttpWebResponse httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

            using (StreamReader streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
                jsonResult = streamReader.ReadToEnd();
                jsonResult = ConnectorHelper.ChangeArrayParentheses(jsonResult);
            }

            // deserialize
            try
            {
                goldmineImportServiceDO = JsonConvert.DeserializeObject <GoldmineImportServiceDO>(jsonResult);
                deletionSuccess         = goldmineImportServiceDO.DeletePossibleDuplicateResult;
            }
            catch (Exception ex)
            {
                ClientLogger.WriteError(ex, "Error deserializing result for deleteing Possible Duplicate.\nMethod: GoldmineImportServiceConnector.CreateHistoryRecordForRiftId", ClientGlobalData.CurrentUser.SystemName);
                HandleDeserializationException(ex);
            }
            return(deletionSuccess);
        }
コード例 #13
0
 private void SetRepDetails(GMPossibleDuplicate gMPossibleDuplicate)
 {
     SetFullyQualified(gMPossibleDuplicate.FullyQualified);
     SetTransport(gMPossibleDuplicate.TransportCar, gMPossibleDuplicate.TransportPublicTransport);
     txtNoOfYears.Text = gMPossibleDuplicate.NoOfYears.ToString();
     SetVIP(gMPossibleDuplicate.VIP);
     SetRapidRefund(gMPossibleDuplicate.RapidRefund);
     txtUCURSITE.Text     = gMPossibleDuplicate.UCURSITE;
     txtUCUREmployer.Text = gMPossibleDuplicate.UCUREMPLOY;
     txtRepName.Text      = gMPossibleDuplicate.CREATEBY;
     txtReceivedDate.Text = gMPossibleDuplicate.Created.ToString();
 }
コード例 #14
0
 public static ImportContactSO SetImportContactSOProperties(ImportContactSO importContactSO, GMPossibleDuplicate possibleDuplicate, User user)
 {
     importContactSO.possibleDuplicate = possibleDuplicate;
     importContactSO.user = user;
     return(importContactSO);
 }
コード例 #15
0
 public static CreateHistoryRecordForRiftIdSO SetCreateHistoryRecordForRiftIdSO(CreateHistoryRecordForRiftIdSO createHistoryRecordForRiftIdSO, GMPossibleDuplicate selectedPossibleDuplicate, string riftId, User user)
 {
     createHistoryRecordForRiftIdSO.possibleDuplicate = selectedPossibleDuplicate;
     createHistoryRecordForRiftIdSO.riftId            = riftId;
     createHistoryRecordForRiftIdSO.user = user;
     return(createHistoryRecordForRiftIdSO);
 }
コード例 #16
0
 private void SetCommentsArea(GMPossibleDuplicate gMPossibleDuplicate)
 {
     txtComments.Text = gMPossibleDuplicate.COMMENTS;
 }
コード例 #17
0
 public static DeletePossibleDuplicateSO SetDeletePossibleDuplicateSOProperties(DeletePossibleDuplicateSO deletePossibleDuplicateSO, GMPossibleDuplicate selectedPossibleDuplicate, User user)
 {
     deletePossibleDuplicateSO.possibleDuplicate = selectedPossibleDuplicate;
     deletePossibleDuplicateSO.user = user;
     return(deletePossibleDuplicateSO);
 }