Esempio n. 1
0
        /// <summary>
        /// 验证项目编号
        /// </summary>
        public static bool ExistsByProject(string 项目编号, int DeptID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(*) from 城建项目");
            strSql.Append(" inner join 城建档案分类号 on 城建档案分类号.ID = 城建项目.分类号ID");
            strSql.Append(" where 项目编号=@项目编号 and  城建档案分类号.全宗ID = @全宗ID");

            SqlParameter[] parameters =
            {
                new SqlParameter("@项目编号", SqlDbType.NVarChar, 20),
                new SqlParameter("@全宗ID", SqlDbType.Int, 4)
            };
            parameters[0].Value = 项目编号;
            parameters[1].Value = DeptID;

            return(DataSql.Exists(strSql.ToString(), parameters));
        }
Esempio 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));
        }
Esempio 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;
            }
        }