private void AddServiceToOperation(OperationServiceModel operationService) { this.serviceList.Add(operationService); dgOperationServices.ItemsSource = this.serviceList; dgOperationServices.Items.Refresh(); this.operation.OperationServices = this.serviceList; this.operation.Sum = this.GetSumFromAllServices(this.serviceList); }
public OperationService() { InitializeComponent(); this._repo = new Repo(); this.operationService = this.DataContext as OperationServiceModel; cbServices.ItemsSource = this._repo.GetServices(); cbServices.DisplayMemberPath = "Name"; }