C# Class HYDocumentMS.FileHelper

文档管理系统需要的方法
Inheritance: IFileHelper
Datei anzeigen Open project: huayancreate/HYPDM Class Usage Examples

Public Methods

Method Description
CreatTree ( TreeNodeCollection Nds, string parentID, DataTable dt ) : void

SetComboBoxValue ( System cobbox, string dataType, int selectedIndex ) : void
getDataTableBySql ( String fields, string where, string tableName ) : DataTable
getDocFileDir ( ) : DataTable

getDocFileDir ( System.Boolean bl ) : DataTable

getDocFileList ( ) : DataTable

返回所有文件清单,不管是否删除

getDocFileList ( System.Boolean bl ) : DataTable

返回指定删除标识的文件清单列表,true:delflag为N,false:delfalg为Y

getDocumentAllPathByFileID ( string fileid ) : string
getDocumentAllPathByPathID ( string pathid ) : string

getNewVer ( string prefix ) : string
getTreeViewByDocFileList ( TreeView tv, DataTable dtDocList ) : void

getTreeViewByPathDir ( TreeView treeview ) : void
isHasAuth ( DataType authType, string userAccount, string fileKey ) : System.Boolean

给定需要判定的权限类型,用户账号key,文件key值,获取对应权限

Private Methods

Method Description
CreatTreeDir ( TreeNodeCollection Nds, string parentID, DataTable dt ) : void

IsTrueFolderAuth ( string queryAuthFields, string folderKey, string userKey ) : System.Boolean

针对文件夹的权限进行判定

getFileFolder ( string fileKey ) : DataTable

文件归属文件夹

getFilePath ( string pathParentID ) : void

递归出路径的子路径

getSingleUserFileAuth ( string userKey, string fileKey, string queryAuthFields ) : DataTable

判定单用户对单文件的访问权限

getUserFileFolderAuth ( string queryAuthFields, string fileFolderKey, string userKey ) : DataTable

单用户对给定文件夹的权限判定

getUserRoleByAccount ( string userAccount ) : DataTable

用户账号归属群组

getUserRolesFileAuth ( List roleList, string fileKey, string queryAuthFields ) : DataTable

用户归属多角色对给定文件的权限判定

getUserRolesFileFolderAuth ( List roleList, string fileFolderKey, string queryAuthFields ) : DataTable

给定用户归属的多群组角色对给定文件的文件夹的权限判定

isTrue ( string strAuthType, string userAccount, string fileKey ) : System.Boolean

给定需要判定的权限类型,用户账号key,文件key值,获取对应权限

listFileTree ( TreeNode node ) : void

Method Details

CreatTree() public method

public CreatTree ( TreeNodeCollection Nds, string parentID, DataTable dt ) : void
Nds System.Windows.Forms.TreeNodeCollection
parentID string
dt System.Data.DataTable
return void

SetComboBoxValue() public method

public SetComboBoxValue ( System cobbox, string dataType, int selectedIndex ) : void
cobbox System
dataType string
selectedIndex int
return void

getDataTableBySql() public method

public getDataTableBySql ( String fields, string where, string tableName ) : DataTable
fields String
where string
tableName string
return System.Data.DataTable

getDocFileDir() public method

public getDocFileDir ( ) : DataTable
return System.Data.DataTable

getDocFileDir() public method

public getDocFileDir ( System.Boolean bl ) : DataTable
bl System.Boolean
return System.Data.DataTable

getDocFileList() public method

返回所有文件清单,不管是否删除
public getDocFileList ( ) : DataTable
return System.Data.DataTable

getDocFileList() public method

返回指定删除标识的文件清单列表,true:delflag为N,false:delfalg为Y
public getDocFileList ( System.Boolean bl ) : DataTable
bl System.Boolean true为只会返回删除标识为N的文件列表清单,false返回删除标识为Y的文件列表清单
return System.Data.DataTable

getDocumentAllPathByFileID() public method

public getDocumentAllPathByFileID ( string fileid ) : string
fileid string
return string

getDocumentAllPathByPathID() public method

public getDocumentAllPathByPathID ( string pathid ) : string
pathid string
return string

getNewVer() public method

public getNewVer ( string prefix ) : string
prefix string
return string

getTreeViewByDocFileList() public method

public getTreeViewByDocFileList ( TreeView tv, DataTable dtDocList ) : void
tv System.Windows.Forms.TreeView
dtDocList System.Data.DataTable
return void

getTreeViewByPathDir() public method

public getTreeViewByPathDir ( TreeView treeview ) : void
treeview System.Windows.Forms.TreeView
return void

isHasAuth() public method

给定需要判定的权限类型,用户账号key,文件key值,获取对应权限
public isHasAuth ( DataType authType, string userAccount, string fileKey ) : System.Boolean
authType HYPDM.DataType 查询的权限参数,查看,编辑
userAccount string 用户账户(KEY值)
fileKey string 文件key值
return System.Boolean