Ejemplo n.º 1
0
        /// <summary>
        /// 案卷目录数据信息获取
        /// </summary>
        /// <param name="TopClassID">类目ID</param>
        /// <returns>DataSet</returns>
        public DataSet getData(int TopClassID)
        {
            strSql = new StringBuilder();
            strSql.Append("select 目录ID,一级类目ID,目录号,保管期限,科室代号,说明 from 案卷目录 where 一级类目ID = @TopClassID order by 目录号");
            SqlParameter[] parameter =
            {
                new SqlParameter("@TopClassID", SqlDbType.Int, 4)
            };
            parameter[0].Value = TopClassID;

            return(DataSql.Query(strSql.ToString(), parameter));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 案卷目录数据信息获取
        /// </summary>
        /// <param name="TopClassID">类目ID</param>
        /// <returns>DataSet</returns>
        public DataSet getCheckData(int TopClassID, int UserID)
        {
            strSql = new StringBuilder();
            strSql.Append("select c.目录ID,c.一级类目ID,c.目录号,c.保管期限,c.科室代号,c.说明 from (案卷目录 as c INNER JOIN");
            strSql.Append(" SYS_科室 AS t ON c.科室代号 = t.科室代号) INNER JOIN");
            strSql.Append(" 角色目录权限 AS p ON t.ID = p.科室ID");
            strSql.Append(" where c.一级类目ID = @TopClassID and p.查看 = 1");
            strSql.Append(" and p.角色ID in (select 角色ID from 用户角色 where 用户ID = @UserID)");
            strSql.Append(" order by 目录号");
            SqlParameter[] parameter =
            {
                new SqlParameter("@TopClassID", SqlDbType.Int, 4),
                new SqlParameter("@UserID",     SqlDbType.Int, 4)
            };
            parameter[0].Value = TopClassID;
            parameter[1].Value = UserID;

            return(DataSql.Query(strSql.ToString(), parameter));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 获取最大柜架号
        /// </summary>
        /// <param name="AreaNum"></param>
        /// <param name="ColumnNum"></param>
        /// <param name="LineNum"></param>
        /// <param name="FloorNum"></param>
        public static void getMaxGJH(out int AreaNum, out int ColumnNum, out int LineNum, out int FloorNum)
        {
            string  strSql = "select * from SYS_最大柜架号";
            DataSet ds     = DataSql.Query(strSql);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                AreaNum   = Convert.ToInt32(ds.Tables[0].Rows[0]["最大区号"]);
                ColumnNum = Convert.ToInt32(ds.Tables[0].Rows[0]["最大列号"]);
                LineNum   = Convert.ToInt32(ds.Tables[0].Rows[0]["最大节号"]);
                FloorNum  = Convert.ToInt32(ds.Tables[0].Rows[0]["最大层号"]);
            }
            else
            {
                AreaNum   = 1;
                ColumnNum = 1;
                LineNum   = 1;
                FloorNum  = 1;
            }
        }