Example #1
0
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int RoleID)
        {
            StringBuilder strSql = new StringBuilder();

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

            return(mySqlconn.Exists(strSql.ToString(), parameters));
        }
Example #2
0
        public bool IsExists(string projectNo)
        {
            StringBuilder str = new StringBuilder();

            str.Append("select count(project_no) from project where project_no='" + projectNo + "'");
            return(mySqlconn.Exists(str.ToString()));
        }
Example #3
0
        public bool IsExistsLocationNO(string StoreHouseID, string LocationNo)
        {
            string sql = "select count(id) from store_house_location where store_house_id='" + StoreHouseID + "' and location_no='" + LocationNo + "'";

            return(mySqlconn.Exists(sql));
        }
Example #4
0
        public bool IsExistsUserName(string UserName)
        {
            string sql = @"select count(username) from users where username='******'";

            return(mySqlconn.Exists(sql));
        }
Example #5
0
        public bool IsExistsClassName(string ClassName)
        {
            string sql = "select count(product_class_id) from product_class where product_class_name='" + ClassName + "'";

            return(mysqlconn.Exists(sql));
        }
        public bool IsExistsSameSupplier(string productID, string supplierID)
        {
            string sql = "select count(*) from product_supplier_info where product_id='" + productID + "' and supplier_id='" + supplierID + "'";

            return(mySqlconn.Exists(sql));
        }
Example #7
0
        public bool IsExistsUnitName(string UnitName)
        {
            string str = "select count(product_unit_id) from product_unit where product_unit_name='" + UnitName + "'";

            return(mysqlconn.Exists(str));
        }
Example #8
0
        public bool IsExistsProduct(string productID)
        {
            string sql = "select count(product_id) from product_list where product_id='" + productID + "'";

            return(mysqlconn.Exists(sql));
        }
 /// <summary>
 /// 是否存在该角色的权限记录
 /// </summary>
 public bool Exists(string paramRoldeID, string paramModelID)
 {
     StringBuilder strSql = new StringBuilder();
     strSql.Append("select count(1) from T_Role where RoleID ='" + paramRoldeID + "' and ModuleID ='" + paramModelID + "'");
     return mySqlconn.Exists(strSql.ToString());
 }