Пример #1
0
 public bool CanRemove(object obj)
 {
     if (CurrentSotrudniki.Count != 0)
     {
         var sotr = from x in CurrentSotrudniki where x.IsSelected == true select x;
         if ((sotr.ToList()).Count > 0)
         {
             foreach (var item in sotr.ToList())
             {
                 RemoveSotrudniki.Add(item);
             }
             return(true);
         }
         return(false);
     }
     return(false);
 }
Пример #2
0
        public void Remove(object obj)
        {
            var sotr = from x in CurrentSotrudniki where x.IsSelected == true select x;

            if ((sotr.ToList()).Count > 0)
            {
                foreach (var item in sotr.ToList())
                {
                    RemoveSotrudniki.Add(item);
                }
            }
            foreach (var sotrs in RemoveSotrudniki)
            {
                var f = sotrs;
                CurrentSotrudniki.Remove(sotrs);
                AallSotrudniki.Remove(f);
            }
        }