Esempio n. 1
0
        /// <summary>
        /// 用唯一值实现Equals
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if ((obj == null) || (obj.GetType() != GetType()))
            {
                return(false);
            }
            WfFile castObj = (WfFile)obj;

            return((castObj != null) &&
                   (filecode == castObj.FileCode));
        }
Esempio n. 2
0
 /// <summary>
 /// 获取全部文档
 /// </summary>
 /// <returns></returns>
 public IList<WfFile> GetWfFIle()
 {
     IList<WfFile> datalist = new List<WfFile>();
     string strSql = "select * from wf_file order by FileCode";
     IDataReader dr = OracleHelper.ExecuteReader(strSql);
     while (dr.Read())
     {
         WfFile fileEntity = new WfFile();
         fileEntity.FileCode = dr["FileCode"].ToString();
         fileEntity.FileName = dr["FileName"].ToString();
         fileEntity.FileType = dr["FileType"].ToString();
         datalist.Add(fileEntity);
     }
     dr.Close();
     return datalist;
 }
Esempio n. 3
0
        /// <summary>
        /// 获取环节对应的文档权限
        /// </summary>
        /// <param name="wffile"></param>
        /// <returns></returns>
        public IList<WfFile> GetWfFIle(WfFile wffile)
        {
            IList<WfFile> datalist = new List<WfFile>();
            string strWhere = string.Empty;

            if (string.IsNullOrEmpty(wffile.FileCode))
            {
                return datalist;
            }
            strWhere += "FileCode In (" + wffile.FileCode + ") And ";

            string strSql = "select * from wf_file where {0} 1 = 1  order by OrderNo,FileCode";
            strSql = string.Format(strSql, strWhere);
            IDataReader dr = OracleHelper.ExecuteReader(strSql);
            while (dr.Read())
            {
                WfFile fileEntity = new WfFile();
                fileEntity.FileCode = dr["FileCode"].ToString();
                fileEntity.FileName = dr["FileName"].ToString();
                fileEntity.FileType = dr["FileType"].ToString();
                datalist.Add(fileEntity);
            }
            dr.Close();
            return datalist;
        }