private void NewItemBtn_Click(object sender, RoutedEventArgs e) { //clear textboxes needed and be ready to save by boolean ItemIDTxtbox.Clear(); ItemNameTxtbox.Clear(); ItemDescTxtbox.Clear(); ItemPriceTxtbox.Clear(); ItemQuantTxtbox.Clear(); isNewRecord = true; }
private void DisplayItems() { if (CurrentSeledtedItems != null) { ItemIDTxtbox.Text = CurrentSeledtedItems.ItemID.ToString(); ItemNameTxtbox.Text = CurrentSeledtedItems.ItemName; ItemDescTxtbox.Text = CurrentSeledtedItems.ItemDescription; ItemPriceTxtbox.Text = CurrentSeledtedItems.ItemPrice.ToString(); ItemQuantTxtbox.Text = CurrentSeledtedItems.ItemQuantity.ToString(); } else { ItemIDTxtbox.Clear(); ItemNameTxtbox.Clear(); ItemDescTxtbox.Clear(); ItemPriceTxtbox.Clear(); ItemQuantTxtbox.Clear(); } }