/// <summary> /// 언어 타입을 조회한다. /// <br />로컬 리스트 조회시 다국어 폴더 필터를 위해 /// <br />다국어외에 기타 폴더들 때문에 다국어폴더 조회하는경우 오류 발생 가능성이 있음 /// </summary> /// <returns></returns> private DataTable GetLanguageType() { try { var strCommonCD = "LANG_RESO_TYPE"; return(CommonComboBox.GetCommonData(strCommonCD, null, false)); } catch { throw; } }
/// <summary> /// 콤보박스 바인딩 (센터코드) /// </summary> private void BindingComboBoxLangInfo() { try { DataTable dtCommonData = CommonComboBox.GetFirstCommonData("LANG"); var liComboBoxInfo = ConvertDataTableToList.DataTableToList <ComboBoxInfo>(dtCommonData); this.cboLang.ItemsSource = liComboBoxInfo; if (dtCommonData.Rows.Count > 0) { this.cboLang.SelectedIndex = 0; } } catch { throw; } }
/// <summary> /// 로컬 배포 대상 경로를 가져온다. /// </summary> /// <param name="_strDirectoryPath">조회 대상 디렉토리 경로</param> /// <returns></returns> public static DataTable GetDeployLocalFileList(string _strDirectoryPath) { try { DataTable dtRtnValue = null; DirectoryInfo di = null; var strCommonCD = "LANG_RESO_TYPE"; DataTable dtLangResourceType = CommonComboBox.GetCommonData(strCommonCD, null, false); // 데이터테이블 스키마를 생성한다. dtRtnValue = Utility.HelperClass.CreateDataTableSchema(null, BaseEnumClass.CreateTableSchemaKind.DEPLOY_FILE_LIST); di = new DirectoryInfo(_strDirectoryPath); DataRow drRow = null; foreach (var fi in di.GetFiles()) { if (fi.Extension.Equals(".config")) { if (fi.Name.Equals("SMART.WCS.exe.config") == false) { continue; } } drRow = dtRtnValue.NewRow(); drRow["FILE_NAME"] = fi.Name; // 파일명 drRow["FILE_EXTENSION"] = fi.Extension; // 확장자 drRow["FILE_LAST_MODIFY_DT"] = fi.LastWriteTime.ToString("yyyyMMddHHmmss"); // 최종 수정일시 drRow["FILE_DIRECTORY"] = fi.DirectoryName; // 폴더명 dtRtnValue.Rows.Add(drRow); } DirectoryInfo[] arrSubDirInfo = di.GetDirectories(); foreach (DirectoryInfo dirInfo in arrSubDirInfo) { var iCount = dtLangResourceType.AsEnumerable().Where(p => p.Field <string>("CODE").Contains(dirInfo.Name)).Count(); if (iCount == 0) { continue; } foreach (FileInfo fi in dirInfo.GetFiles()) { drRow = dtRtnValue.NewRow(); drRow["FILE_NAME"] = fi.Name; // 파일명 drRow["FILE_EXTENSION"] = fi.Extension; // 확장자 drRow["FILE_LAST_MODIFY_DT"] = fi.LastWriteTime.ToString("yyyyMMddHHmmss"); // 최종 수정일시 drRow["FILE_DIRECTORY"] = fi.DirectoryName; // 폴더명 dtRtnValue.Rows.Add(drRow); } } if (dtRtnValue.Rows.Count > 0) { dtRtnValue = dtRtnValue.AsEnumerable().Where(p => p.Field <string>("FILE_EXTENSION").Equals(".xml") == false).CopyToDataTable(); } return(dtRtnValue); } catch { throw; } }