コード例 #1
0
ファイル: FireFacListViewModel.cs プロジェクト: alsokyun/wfms
        /// <summary>
        /// 엑셀다운로드 쓰레드 Function
        /// </summary>
        private void ExcelExportFX()
        {
            try
            {
                fireFacListView.Dispatcher.Invoke(DispatcherPriority.ApplicationIdle,
                                                  new Action((delegate()
                {
                    (fireFacListView.FindName("waitindicator") as WaitIndicator).DeferedVisibility = true;
                })));

                //엑셀 표 데이터
                int[]     tablePointXY      = { 3, 1 };
                DataTable dtExceltTableData = exceldt.DefaultView.ToTable(false, listCols.ToArray());

                //엑셀 유틸 호출
                //ExcelUtil.ExcelTabulation(strFileName, strExcelFormPath, startPointXY, strSearchCondition, dtExceltTableData);
                ExcelUtil.ExcelGrid(strExcelFormPath, strFileName, "소방시설목록", dtExceltTableData, tablePointXY, grid, true);

                fireFacListView.Dispatcher.Invoke(DispatcherPriority.ApplicationIdle,
                                                  new Action((delegate()
                {
                    (fireFacListView.FindName("waitindicator") as WaitIndicator).DeferedVisibility = false;
                    Messages.ShowInfoMsgBox("엑셀 다운로드가 완료되었습니다.");
                })));
            }
            catch (Exception ex)
            {
                fireFacListView.Dispatcher.Invoke(DispatcherPriority.ApplicationIdle,
                                                  new Action((delegate()
                {
                    (fireFacListView.FindName("waitindicator") as WaitIndicator).DeferedVisibility = false;
                    Messages.ShowErrMsgBoxLog(ex);
                })));
            }
        }