예제 #1
0
        /// <summary>
        /// 根据指定字段的值是否存在
        /// </summary>
        /// <param name="field">字段名</param>
        /// <param name="value">值</param>
        /// <returns>是否存在</returns>
        public bool Exist(string field, string value)
        {
            Member member = new Member();
            Type   type   = member.GetType();

            PropertyInfo[] propertyInfos = type.GetProperties();
            List <string>  propertys     = propertyInfos.Select(p => p.Name).ToList();

            if (propertys.Contains(field))
            {
                if (field.ToLower() == "email")
                {
                    return(CurrentRepository.Exist(m => m.Email == value));
                }
                else
                {
                    return(CurrentRepository.Exist(m => m.Phone_mob == value));
                }
            }
            return(false);
        }
예제 #2
0
 public bool Exist(string Name)
 {
     return(CurrentRepository.Exist(u => u.RoleName == Name));
 }
예제 #3
0
 public bool Login(string name, string password)
 {
     return(CurrentRepository.Exist(u => u.name == name && u.password == password));
 }
예제 #4
0
 public bool Exist(string userName)
 {
     return(CurrentRepository.Exist(u => u.UserName == userName));
 }
예제 #5
0
파일: AdminBLL.cs 프로젝트: misaly/FanLi
 public bool Exist(string loginName)
 {
     return(CurrentRepository.Exist(u => u.LoginName == loginName));
 }
예제 #6
0
 public bool Exist(Expression <Func <User, bool> > anyLambda)
 {
     return(CurrentRepository.Exist(anyLambda));
 }
예제 #7
0
 public bool Exist(string userName)
 {
     return(CurrentRepository.Exist(it => it.name == userName));
 }