-
Notifications
You must be signed in to change notification settings - Fork 0
/
book.aspx.cs
83 lines (71 loc) · 2.23 KB
/
book.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
using System;
using System.Web;
using System.Web.UI;
using QianZhu.BLL;
using QianZhu.Model;
using QianZhu.Utility;
using System.Collections.Generic;
public partial class book : System.Web.UI.Page
{
//建立业务逻辑层实例
private GlobalConfig bll_config = new GlobalConfig();
private Member bll_member = new Member();
public int sex = 1;
public string[] str;
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindInfo();
}
banner1.kind = 32;
Right1.kind = 100;
//Right1.menu = category.Pkid;
Master.Index = 1;
}
/// <summary>
/// 绑定信息
/// </summary>
private void BindInfo()
{
//Title
bll_config.Load(new string[] { "pageTitle","prize" });
Page.Title = "在线报名 - " + bll_config["pageTitle"];
}
protected void SubminButton_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
//检测验证码
HttpCookie acookie = Request.Cookies["2014yfkCode"];
if (code.Value.ToUpper() != acookie.Value)
{
WebUtility.ShowAlertMessage("验证码输入错误!", null);
}
//注册会员
MemberModel member = new MemberModel();
member.Username = yix.Value; //意向课程
member.Pwd = "234fsdfsdf423d";
member.Realname = names.Value;
member.Sex = Request.Form["sex"]; //1-男 2-女
member.Pic = bristh.Value;
member.Nickname = unit.Value;
member.Tel = zw.Value;
member.Mobi = tel.Value;
member.Email = Email.Value;
member.Address = bz.Value;
try
{
member.CityId = member.CityId = Convert.ToInt32(AreaId.Value);
}
catch (Exception)
{
member.CityId = 0;
}
member.Enabled = true;
member.CreateTime = DateTime.Now.ToString();
bll_member.Insert(member);
WebUtility.ShowAlertMessage("信息已提交!", "/book.html");
}
}
}