//Add new Staff Button private void AddBtn_Click(object sender, RoutedEventArgs e) { StaffOverview tempStaff = new StaffOverview(); tempStaff.staffID = IDTb.Text; tempStaff.staffName = NameTb.Text; tempStaff.staffAddress = AddrTb.Text; tempStaff.staffCity = CityTb.Text; tempStaff.staffState = StateTb.Text; DataGridXAML.Items.Add(tempStaff); }
public StaffDataGrid() { InitializeComponent(); StaffOverview johnDoe = new StaffOverview(); johnDoe.staffID = "001"; johnDoe.staffName = "JOHN DOE"; johnDoe.staffAddress = "122 GRA"; johnDoe.staffCity = "Ikeja"; johnDoe.staffState = "Lagos"; DataGridXAML.Items.Add(johnDoe); StaffOverview kristinJoe = new StaffOverview(); kristinJoe.staffID = "002"; kristinJoe.staffName = "KRISTIN JOE"; kristinJoe.staffAddress = "133 GRA"; kristinJoe.staffCity = "Lekki"; kristinJoe.staffState = "Lagos"; DataGridXAML.Items.Add(kristinJoe); }