private void SetDestinationSource()
        {
            DestinationSource.Clear();
            foreach (var item in PortCollection.Source)
            {
                if (Agent != null && Agent.CitiesCanAccess != null)
                {
                    var CityCanAccess = Agent.CitiesCanAccess.Where(O => O.CityId == item.CityID).FirstOrDefault();
                    if (CityCanAccess != null)
                    {
                        DestinationSource.Add(item);
                    }
                }
            }

            DestinationView.Refresh();
        }
Exemplo n.º 2
0
        private void PindahkanAction(object obj)
        {
            try
            {
                foreach (var item in OriginSource.Where(O => O.Selected).ToList())
                {
                    var newItem = item.GetClone();
                    newItem.Selected = false;
                    DestinationSource.Add(newItem);
                    OriginSource.Remove(item);
                }

                RefreshAll();
            }
            catch (Exception ex)
            {
                Helpers.ShowErrorMessage(ex.Message);
            }
        }