private void reloadData() { DiscountDataGrid.ItemsSource = null; VMs itemsource = new VMs(); DiscountDataGrid.ItemsSource = itemsource.getViewModel(); }
public DiscountUserControl1() { isManager = true; InitializeComponent(); VMs itemsource = new VMs(); DiscountDataGrid.ItemsSource = itemsource.getViewModel(); }
public DiscountUserControl1(bool isManager) { this.isManager = isManager; InitializeComponent(); VMs itemsource = new VMs(); DiscountDataGrid.ItemsSource = itemsource.getViewModel(); if (!isManager) { btnAdd.Visibility = Visibility.Hidden; } }