private void UpdateLabels(GeneralFollowUp gfu) { lblCostsSum.Content = gfu.Costs; lblRevenuesSum.Content = gfu.Revenues; lblResultSum.Content = gfu.Result; lblObject.Content = gfu.ObjectName; }
/// <summary> /// Updates the labels when selection has changed /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dgItems_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (dgItems.SelectedItem != null) { GeneralFollowUp gfu = RevenueFollowUpManagement.Instance.GetResults(cpo, GFU); UpdateLabels(gfu); } }
private void dgItems_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (dgItems.SelectedItem != null) { GeneralFollowUp gfu = BudgetedResultManagement.Instance.GetResults(cpo, GFU.ObjectID); UpdateLabels(gfu); } }
/// <summary> /// Update labels with data from a selected GeneralFollowUp in the list /// of GeneralFollowUps /// </summary> /// <param name="gfu"></param> private void UpdateLabels(GeneralFollowUp gfu) { lblCosts.Content = gfu.Costs; lblProduct.Content = gfu.ObjectName; lblRevenues.Content = gfu.Revenues; lblResult.Content = gfu.Result; switch (gfu.Date.Month) { case 1: lblMonth.Content = "Januari"; break; case 2: lblMonth.Content = "Februari"; break; case 3: lblMonth.Content = "Mars"; break; case 4: lblMonth.Content = "April"; break; case 5: lblMonth.Content = "Maj"; break; case 6: lblMonth.Content = "Juni"; break; case 7: lblMonth.Content = "Juli"; break; case 8: lblMonth.Content = "Augusti"; break; case 9: lblMonth.Content = "September"; break; case 10: lblMonth.Content = "Oktober"; break; case 11: lblMonth.Content = "November"; break; case 12: lblMonth.Content = "December"; break; } }