Ejemplo n.º 1
0
 public ReportWindow(User user)
 {
     InitializeComponent();
     ReportGrid.Children.Clear();
     viewModel              = new ReportViewModel();
     this.Title             = user.Name.Equals("Storage") ? "Отчет по складу" : $"Отчет по {user.Name}";
     StartDate.SelectedDate = DateTime.Parse("1.01." + DateTime.Now.Year);
     EndDate.SelectedDate   = DateTime.Parse("31.12." + DateTime.Now.Year);
     if (user.Name.Equals("Storage"))
     {
         List <List <string> > report = viewModel.GetStorageReport(StartDate.DisplayDate, EndDate.DisplayDate);
         CreateGrid(report);
     }
     else
     {
         var res = viewModel.GetUserReport(user, StartDate.DisplayDate, EndDate.DisplayDate);
     }
     //button1.Background = (Brush)this.Resources["buttonGradientBrush"];
     //TextBlock tb=new TextBlock(){Style = (Style)this.Resources["IngredientHeaderStyle"] };
 }
Ejemplo n.º 2
0
        private void CreateReport_Click(object sender, RoutedEventArgs e)
        {
            List <List <string> > report = viewModel.GetStorageReport(StartDate.DisplayDate, EndDate.DisplayDate);

            CreateGrid(report);
        }