private void InitializeSectionSelection() { if (Sections.Count == SectionIds.Count) { lblSectionName.Text = "すべて"; } else if (SectionIds.Count == 1) { lblSectionName.Text = Sections.First(x => SectionIds.Contains(x.Id)).Name; } else { lblSectionName.Text = "入金部門絞込有"; } SectionIdsInner = SectionIds; }
public List <string> ListOfSectionIds() { List <string> listOfSectionIds = SectionIds?.Split(',').ToList(); return(listOfSectionIds); }
/// <summary> 検索処理</summary> private async Task SearchMatchedData(bool isShowMsgDialog = false) { var clientKey = await Util.CreateClientKey(Login, nameof(PE0701)); var useDepartmentFilter = Departments.Count != DepartmentIds.Count; var useSectionFilter = Sections.Count != SectionIds.Count; var option = GetSearchCondition(); option.ClientKey = clientKey; option.UseDepartmentWork = useDepartmentFilter; option.UseSectionWork = useSectionFilter; if (useDepartmentFilter) { await Util.SaveWorkDepartmentTargetAsync(Login, clientKey, DepartmentIds.ToArray()); } if (useSectionFilter) { await Util.SaveWorkSectionTargetAsync(Login, clientKey, SectionIds.ToArray()); } var result = await ServiceProxyFactory.DoAsync(async (MatchingServiceClient client) => await client.SearchMatchedDataAsync(SessionKey, option, string.Empty)); if (result.ProcessResult.Result) { var matchingHeader = result.MatchingHeaders; grdApprovalResult.DataSource = new BindingSource(matchingHeader, null); if (matchingHeader.Any()) { ClearStatusMessage(); tbcMatchingApproval.SelectedTab = tbpSearchResult; BaseContext.SetFunction03Enabled(true); BaseContext.SetFunction06Enabled(true); BaseContext.SetFunction08Enabled(true); BaseContext.SetFunction09Enabled(true); cbxApprovalData.Enabled = false; if (cbxApprovalData.Checked) { OnF03ClickHandler = ApprovalCancel; } else { OnF03ClickHandler = Approve; } } else { if (isShowMsgDialog) { ShowWarningDialog(MsgWngNotExistSearchData); } BaseContext.SetFunction03Enabled(false); BaseContext.SetFunction06Enabled(false); BaseContext.SetFunction08Enabled(false); BaseContext.SetFunction09Enabled(false); } } else { if (isShowMsgDialog) { ShowWarningDialog(MsgWngNotExistSearchData); } } }