public bool CheckLoginName(string LoginName) { bool resultCheck = false; try { if (!String.IsNullOrWhiteSpace(LoginName)) { if (userBLL.Exists("lower(LoginName)='" + LoginName.Trim().ToLower() + "' and UserID!=0 ")) { resultCheck = true; } } } catch (Exception ex) { Common.LogUtil.Debug(this, "判断登陆账号是否存在失败", ex); } return(resultCheck); }
public bool ExistsUserDate(string loginName, string email) { string strWhere = "lower(LoginName)='" + loginName.ToLower().Trim() + "'"; if (loginName.Trim().Length > 0 && email.Trim().Length < 1) { return(userBLL.Exists(strWhere)); } else if (loginName.Trim().Length > 0 && email.Trim().Length > 0) { strWhere = "CompanyID=(select top 1 CompanyID from T_UsersInfo where " + strWhere + ") and lower(email)='" + email.ToLower().Trim() + "'"; return(companyBLL.Exists(strWhere)); } else { return(false); } }
public bool CheckLoginName(string Action, int UserID, string LoginName) { bool resultCheck = false; try { if (Action == CommonEnum.PageState.ADD.ToString().ToLower()) { UserID = 0; } if (!String.IsNullOrWhiteSpace(Action) && !String.IsNullOrWhiteSpace(LoginName)) { if (userBLL.Exists("lower(LoginName)='" + LoginName.Trim().ToLower() + "' and UserID!=" + UserID + " ")) { resultCheck = true; } } } catch (Exception ex) { Common.LogUtil.Debug(this, "判断登陆账号是否存在失败", ex); } return(resultCheck); }