コード例 #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();
        }
コード例 #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();
        }