/// <summary>
        /// 替换模板,生成新文档
        /// </summary>
        /// <param name="WDoc"></param>
        /// <param name="PMember"></param>
        /// <param name="PResumes"></param>
        /// <param name="PRelations"></param>
        /// <param name="PPrizePunishs"></param>
        /// <param name="PAppraises"></param>
        private void ExportWord(XWPFDocument WDoc, FixedDocViewModel PDocVM)
        {
            //遍历段落
            foreach (var para in WDoc.Paragraphs)
            {
                ReplaceKey(para, PDocVM.CurMember);
            }
            //遍历表格
            var tables = WDoc.Tables;

            foreach (var table in tables)
            {
                foreach (var row in table.Rows)
                {
                    foreach (var CurCell in row.GetTableCells())
                    {
                        ReplaceKeyInCell(WDoc, CurCell, PDocVM.CurMember, PDocVM.Resumes, PDocVM.Relations, PDocVM.PrizePunishs, PDocVM.Appraises);
                    }
                }
            }
        }
        /// <summary>
        /// 查询待发放信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void BtnSearchClickAsync(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(_MemberSearch.Id))
            {
                return;
            }
            List <Lib.MemberInfoEntity> Members = await DataMemberRepository.ReadMembers(_MemberSearch);

            if (Members == null || Members.Count < 1)
            {
                AppFuns.ShowMessage("未找到此用户信息!");
                return;
            }
            AppFuns.SetStateBarText($"查看或打印[{Members[0].Name}]信息表。");

            _FixedDocVM = new FixedDocViewModel(Members[0]);
            await _FixedDocVM.InitPropsAsync();

            //设定打印标题
            _FixedDocVM.PrintCaption = $"事 业 编 制 人 员 基 本 情 况 表";
            if (_FixedDocVM.CurMember.MemberType.Equals("劳动合同制"))
            {
                _FixedDocVM.PrintCaption = $"劳 动 用 工 人 员 基 本 情 况 表";
            }
            if (_FixedDocVM.CurMember.MemberType.Equals("劳务派遣制"))
            {
                _FixedDocVM.PrintCaption = $"劳 务 用 工 人 员 基 本 情 况 表";
            }
            //设定打印日期
            _FixedDocVM.PrintDate = DateTime.Now;
            //导入格式模板
            string SheetTemplet = "PrintMemberSheetFixedDot.xaml";

            _FixedDoc = (FixedDocument)Application.LoadComponent(new Uri($"/Office.Work.Platform;component/Member/{SheetTemplet}", UriKind.RelativeOrAbsolute));
            _FixedDoc.AddPages();
            _FixedDoc.DataContext    = _FixedDocVM;
            docViewer.Document       = _FixedDoc;
            this.BtnExport.IsEnabled = true;
        }
 private void Page_Unloaded(object sender, RoutedEventArgs e)
 {
     _FixedDoc   = null;
     _FixedDocVM = null;
     AppFuns.SetStateBarText("就绪");
 }