/// <summary> /// 파일조회 /// </summary> public string FileInfo_GetFileData(AutoDownloadEntity pAutoDownloadEntity) { try { using (DBManager pDBManager = new DBManager()) { DataTable pDataTable = new AutoDownloadProvider(pDBManager).FileInfo_GetFileData(pAutoDownloadEntity); byte[] bLob = (byte[])pDataTable.Rows[0]["FILE_DATA"]; using (FileStream fs = new FileStream(pAutoDownloadEntity.FILE_PATH + pAutoDownloadEntity.FILENAME, FileMode.Create, FileAccess.Write, FileShare.ReadWrite)) { fs.Write(bLob, 0, bLob.Length); fs.Flush(); fs.Close(); fs.Dispose(); } } FileInfo fi = new FileInfo(pAutoDownloadEntity.FILE_PATH + pAutoDownloadEntity.FILENAME); return(CoFAS_FileManager.Get_Crc32(fi)); } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "FileInfo_GetFileData(AutoDownloadEntity pAutoDownloadEntity)", pException); } }
/// <summary> /// 개체 구하기 /// </summary> /// <param name="pDataRow">데이타 로우</param> /// <returns>메뉴 설정 개체</returns> public AutoDownloadEntity GetEntity(DataRow pDataRow) { try { AutoDownloadEntity pAutoDownloadEntity = new AutoDownloadProvider(null).GetEntity(pDataRow); return(pAutoDownloadEntity); } catch (Exception pException) { throw new ExceptionManager ( this, "GetEntity(pDataRow)", pException ); } }
/// <summary> /// 파일정보 조회하기 /// </summary> public DataTable FileInfo_GetList(AutoDownloadEntity pAutoDownloadEntity) { try { using (DBManager pDBManager = new DBManager()) { DataTable pDataTable = new AutoDownloadProvider(pDBManager).FileInfo_GetList(pAutoDownloadEntity); return(pDataTable); } } catch (ExceptionManager pExceptionManager) { throw pExceptionManager; } catch (Exception pException) { throw new ExceptionManager(this, "FileInfo_GetList(string pFILE_TYPE)", pException); } }