Beispiel #1
0
        /// <summary>
        /// 检查接口返回信息
        /// </summary>
        /// <param name="autoProc">是否自动跳转到登录页面</param>
        /// <returns></returns>
        public bool CheckApiResponse(ApiResponse apiRes, bool autoProc)
        {
            if (!apiRes.ApiSucc)
            {
                if (autoProc)
                {
                    if (apiRes.ResStatus == ApiResStatus.SESSION_KEY_INVALID)
                    {
                        GotoLogin();
                        return(false);
                    }
                    OView view = this.GetView("Base/Page500");
                    view.SetData("title", "系统运行错误");
                    view.SetData("message", apiRes.ApiMessage);
                    view.Display();
                }
                return(false);
            }

            if (!apiRes.ActSucc)
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        public void TestOutput(string msg)
        {
            OView view = this.GetView("Base/Output");

            view.SetData("message", msg);
            view.Display();
        }