/// <summary> /// 判断Team是否重名 /// </summary> /// <param name="teamName"></param> /// <returns>如果重名返回true, 否则返回false</returns> public bool isTeamRepeat(string teamName, string userCode) { DatabaseAccess da = new DatabaseAccess(); string queryStr_1 = string.Format(@"SELECT COUNT(*) FROM WEB_TEAM_PROFILE WHERE TEAMNAME = N'{0}'", teamName); string queryStr_2 = string.Format(@"SELECT COUNT(*) FROM WEB_TEAM_PROFILE WHERE LEADER = N'{0}'", userCode); return (da.isExist(queryStr_1) || da.isExist(queryStr_2)); }
/// <summary> /// 判断申请是否重复提交 /// </summary> /// <param name="applyID">申请的ID</param> /// <param name="userID">用户ID</param> /// <returns>若重复则返回true , 若不重复则返回false</returns> public bool isRepeat(string applyID , string userID) { string sqlStr = string.Format(@"SELECT COUNT(*) FROM WEB_APPLY WHERE WEB_APPLICATION_ID = N'{0}' AND USERID = N'{1}'", applyID, userID); DatabaseAccess da = new DatabaseAccess(); return da.isExist(sqlStr); }