/// <summary> /// ���캯�� /// </summary> /// <param name="connection">��������</param> public SSpaceBC(SqlConnection connection) { this.connection = connection; this.fileBB = new SFileBB(this.connection); this.errorDiaryBB = new SErrorDiaryBB(this.connection); this.operatDiaryBB = new SOperatDiaryBB(this.connection); }
/// <summary> /// ���캯�� /// </summary> public SSpaceBC() { this.selfConn = true; this.connection = new SqlConnection(HS.Config.SqlDataObject.GetSqlConnectionString); this.connection.Open(); this.fileBB = new SFileBB(this.connection); this.errorDiaryBB = new SErrorDiaryBB(this.connection); this.operatDiaryBB = new SOperatDiaryBB(this.connection); }
/// <summary> /// ɾ���ļ� /// </summary> /// <param name="fileId">�ļ�Id</param> public void DeleteFile(int fileId) { SFileData fileData = new SFileData(); SFileBB fileBB = new SFileBB(); try { fileData = fileBB.GetModel(fileId); //ɾ���ļ����ļ���¼ fileBB.DeleteRecord(fileId); FileInfo preFileInfo = new FileInfo(fileData.absolutPath + fileData.sysFileNm); preFileInfo.Delete(); } catch { } finally { fileBB.Dispose(); } }