private void CreateNewPanel() { if (SelectedQuotation != null) { PanelViewModel panelViewModel = new PanelViewModel(new Panel()); panelViewModel.Quantity = 1; _unitOfWork.PanelRepository.Add(panelViewModel.PanelModel); SelectedQuotation.AddPanel(panelViewModel); _unitOfWork.Save(); } }
public void RemovePanel(PanelViewModel panelViewModel) { PanelViewModels.Remove(panelViewModel); QuotationModel.Panels.Remove(panelViewModel.PanelModel); }
public void AddPanel(PanelViewModel panelViewModel) { PanelViewModels.Add(panelViewModel); QuotationModel.Panels.Add(panelViewModel.PanelModel); }