Exemple #1
0
 public ActionResult CheckUniqueAccount(string accont)
 {
     try
     {
         var count  = employeeBll.CheckUniqueAccount(accont);
         var result = count == 0;
         return(Json(new JsonSimpleResponse()
         {
             State = result, ErrorMsg = count.ToString()
         }));
     }
     catch (Exception ex)
     {
         return(Json(new JsonSimpleResponse()
         {
             State = false, ErrorMsg = ex.Message
         }));
     }
 }
Exemple #2
0
        public bool CheckPhone(string phone, AccountVerifyTypeEnum type)
        {
            bool result = false;

            switch (type)
            {
            case AccountVerifyTypeEnum.学生未注册:
                result = StudentBll.CheckUniqueAccount(phone) == 0;
                break;

            case AccountVerifyTypeEnum.学生已注册:
                result = StudentBll.CheckUniqueAccount(phone) > 0;
                break;

            case AccountVerifyTypeEnum.校区教师未注册:
                result = SchoolTeacherBll.GetSchoolTeacherCountByPhone(phone) == 0;
                break;

            case AccountVerifyTypeEnum.校区教师已注册:
            case AccountVerifyTypeEnum.校区找回密码:
                result = SchoolTeacherBll.GetSchoolTeacherCountByPhone(phone) > 0;
                break;

            case AccountVerifyTypeEnum.教研教师未注册:
                result = EmployeeBll.CheckUniqueAccount(phone) == 0;
                break;

            case AccountVerifyTypeEnum.教研教师已注册:
                result = EmployeeBll.CheckUniqueAccount(phone) > 0;
                break;

            default:
                result = true;
                break;
            }
            return(result);
        }