Beispiel #1
0
        public ActionResult <JsonResponses> LoginGet([FromQuery] LoginInfoForm loginInfoForm)
        {
            string          MdfPas      = MD5Helper.GetMD5String(loginInfoForm.Password);
            UcUsers         users       = new UcUsers();
            LoginResultType LoginResult = DataHandleManager.Instance().UcUsersHandle.Login(loginInfoForm.UserName, MdfPas, loginInfoForm.LoginerInfo,
                                                                                           loginInfoForm.Platform, ref users);

            if (LoginResult == LoginResultType.SUCCESS_LOGIN)
            {
                return(new JsonResponses(JsonResponses.Success.code, LoginResult.ToString(), LoginResult));
            }
            return(new JsonResponses(JsonResponses.Failed.code, LoginResult.ToString(), LoginResult));
        }
Beispiel #2
0
        public ActionResult <JsonResponses> Login([FromForm] LoginInfoForm loginInfoForm)
        {
            loginInfoForm.MdfPas = MD5Helper.GetMD5String(loginInfoForm.Password);
            UcUsers         users       = new UcUsers();
            LoginResultType LoginResult = DataHandleManager.Instance().UcUsersHandle.PlatformLogin(loginInfoForm, ref users);

            if (LoginResult == LoginResultType.SUCCESS_LOGIN)
            {
                this.LoginAfterSuccess(users);
                return(new JsonResponses(JsonResponses.Success.code, LoginResult.ToString(), users));
            }
            return(new JsonResponses(JsonResponses.Failed.code, LoginResult.ToString(), LoginResult));
        }
        public ActionResult <JsonResponses> CancelPlatform([FromForm] string UserNo)
        {
            if (!DataHandleManager.Instance().UcUsersHandle.CheckUserNoIsExist(UserNo))
            {
                return(new JsonResponses(JsonResponses.FailedCode, LoginResultType.ERROR_USER_NOT_EXIST.ToString()
                                         , LoginResultType.ERROR_USER_NOT_EXIST));
            }
            LoginResultType LoginResult = DataHandleManager.Instance().UcUsersHandle.CancelPlatform(UserNo);

            if (LoginResult == LoginResultType.SUCCESS_CANCEL)
            {
                return(new JsonResponses(JsonResponses.SuccessCode, LoginResult.ToString(), LoginResult));
            }
            return(new JsonResponses(JsonResponses.FailedCode, LoginResult.ToString(), LoginResult));
        }
        public ActionResult <JsonResponses> RegisterPlatfrom([FromForm] RegisterPlatformForm registerPlatform)
        {
            string MdfPas = MD5Helper.GetMD5String(registerPlatform.Password);

            registerPlatform.Password = MdfPas;
            if (String.IsNullOrEmpty(registerPlatform.Phone))
            {
                registerPlatform.Phone = ConstData.DefaultNo.ToString();
            }
            if (String.IsNullOrEmpty(registerPlatform.Email))
            {
                registerPlatform.Email = ConstData.DefaultNo.ToString();
            }
            LoginResultType LoginResult = DataHandleManager.Instance().UcUsersHandle.RegisterPlatform(registerPlatform);

            if (LoginResult == LoginResultType.SUCCESS_REGISTOR)
            {
                return(new JsonResponses(JsonResponses.SuccessCode, LoginResult.ToString(), registerPlatform));
            }
            return(new JsonResponses(JsonResponses.FailedCode, LoginResult.ToString(), LoginResult));
        }