public void Delete(OrderHeaderViewModel viewModel) { if (viewModel == null) { throw new ArgumentNullException(nameof(viewModel)); } this.OrderHeaders.Remove(viewModel); this.DataProvider.Delete(viewModel.OrderHeader); this.DisplayData(); }
public void Add(OrderHeaderViewModel viewModel) { if (viewModel == null) { throw new ArgumentNullException(nameof(viewModel)); } this.OrderHeaders.Add(viewModel); this.DataProvider.Insert(viewModel.OrderHeader); this.DisplayData(); }