FileData.cs
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:9k
- namespace qminoa.Common
- {
- /// <summary>
- /// FileData 的摘要说明。
- /// </summary>
- ///
- using System;
- using System.Data;
- using System.Runtime.Serialization;
- using qminoa;
- [SerializableAttribute]
- public class FileData:DataSet
- {
- public const string FMDOCFOLDER_TABLE="fmDocFolder";
- public const string FOLDER_ID_FIELD = "FolderID"; //文件夹主键
- public const string DOC_ID_FIELD ="DocID";//文档的主键
- public const string HIFOLDER_ID_FIELD = "HiFolderID"; //上一级的ID号
- public const string FOLDER_TYPEID_FIELD="TypeId";
- public const string FOLDERNAME_FIELD = "FName";//文件名
- public const string NOTE_FIELD = "Note"; //备注
- public const string IHERCTR_FIELD = "IherCtr"; //是否权限继承
- public const string CDATE_FIELD = "CDate";//创建日期
- public const string UDATE_FIELD = "UDate";//更新日期
- public const string EMPID_FIELD = "EmpID";//创建者的ID
- public const string DDATE_FIELD = "DDate";//删除日期
- public const string STATUS_FIELD = "Status";//文件删除后标识
- public const string DEMP_ID_FIELD = " dempid ";//删除者的ID,有管理权的人才能删文件
- //附加两个子段
- public const string ICOPATH_FIELD = "ico";
- public const string TYPENAME_FIELD = "TypeName";//文件夹或文档类型
- //定义表fmDoc(文件夹中的文挡)
- public const String FMDOC_TABLE = "fmDoc";
- //public const String ID_FIELD3 = "ID";//主键
- public const String DOC_ID_FIELD3 ="DocID";//文档的主键
- public const String FOLDER_ID_FIELD3 = "FolderID";//文件夹的id
- public const String FNAME_FIELD3 = "FName";//文件名
- public const String TYPEID_FIELD ="TypeID";//文件类型
- public const String KEYWORD_FIELD ="Keyword";//关键字
- public const String NOTE_FIELD3 = "Note";
- public const String IHERCTR_FIELD3 = "IherCtr"; //是否权限继承
- public const String CDATE_FIELD3 = "CDate";//创建日期
- public const String UDATE_FIELD3 = "UDate";//更新日期
- public const String EMPID_FIELD3 = "EmpID";//创建者的ID
- public const String DDATE_FIELD3 = "DDate";//删除日期
- public const String STATUS_FIELD3 = "Status";//文件删除后标识
- public const String DEMP_ID_FIELD3 = " dempid ";//删除者的ID,有管理权的人才能删文件
- public const String TYPENAME_FIELD3 = "TypeName";
- public const String ICOPATH_FIELD3 = "ico";
- public const String DEMPID_FIELD="dempid";
- public const string FMFILEATT_TABLE = "fmFileAtt";
- public const string ID_FIELD4 ="TypeID";//主键
- public const string ICO_FIELD = "Ico";//图标
- public const string TYPE_FIELD4 = "Type";//类型
- public const string TYPENAME_FIELD4 = "TypeName";//中文名
- public const string DOCTYPE_FIELD = "DocType";//文档类型后缀
- //定义表fmDocFolderCtr(文件夹权限控制)
- public const String FMDOCFOLDERCTR_TABLE = "fmDocFolderCtr";
-
- public const string CON_ID_FIELD = "ConID";//主键
- public const string FOLDER_ID_FIELD2 = "FolderID";//文件ID
- public const string DEP_ID_FIELD ="DepID";//部门ID
- public const string EMP_ID_FIELD = "EmpID";//人员ID
- public const string ADMIN_FLAG_FIELD = "Adminflag";//管理权限
- public const string READ_FLAG_FIELD ="Readflag";//读权限
- public const string WRITE_FLAG_FIELD = "Writeflag";//写权限
- public const string EMPNAME_FIELD = "EmpName";
-
- //定义表FileCont(上传文件内容)
- public const String FILECONT_TABLE = "FileCont";
-
- public const string FID_FIELD ="Fid";//主键
- public const string DOCID_FIELD = "DocId";//所在文档的id
- public const string FNAMEF_FIELD ="fname";//文件名
- public const string FSIZE_FIELD = "size";//文件大小
- public const string FTYPE_FIELD = "ftype";//文件类型
- public const string FPATH_FIELD = "fpath";//文件路径
- public const string CDATEF_FIELD = "cdate";//创建时间
- public const string CONT_FIELD = "cont";//关键字
- //用户信息的表
- public const string FMEMPINFO_TABLE="fmEmpInfo";
- public const string FMEMPINFO_EMPID_FIELD="EmpId";
- public const string FMEMPINFO_DEPID_FIELD="DepId";
- public const string FMEMPINFO_EMPNAME_FIELD="EmpName";
- public const string DOCRIGHTCTR_TABLE="fmDocRightCtr";
- public const string DOCRIGHTCTR_CONID_FIELD="ConId";
- public const string DOCRIGHTCTR_DOCID_FIELD="docid";
- public const string DOCRIGHTCTR_EMPID_FIELD="empid";
- public const string DOCRIGHTCTR_EMPNAME_FIELD="empname";
- public const string DOCRIGHTCTR_DEPID_FIELD="depid";
- public const string DOCRIGHTCTR_DEPNAME_FIELD="depname";
- public const string DOCRIGHTCTR_ADMINFLAG_FIELD="adminflag";
- public const string DOCRIGHTCTR_WRITEFLAG_FIELD="writeflag";
- public const string DOCRIGHTCTR_READFLAG_FIELD="readflag";
- public FileData()
- {
- BuildDataTables();
- }
- private void BuildDataTables()
- {
- DataTable table;
- DataColumnCollection columns;
-
- //建立fmDocFolder_Table(文件夹表)
- table = new DataTable(FMDOCFOLDER_TABLE);
- columns = table.Columns;
- columns.Add(FOLDER_ID_FIELD,typeof(System.Int32));//
- columns.Add(DOC_ID_FIELD,typeof(System.Int32));//
-
- columns.Add(HIFOLDER_ID_FIELD, typeof(System.Int32));
- columns.Add(FOLDERNAME_FIELD, typeof(System.String));//
- columns.Add(FOLDER_TYPEID_FIELD,typeof(System.Int32));
- columns.Add(NOTE_FIELD, typeof(System.String));//
- columns.Add(IHERCTR_FIELD, typeof(System.Boolean));
- columns.Add(CDATE_FIELD, typeof(System.DateTime));//
- columns.Add(UDATE_FIELD, typeof(System.DateTime));
- columns.Add(EMPID_FIELD, typeof(System.Int32));//
- columns.Add(DDATE_FIELD, typeof(System.DateTime));
- columns.Add(STATUS_FIELD, typeof(System.Boolean));//
- columns.Add(DEMP_ID_FIELD, typeof(System.Int32));
- columns.Add(TYPENAME_FIELD,typeof(System.String));//
- columns.Add(ICOPATH_FIELD,typeof(System.String));//
- this.Tables.Add(table);
-
- //建立fmDocFolderCtr(文件夹权限表)
- table = new DataTable(FMDOCFOLDERCTR_TABLE);
- columns = table.Columns;
- columns.Add(CON_ID_FIELD,typeof(System.Int32));
- columns.Add(FOLDER_ID_FIELD, typeof(System.Int32));
- columns.Add(DEP_ID_FIELD, typeof(System.Int16));
- columns.Add(EMP_ID_FIELD, typeof(System.Int32));
- columns.Add(ADMIN_FLAG_FIELD, typeof(System.Boolean));
- columns.Add(READ_FLAG_FIELD, typeof(System.Boolean));
- columns.Add(WRITE_FLAG_FIELD, typeof(System.Boolean));
- columns.Add(EMPNAME_FIELD,typeof(System.String));
- this.Tables.Add(table);
-
- table= new DataTable();
-
- //建立fmDoc表(文件夹中的子文件)
- table = new DataTable(FMDOC_TABLE);
- columns = table.Columns;
- columns.Add(DOC_ID_FIELD3,typeof(System.Int32));
- columns.Add(FOLDER_ID_FIELD3,typeof(System.Int32));
- columns.Add(FNAME_FIELD3,typeof(System.String));
- columns.Add(TYPEID_FIELD,typeof(System.Int32));
- columns.Add(KEYWORD_FIELD,typeof(System.String));
- columns.Add(NOTE_FIELD3,typeof(System.String));
- columns.Add(IHERCTR_FIELD3,typeof(System.Boolean));
- columns.Add(CDATE_FIELD3,typeof(System.DateTime));
- columns.Add(UDATE_FIELD3,typeof(System.DateTime));
- columns.Add(EMPID_FIELD3,typeof(System.Int32));
- columns.Add(DDATE_FIELD3,typeof(System.DateTime));
- columns.Add(STATUS_FIELD3,typeof(System.Boolean));
- columns.Add(DEMP_ID_FIELD3,typeof(System.Int32));
- columns.Add(TYPENAME_FIELD3,typeof(System.String));
- columns.Add(ICOPATH_FIELD3,typeof(System.String));
- this.Tables.Add(table);
- //建立fmFileAtt(文件类型表)
- table = new DataTable(FMFILEATT_TABLE);
- columns = table.Columns;
- columns.Add(ID_FIELD4,typeof(System.Int32));
- columns.Add(TYPENAME_FIELD4,typeof(System.String));
- columns.Add(TYPE_FIELD4,typeof(System.String));
- columns.Add(ICO_FIELD,typeof(System.String));
- columns.Add(DOCTYPE_FIELD,typeof(System.String));
- this.Tables.Add(table);
- //建立FileCont(上传文件表)
- table = new DataTable(FILECONT_TABLE);
- columns = table.Columns;
- columns.Add(FID_FIELD,typeof(System.Int32));
- columns.Add(DOCID_FIELD,typeof(System.Int32));
- columns.Add(FNAMEF_FIELD,typeof(System.String));
- columns.Add(FSIZE_FIELD,typeof(System.Int32));
- columns.Add(FTYPE_FIELD,typeof(System.String));
- columns.Add(FPATH_FIELD,typeof(System.String));
- columns.Add(CDATEF_FIELD,typeof(System.DateTime));
- columns.Add(KEYWORD_FIELD,typeof(System.String));
- this.Tables.Add(table);
- //用户表
- table = new DataTable(FMEMPINFO_TABLE);
- columns = table.Columns;
- columns.Add(FMEMPINFO_EMPID_FIELD,typeof(System.Int32));//
- columns.Add(FMEMPINFO_DEPID_FIELD,typeof(System.Int32));//
- columns.Add(FMEMPINFO_EMPNAME_FIELD, typeof(System.String));
- this.Tables.Add(table);
- table = new DataTable(DOCRIGHTCTR_TABLE);
- columns = table.Columns;
- columns.Add(DOCRIGHTCTR_CONID_FIELD,typeof(System.Int32));
- columns.Add(DOCRIGHTCTR_DOCID_FIELD,typeof(System.Int32));
- columns.Add(DOCRIGHTCTR_EMPID_FIELD,typeof(System.Int32));
- columns.Add(DOCRIGHTCTR_EMPNAME_FIELD,typeof(System.String));
- columns.Add(DOCRIGHTCTR_DEPID_FIELD,typeof(System.Int32));
- columns.Add(DOCRIGHTCTR_DEPNAME_FIELD,typeof(System.String));
- columns.Add(DOCRIGHTCTR_ADMINFLAG_FIELD,typeof(System.Boolean));
- columns.Add(DOCRIGHTCTR_WRITEFLAG_FIELD,typeof(System.Boolean));
- columns.Add(DOCRIGHTCTR_READFLAG_FIELD,typeof(System.Boolean));
-
- this.Tables.Add(table);
- }
- }
- }