Пример #1
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int sid)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from SysMenuTab");
            strSql.Append(" where sid=@sid ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@sid", SqlDbType.Int, 4)
            };
            parameters[0].Value = sid;

            return(crm.Exists(strSql.ToString(), parameters));
        }
Пример #2
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int SRoleID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from SysRoleTab");
            strSql.Append(" where SRoleID=@SRoleID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@SRoleID", SqlDbType.Int, 4)
            };
            parameters[0].Value = SRoleID;

            return(crm.Exists(strSql.ToString(), parameters));
        }
Пример #3
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(string EmployeeID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from System");
            strSql.Append(" where EmployeeID=@EmployeeID ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@EmployeeID", SqlDbType.NVarChar)
            };
            parameters[0].Value = EmployeeID;

            return(crm.Exists(strSql.ToString(), parameters));
        }
Пример #4
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int RoseID, string UserName)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from KeyWords");
            strSql.Append(" where RoseID=@RoseID and UserName=@UserName ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@RoseID",   SqlDbType.Int,     4),
                new SqlParameter("@UserName", SqlDbType.VarChar, 50)
            };


            parameters[0].Value = RoseID;
            parameters[1].Value = UserName;
            return(crm.Exists(strSql.ToString(), parameters));
        }