QueryTaAmountLog.xaml.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Muchinfo.MTPClient.Infrastructure.Cache;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. namespace Muchinfo.MTPClient.Account.Views
  16. {
  17. /// <summary>
  18. /// QueryTaAmountLog.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class QueryTaAmountLog : UserControl
  21. {
  22. public QueryTaAmountLog()
  23. {
  24. InitializeComponent();
  25. var AcountList = CacheManager.CacheTAAcountList.Select(x => x.FundsAccounts.AccountId.ToString()).ToList();
  26. if (!(AcountList.Count > 1))
  27. {
  28. this.LogDataGrid.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
  29. }
  30. rbCurChecked.IsChecked = true;
  31. rbHisChecked.Checked += rbHisChecked_Checked;
  32. rbHisChecked.Unchecked += rbHisChecked_Unchecked;
  33. }
  34. private void Title_OnKeyUp(object sender, KeyEventArgs e)
  35. {
  36. //使用KeyUp,阻止键盘精灵弹出
  37. e.Handled = true;
  38. }
  39. private void rbHisChecked_Checked(object sender, RoutedEventArgs e)
  40. {
  41. xamlDate.Visibility = Visibility.Visible;
  42. xamlDateTime.Visibility = Visibility.Visible;
  43. xamlDateEnd.Visibility = Visibility.Visible;
  44. xamlDateTo.Visibility = Visibility.Visible;
  45. }
  46. private void rbHisChecked_Unchecked(object sender, RoutedEventArgs e)
  47. {
  48. xamlDate.Visibility = Visibility.Hidden;
  49. xamlDateTime.Visibility = Visibility.Hidden;
  50. xamlDateEnd.Visibility = Visibility.Hidden;
  51. xamlDateTo.Visibility = Visibility.Hidden;
  52. }
  53. }
  54. }