/// <summary> /// Callback method that assigns value to the BAsicDataInfo property /// </summary> /// <param name="result">basic data </param> private void RetrieveFairValueDataWithNewUpsideCallbackMethod(FairValueCompositionSummaryData result) { string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name); Logging.LogBeginMethod(logger, methodNamespace); try { Logging.LogMethodParameter(logger, methodNamespace, result, 1); if (result != null) { var item = FairValueCompositionData.FirstOrDefault(i => i.Source == result.Source); if (item != null) { item.Upside = result.Upside; item.IsUpdated = true; } } } catch (Exception ex) { Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK); Logging.LogException(logger, ex); } finally { BusyIndicatorStatus = false; } Logging.LogEndMethod(logger, methodNamespace); }
/// <summary> /// Method to update row with update values /// </summary> /// <param name="editedMeasurePropertyFairValueRow">Update Value</param> private void UpdateRowAssociatedWithSource(FairValueData editedMeasurePropertyFairValueRow) { string methodNamespace = String.Format("{0}.{1}", GetType().FullName, System.Reflection.MethodInfo.GetCurrentMethod().Name); Logging.LogBeginMethod(logger, methodNamespace); try { if (editedMeasurePropertyFairValueRow != null) { var item = FairValueCompositionData.FirstOrDefault(i => i.Source == editedMeasurePropertyFairValueRow.Source); if (item != null) { item.Buy = 0; item.Sell = 0; item.Upside = null; item.Date = DateTime.Now; item.IsUpdated = true; } } } catch (Exception ex) { Prompt.ShowDialog("Message: " + ex.Message + "\nStackTrace: " + Logging.StackTraceToString(ex), "Exception", MessageBoxButton.OK); Logging.LogException(logger, ex); } }