private async void OnTrackingDetailed(string sender) { if (sender != "back") { dataStack.Push(new Data { ColumnName = ColumnName, AccDocumentItemDTOs = AccDocumentItems.ToList(), SelectedAccDocumentItem = AutoMapper.Mapper.Map <AccDocumentItemDTO, AccDocumentItemDTO>(SelectedAccDocumentItem), CurrentMethodName = "OnGLDetailed", GroupStatus = GroupStatus, Path = Path }); } IsBusyGridView = true; ColumnName = "شماره پیگیری"; _allAccDocumentItems = await _reviewAccountsService.GetDetailedTrackingAsync(); AccDocumentHeaderFilter.CurrentMethodName = "OnTrackingDetailed"; SetGroupStatus(GroupStatusEnum.DetailedTracking); //GroupStatus &= ~(GroupStatusEnum.DetailedTracking); AccDocumentItems = new ObservableCollection <AccDocumentItemDTO>(_allAccDocumentItems); if (sender != "back") { commandStack.Push(TrackingDetailedCommand); } var sl = _reviewAccountsService.GetSL(); if (sl != null) { //Path = $"{sl.TL?.GL?.GLCode}-->{sl.TL?.TLCode}-->{sl?.SLCode}-->{_allAccDocumentItems.FirstOrDefault()?.Code}"; Path = $"{sl.TL?.GL?.Title}-->{sl.TL?.Title}-->{sl?.Title}-->{_allAccDocumentItems.FirstOrDefault()?.Title}"; } IsBusyGridView = false; }
private void OnReturn(ObservableCollection <object> selectedAccDocumentItems) { var count = selectedAccDocumentItems.Count; if (count != 0) { for (int i = 0; i < count; i++) { //if (!AccDocumentItems1.Any(x => SelectedAccDocumentItems[i].PublicInstancePropertiesEqual(x))) AccDocumentItems.Add(selectedAccDocumentItems[i] as AccDocumentItemGroupedDTO); //AccDocumentItems.Remove(selectedAccDocumentItems[i] as AccDocumentItemGroupedDTO); } } //AccDocumentItems1.ToList().AddRange(selectedAccDocumentItems.Cast<AccDocumentItemGroupedDTO>()); AccDocumentItems1 = new ObservableCollection <AccDocumentItemGroupedDTO>(AccDocumentItems1.Except(selectedAccDocumentItems.Cast <AccDocumentItemGroupedDTO>())); }
//private void OnEditAccDocumentItem(AccDocumentItem accDocumentItem) //{ // accDocumentItem.SLId = SLId; // EditAccDocumentItemRequested(accDocumentItem); //} private async void OnDeleteAccDocumentItem(EditableAccDocumentItem accDocumentItem) { if (Deleting?.Invoke() == true) { try { await _accDocumentItemsService.DeleteAccDocumentItemAsync(accDocumentItem.AccDocumentItemId); AccDocumentItems.Remove(accDocumentItem); Deleted(); } catch (Exception ex) { Failed(ex); } } }