Exemple #1
0
        public void AddItem(ShortCutViewModel item)
        {
            Debug.WriteLine("AddItem  _isSubmit = false ");

            var existsitem = _currentContext.Item.FirstOrDefault(i => i.ModuleID == item.ModuleID);

            if (existsitem == null)
                _currentContext.Item.Add(item);

            _isSubmit = false;
            _islock = true;
            _submitTimer.Start();
        }
Exemple #2
0
 void _services_OnGetShortCutCompleted(object sender, Model.CommonEventArgs <Model.ShortCut> e)
 {
     if (e.Error == null)
     {
         if (e.Result != null)
         {
             ObservableCollection <ShortCutViewModel> items = new ObservableCollection <ShortCutViewModel>();
             foreach (var item in e.Result)
             {
                 ShortCutViewModel tempItem = item.CloneObject <ShortCutViewModel>(new ShortCutViewModel());
                 items.Add(tempItem);
             }
             this.Item = items;
         }
     }
 }