public PrintTemplates() { InitializeComponent(); pivotGrid.DataSource = NWindContext.Create().ProductReports.ToList(); SaveDefaultTemplates(); ResetItems(); }
protected override void CreateDataTable() { base.CreateDataTable(); var rows = NWindContext.Create().Products.ToList(); for (int i = 0; i < rows.Count; i++) { var dict = Table[i]; dict["Category1"] = rows[i].CategoryID; dict["Category2"] = rows[i].CategoryID; dict["Brush"] = new SolidColorBrush((Color)dict["Color"]); dict["Date1"] = DateTime.Today; dict["Date2"] = DateTime.Today; } }