Exemplo n.º 1
0
        public void RemoveAvvWasteType(object dataContext)
        {
            var avvWasteType = (AvvWasteType)dataContext;

            SelectedAvvWasteTypes.Remove(avvWasteType);
            m_Model.WasteTypes.Remove(Enumerable.Single(m_Model.WasteTypes, wt => wt.AvvId == avvWasteType.Id));
        }
Exemplo n.º 2
0
 private void SetSelectedAvvWasteType()
 {
     SelectedAvvWasteTypes.Clear();
     foreach (var wasteType in m_Model.WasteTypes)
     {
         SelectedAvvWasteTypes.Add(AvvWasteTypeList.Single(avvWt => avvWt.Id == wasteType.AvvId));
     }
 }
Exemplo n.º 3
0
 private void AddAvvWasteType()
 {
     if (!SelectedAvvWasteTypes.Contains(SelectedAvvWasteType) &&
         SelectedAvvWasteType != null)
     {
         SelectedAvvWasteTypes.Add(SelectedAvvWasteType);
         m_Model.WasteTypes.Add(new WasteType
         {
             AvvId = SelectedAvvWasteType.Id
         });
         SelectedAvvWasteType = null;
     }
 }