Ejemplo n.º 1
0
        public void Delete(OrderHeaderViewModel viewModel)
        {
            if (viewModel == null)
            {
                throw new ArgumentNullException(nameof(viewModel));
            }

            this.OrderHeaders.Remove(viewModel);

            this.DataProvider.Delete(viewModel.OrderHeader);

            this.DisplayData();
        }
Ejemplo n.º 2
0
        public void Add(OrderHeaderViewModel viewModel)
        {
            if (viewModel == null)
            {
                throw new ArgumentNullException(nameof(viewModel));
            }

            this.OrderHeaders.Add(viewModel);

            this.DataProvider.Insert(viewModel.OrderHeader);

            this.DisplayData();
        }