Пример #1
0
        public IHttpActionResult APPLogin(string UserName, string Password)
        {
            Account  account  = accountService.ReadBy(UserName, Password);
            chkLogin chklogin = new chkLogin();

            chklogin.Check = (account != null)?true:false;
            chklogin.Level = (account != null)?(int)Enum.Parse(typeof(RoleType), roleService.ReadByID(account.RoleId).Type.ToString()):999;
            return(Ok(chklogin));
        }