コード例 #1
0
ファイル: LoginAPIController.cs プロジェクト: zz110/WKT2015
        public ExecResult AddLoginErrorLog(LoginErrorLogEntity loginErrorLogEntity)
        {
            ExecResult result = new ExecResult();

            try
            {
                ILoginService loginService = ServiceContainer.Instance.Container.Resolve <ILoginService>();
                bool          flag         = loginService.AddLoginErrorLog(loginErrorLogEntity);
                if (flag)
                {
                    result.result = EnumJsonResult.success.ToString();
                    result.msg    = "成功";
                }
                else
                {
                    result.result = EnumJsonResult.failure.ToString();
                    result.msg    = "操作失败,请确认登录信息是否正确";
                }
            }
            catch (Exception ex)
            {
                result.result = EnumJsonResult.error.ToString();
                result.msg    = "记录登录错误日志信息时出现异常:" + ex.Message;
            }
            return(result);
        }