1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System.Windows;
- using InABox.Core;
- using InABox.Wpf;
- using HorizontalAlignment = System.Windows.HorizontalAlignment;
- namespace InABox.Reports
- {
- /// <summary>
- /// Interaction logic for ReportManager.xaml
- /// </summary>
- public partial class ReportManager : ThemableWindow
- {
- private readonly ReportGrid grid;
- public ReportManager()
- {
- InitializeComponent();
- grid = new ReportGrid
- {
- HorizontalAlignment = HorizontalAlignment.Stretch,
- VerticalAlignment = VerticalAlignment.Stretch,
- Margin = new Thickness(5)
- };
- AddChild(grid);
- }
- public string Section { get; set; }
- public Dictionary<Type, CoreTable> DataEnvironment { get; set; }
- public DataModel? DataModel { get; set; } = null;
- public bool Populate { get; set; } = false;
- private void Window_Loaded(object sender, RoutedEventArgs e)
- {
- Title = "Reports - " + DataModel.Name;
- grid.DataModel = DataModel;
- grid.Section = Section;
- grid.Populate = Populate;
- //grid.DataEnvironment = DataEnvironment;
- grid.Refresh(true, true);
- }
- }
- }
|