public AdminProductsWindow() { InitializeComponent(); UniversalFunctions.setUpWindow(this); tbxQuantity.IsEnabled = false; tbxQuantity.Text = quantity.ToString(); tbxPrice.IsEnabled = false; tbxPrice.Text = price.ToString(); setSupplier(ServiceSupplier.getAllSuppliers()); loadProductsToDataGrid(); }
private void BtnAddSupplier_Click(object sender, RoutedEventArgs e) { String name = tbxSupplierName.Text; String phonenbr = tbxSupplierphnNbr.Text; String address = tbxSupplierAddress.Text; Boolean isSuccessfulInsert = ServiceSupplier.addSupplier(name, int.Parse(phonenbr), address); if (isSuccessfulInsert) { tbxSupplierAddress.Clear(); tbxSupplierName.Clear(); tbxSupplierphnNbr.Clear(); } }