public AddSaleBillUserControl() { saleBillViewModel = new SaleBillViewModel(); _saleBillBusiness = new SaleBillBusiness(); InitializeComponent(); InitializeData(); }
/// <summary> /// List the methods needed for data initialization /// </summary> private void InitializeData() { _saleBillBusiness = new SaleBillBusiness(); saleBills = _saleBillBusiness.GetAll(); DataContext = saleBills; ListSaleBills.ItemsSource = saleBills; }
public EditSaleBillUserControl(SaleBill saleBill) { InitializeComponent(); _saleBillBusiness = new SaleBillBusiness(); this.saleBillViewModel = new SaleBillViewModel(saleBill); this.DataContext = saleBillViewModel; Load_DataGrid_SaleBillDetail(); }