• 常见页面响应状态及显示信息


    string msg;
                switch (responseType)
                {
                    case ResponseType.LoginExpiration:
                        msg = "登陆已过期,请重新登陆"; break;
                    case ResponseType.TokenExpiration:
                        msg = "Token已过期,请重新登陆"; break;
                    case ResponseType.AccountLocked:
                        msg = "帐号已被锁定"; break;
                    case ResponseType.LoginSuccess:
                        msg = "登陆成功"; break;
                    case ResponseType.ParametersLack:
                        msg = "参数不完整"; break;
                    case ResponseType.NoPermissions:
                        msg = "没有权限操作"; break;
                    case ResponseType.NoRolePermissions:
                        msg = "角色没有权限操作"; break;
                    case ResponseType.ServerError:
                        msg = "服务器好像出了点问题....."; break;
                    case ResponseType.LoginError:
                        msg = "用户名或密码错误"; break;
                    case ResponseType.SaveSuccess:
                        msg = "保存成功"; break;
                    case ResponseType.NoKey:
                        msg = "没有主键不能编辑"; break;
                    case ResponseType.NoKeyDel:
                        msg = "没有主键不能删除"; break;
                    case ResponseType.KeyError:
                        msg = "主键不正确或没有传入主键"; break;
                    case ResponseType.EidtSuccess:
                        msg = "编辑成功"; break;
                    case ResponseType.DelSuccess:
                        msg = "删除成功"; break;
                    case ResponseType.RegisterSuccess:
                        msg = "注册成功"; break;
                    case ResponseType.AuditSuccess:
                        msg = "审核成功"; break;
                    case ResponseType.ModifyPwdSuccess:
                        msg = "密码修改成功"; break;
                    case ResponseType.OperSuccess:
                        msg = "操作成功"; break;
                    case ResponseType.PINError:
                        msg = "验证码不正确"; break;
    
                    default: msg = responseType.ToString(); break;
                }
                return msg;

    其中responseType为枚举类型

    记录编程的点滴,体会学习的乐趣
  • 相关阅读:
    ASP.NET Core 个人新闻项目
    C# 检查字符串中是否有HTML标签、返回过滤掉所有的HTML标签后的字符串
    VueCLI 页面加载进度条效果
    replace() 方法使用
    CentOS 7.9安装教程
    在Windows中安装MySQL
    linux安装consul
    jenkins Skywalking安装部署文档总结
    CentOS 7.x安装.NET运行时
    Apollo部署文档
  • 原文地址:https://www.cnblogs.com/AduBlog/p/13526750.html
Copyright © 2020-2023  润新知