Пример #1
0
        public ValideMiddleEmployMiddleModel LoginEmploy(LoginViewModel loginViewModel)
        {
            ValideMiddleEmployMiddleModel result = new ValideMiddleEmployMiddleModel();
            //加密信息
            var decodeloginInfp = _IMapper.Map <LoginViewModel, LoginViewModel>(loginViewModel);
            //验证是否通过
            var isSuccess = _userInfoRepository.Login(decodeloginInfp);

            //通过获取相关数据
            if (isSuccess)//成功则获取相关数据
            {
                var employInfo = _facultystaffInfoRepository.GetStudentInfoAndHealthInfo(decodeloginInfp.Idnumber);
                result        = _IMapper.Map <facultystaff_Info, ValideMiddleEmployMiddleModel>(employInfo);
                result.RoleID = GetRoleID(result.DepartName);
                return(result);
            }
            else
            {
                return(null);
            }
        }
Пример #2
0
 public LoginValideReEmployesModel()
 {
     Data          = new ValideMiddleEmployMiddleModel();
     baseViewModel = new BaseViewModel();
 }