//public void PopulateDestinationEstimateNo() //{ // BusyIndicator1.IsBusy = true; // _mrsClient.GetDestinationEstimateNoCompleted += new EventHandler<GetDestinationEstimateNoCompletedEventArgs>(_mrsClient_GetDestinationEstimateNoCompleted); // _mrsClient.GetDestinationEstimateNoAsync(_estimateRevisionId); //} //void _mrsClient_GetDestinationEstimateNoCompleted(object sender, GetDestinationEstimateNoCompletedEventArgs e) //{ // if (e.Error == null) // { // _DestinationEstimateNo = e.Result; // txtDestinationEstimateNo.Text = _DestinationEstimateNo; // } // else // ExceptionHandler.PopUpErrorMessage(e.Error, "mrsClient_GetContractTypeCompleted"); // BusyIndicator1.IsBusy = false; //} void _mrsClient_CopyEstimateCheckDifferenceCompleted(object sender, CopyEstimateCheckDifferenceCompletedEventArgs e) { List <ValidationErrorMessage> result = new List <ValidationErrorMessage>(); if (e != null) { if (e.Error == null) { if (e.Result != null) { if (e.Result.Count > 0) { foreach (var p in e.Result) { result.Add(p); } RadWindow win = new RadWindow(); ShowValidationMessage2 messageDlg = new ShowValidationMessage2(result, true, estimaterevisionid, _sourceEstimateNo, _destinationEstimateNo); //estimaterevisionid); win.Header = "The following items cannot be copied as it does not exist on the original estimate."; win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen; win.Content = messageDlg; win.Closed += new EventHandler <WindowClosedEventArgs>(ValidationWin_Closed); win.ShowDialog(); } else { // if no difference then copy all of them _mrsClient.CopyEstimateCompleted += new EventHandler <CopyEstimateCompletedEventArgs>(_mrsClient_CopyEstimateCompleted); _mrsClient.CopyEstimateAsync(_sourceEstimateNo.ToString(), _destinationEstimateNo.ToString()); } } else { // if no difference then copy all of them _mrsClient.CopyEstimateCompleted += new EventHandler <CopyEstimateCompletedEventArgs>(_mrsClient_CopyEstimateCompleted); _mrsClient.CopyEstimateAsync(_sourceEstimateNo.ToString(), _destinationEstimateNo.ToString()); } } else { ExceptionHandler.PopUpErrorMessage(e.Error, "CopyEstimateCompleted"); } } }
private void ContinueButton_Click(object sender, RoutedEventArgs e) { _mrsClient.CopyEstimateCompleted += new EventHandler <CopyEstimateCompletedEventArgs>(_mrsClient_CopyEstimateCompleted); _mrsClient.CopyEstimateAsync(_sourceEstimateNo.ToString(), _destinationEstimateNo.ToString()); }