protected void grdLinkedRecords_OnRowCommand(object sender, GridViewCommandEventArgs e) { int rowIndex = Convert.ToInt32(e.CommandArgument); string sourceId = grdLinkedRecords.DataKeys[rowIndex].Values[0].ToString(); string targetId = grdLinkedRecords.DataKeys[rowIndex].Values[1].ToString(); switch (e.CommandName.ToUpper()) { case "SELECT": lblExtendedDetails.Visible = true; grdMatchDetails.DataSource = DialogService.DialogParameters.ContainsKey("mergeArguments") ? SessionMergeArguments.MatchingRecordView.GetExtendedContactDetails( sourceId, targetId) : IntegrationManager.GetExtendedContactDetails(sourceId, targetId); grdMatchDetails.DataBind(); break; case "UNLINK": if (DialogService.DialogParameters.ContainsKey("mergeArguments")) { SessionMergeArguments.MatchingRecordView.RemoveMatchedContact(sourceId, targetId); SessionMergeArguments.MatchingRecordView.MatchedContacts.RemoveAt(rowIndex); } else { IntegrationManager.MatchingInfoRemoveMatchedChildPair(sourceId, targetId); IntegrationManager.MatchedContacts.RemoveAt(rowIndex); } break; } }
protected void grdLinkedRecords_OnRowCommand(object sender, GridViewCommandEventArgs e) { int rowIndex = Convert.ToInt32(e.CommandArgument); string sourceId = grdLinkedRecords.DataKeys[rowIndex].Values[0].ToString(); string targetId = grdLinkedRecords.DataKeys[rowIndex].Values[1].ToString(); switch (e.CommandName.ToUpper()) { case "SELECT": grdMatchDetails.DataSource = IntegrationManager.GetExtendedContactDetails(sourceId, targetId); grdMatchDetails.DataBind(); break; case "UNLINK": IntegrationManager.MatchingInfoRemoveMatchedChildPair(sourceId, targetId); IntegrationManager.MatchedContacts.RemoveAt(rowIndex); break; } }