예제 #1
0
        public bool CheckCompanyCode(string CompanyCode)
        {
            bool resultCheck = false;

            try {
                if (!String.IsNullOrWhiteSpace(CompanyCode))
                {
                    if (companyBLL.Exists("lower(CompanyCode)='" + CompanyCode.Trim().ToLower() + "' and CompanyID!=0 "))
                    {
                        resultCheck = true;
                    }
                }
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "判断统一社会信用代码是否唯一失败", ex);
            }
            return(resultCheck);
        }
예제 #2
0
        public bool CheckCompanyCode(string Action, int CompanyID, string CompanyCode)
        {
            bool resultCheck = false;

            try {
                if (Action == CommonEnum.PageState.ADD.ToString().ToLower())
                {
                    CompanyID = 0;
                }

                if (!String.IsNullOrWhiteSpace(Action) && !String.IsNullOrWhiteSpace(CompanyCode))
                {
                    if (companyBLL.Exists("lower(CompanyCode)='" + CompanyCode.Trim().ToLower() + "' and CompanyID!=" + CompanyID + " "))
                    {
                        resultCheck = true;
                    }
                }
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "判断统一社会信用代码是否唯一失败", ex);
            }
            return(resultCheck);
        }
예제 #3
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);
            }
        }