Exemple #1
0
        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);
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        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);
        }