一步一步学asp.net_Ajax登录设计(28)
来源:未知 责任编辑:责任编辑 发表时间:2014-05-10 12:25 点击:次
2:
3: /// 用户登录
4:
5: /// </summary>
6:
7: /// <param name="info">会员model</param>
8:
9: /// <returns></returns>
10:
11: public bool MemberLogin(member info)
12:
13: {
14:
15: return new memberDAL().MemberLogin(info);
16:
17: }
18:
19: /// <summary>
20:
21: /// 返回给客户端的json格式数据(用于根据用户登录状态决定)
22:
23: /// </summary>
24:
25: /// <param name="info"></param>
26:
27: /// <returns></returns>
28:
29: public string ReturnJson(member info, out bool Status)
30:
31: {
32:
33: //登录状态
34:
35: Status = MemberLogin(info);
36:
37: //生成json格式数据
38:
39: return WriteJsonForLogin(Status, info.username);
40:
41: }
42:
43: /// <summary>
44:
45: /// 记住帐号和密码的枚举
46:
47: /// </summary>
48:
49: public enum RememberType
50:
51: {
52:
53: /// <summary>
54:
55: /// 记住帐号
56:
57: /// </summary>
58:
59: RememberName = 0,
60:
61: /// <summary>
62:
63: /// 同时记住帐号和密码
64:
65: /// </summary>
66:
67: RememberNameAndPwd = 1,
68:
69: /// <summary>
70:
71: /// 不记住帐号密码
72:
73: /// </summary>
74:
75: NoRemember = 2
76:
77: }
78:
79: /// <summary>
80:
81: /// 根据保存帐号密码状态判断是保存帐号还是同时保存帐号和密码
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>