private void DoSearchItems() { if (RefreshItemListCommand != null) { RefreshItemListCommand.Execute(); } }
private void RaiseItemDuplicateInteractionRequest(Jurisdiction item) { var clone = item.DeepClone(EntityFactory as IKnownSerializationTypes); clone.JurisdictionId = clone.GenerateNewKey(); clone.DisplayName = clone.DisplayName + "_1"; using (var repository = _repositoryFactory.GetRepositoryInstance()) { repository.Add(clone); repository.UnitOfWork.Commit(); } RefreshItemListCommand.Execute(); }
protected override void ItemDelete(Store item, ConditionalConfirmation confirmation, IRepository repository) { CommonConfirmRequest.Raise(confirmation, async(x) => { if (x.Confirmed) { string storeName; if (IsCurrentStoreLinkedToAnotherStore(item.StoreId, out storeName)) { var linkedConfirmation = new ConditionalConfirmation() { Content = string.Format( "Store '{0}' are linked to Store '{1}'. You can't delete it.".Localize(), item.Name, storeName), Title = "Warning".Localize(null, LocalizationScope.DefaultCategory) }; LinkedStoreNotifictaionRequest.Raise( linkedConfirmation, (y) => { }); return; } OnUIThread(() => { ShowLoadingAnimation = true; }); await Task.Run(() => { if (DeleteSeoKeywords(item)) { if (repository is IStoreRepository) { var temp = ((IStoreRepository)repository).Stores.Where(store => store.StoreId == item.StoreId).FirstOrDefault(); if (temp != null) { repository.Remove(temp); repository.UnitOfWork.Commit(); } } } }); OnUIThread(() => { Items.Remove(item); ShowLoadingAnimation = false; RefreshItemListCommand.Execute(); }); } }); }