private List <Person> UpdateGrid() { ProcessPersonBl lPersonBL = new ProcessPersonBl(); List <Person> lPersonList = new List <Person>(); lPersonList = lPersonBL.GetAllPeople(); return(lPersonList); }
private void btnSave_Click(object sender, RoutedEventArgs e) { Person lPerson = new Person() { FullName = TxtFullName.Text, ProductName = TxtProductName.Text, Notes = TxtNotes.Text, Purpose = TxtPurpose.Text, ProductCategory = cbProductCategory.SelectedValue.ToString(), ProductPrice = TxtProductPrice.Text }; ProcessPersonBl lProcessPersonBl = new ProcessPersonBl(); lProcessPersonBl.ProcessInsertPerson(lPerson); ClearData(); // cbProductCategory.SelectedValue = "Please Select..."; DisplayGrid.DataContext = UpdateGrid(); }
public void InsertPersonBl() { //Person lPerson = new Person() //{ // PersonID = 0, // FullName = "James", // ProductName = "Bond", // Address = "10 Avenue A", // Purpose = "New York", // ProductCategory = "NY", // ProductPrice = "12345" //}; Person lPerson = CreatePerson(); ProcessPersonBl lPersonData = new ProcessPersonBl(); lPersonData.ProcessInsertPerson(lPerson); }