using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Infragistics.Controls.Grids;
namespace SilverXamGrid
{
public partial class MainPage : UserControl
{
public class Person
{
public string DepartmentCode { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public decimal JeAmount { get; set; }
public DateTime PeriodEndDate { get; set; }
public bool Approved { get; set; }
public bool Rejected { get; set; }
}
private ObservableCollection people = new ObservableCollection();
public MainPage()
{
InitializeComponent();
}
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
Person peps = new Person();
peps.DepartmentCode = "0100";
peps.FirstName = "Fred";
peps.LastName = "Flintstone";
peps.JeAmount = 10000.45m;
peps.Approved = true;
peps.Rejected = false;
peps.PeriodEndDate = Convert.ToDateTime("10/10/2010");
people.Add(peps);
peps = new Person();
peps.DepartmentCode = "0100";
peps.FirstName = "Barney";
peps.LastName = "Rubble";
peps.JeAmount = 42668.22m;
peps.PeriodEndDate = Convert.ToDateTime("10/12/2010");
peps.Approved = false;
peps.Rejected = true;
people.Add(peps);
peps = new Person();
peps.DepartmentCode = "0200";
peps.FirstName = "George";
peps.LastName = "Jetson";
peps.JeAmount = 154239.67m;
peps.PeriodEndDate = Convert.ToDateTime("9/12/2010");
peps.Approved = true;
peps.Rejected = false;
people.Add(peps);
peps = new Person();
peps.DepartmentCode = "0200";
peps.FirstName = "Jane";
peps.LastName = "Jetson";
peps.JeAmount = 103476.07m;
peps.PeriodEndDate = Convert.ToDateTime("9/12/2010");
peps.Approved = false;
peps.Rejected = true;
people.Add(peps);
peps = new Person();
peps.DepartmentCode = "0300";
peps.FirstName = "Elmer";
peps.LastName = "Fudd";
peps.JeAmount = 39.16m;
peps.PeriodEndDate = Convert.ToDateTime("11/25/2010");
peps.Approved = false;
peps.Rejected = true;
people.Add(peps);
peps = new Person();
peps.DepartmentCode = "0300";
peps.FirstName = "Snydly";
peps.LastName = "Whiplash";
peps.JeAmount = 25435.96m;
peps.PeriodEndDate = Convert.ToDateTime("11/25/2010");
peps.Approved = true;
peps.Rejected = false;
people.Add(peps);
peps = new Person();
peps.DepartmentCode = "0300";
peps.FirstName = "Wilma";
peps.LastName = "Flintstone";
peps.JeAmount = 25435.96m;
peps.PeriodEndDate = Convert.ToDateTime("12/10/2010");
peps.Approved = true;
peps.Rejected = false;
people.Add(peps);
this.dataGrid.ItemsSource = people;
}
}
}