private void ButtonAddItem_Click(object sender, RoutedEventArgs e) { if (IsItemEligibleForEntry()) { AddSelectedItemToPurchase(); } TextBoxQty.Clear(); TextBoxQty.Focus(); SearchProductComboBox.Text = string.Empty; }
/// <summary> /// Reset window layout after completing and Purchase and get ready for adding new Purchase /// </summary> public void InitializeNewPurchase() { Purchase = new Purchase(); TextBoxQty.Clear(); TotalAmountTextBox.Clear(); NoteTextBox.Clear(); RefreshPurchaseEntriesDataGrid(); SearchProductComboBox.Text = string.Empty; SupplierComboBox.Text = string.Empty; PurchaseEntriesDataGrid.GetBindingExpression(ItemsControl.ItemsSourceProperty)?.UpdateTarget(); }