コード例 #1
0
        /// <summary>
        /// Removes all entries from the choosen costs
        /// </summary>
        private void OnCostClear()
        {
            List <SessionCostSelectionViewModel> list = new List <SessionCostSelectionViewModel>((IEnumerable <SessionCostSelectionViewModel>)ChoosenCosts.SourceCollection);

            foreach (SessionCostSelectionViewModel costVM in list)
            {
                ChoosenCosts.Remove(costVM);
                Costs.AddNewItem(costVM);
                costVM.IsSelected = false;
            }
            Costs.CommitNew();

            CostsModified();
            IsDataModified = true;
        }
コード例 #2
0
        /// <summary>
        /// Removes the selected costs from the choosen costs
        /// </summary>
        private void OnCostExclude()
        {
            IEnumerable <SessionCostSelectionViewModel> costs = GetSelectedChoosenCosts();

            foreach (SessionCostSelectionViewModel costVM in costs)
            {
                Costs.AddNewItem(costVM);
                ChoosenCosts.Remove(costVM);
                costVM.IsSelected = false;
            }
            Costs.CommitNew();

            CostsModified();
            IsDataModified = true;
        }