protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BLL.B_UInfo b_uinfo = new BLL.B_UInfo(); Model.UInfo model = b_uinfo.GetUInfo((int)Session["UID"]); if (model != null) { BLL.B_Community b_com = new BLL.B_Community(); string CommunityName = b_com.GetCommunityName(model.CommunityID); //给页面赋值 tb_Name.Text = model.Name; tb_Number.Text = model.Number; tb_Birthday.Text = model.Birthday.ToShortDateString().ToString(); tb_Community.Text = CommunityName; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddl_Age.Items.Clear(); ddl_Age.Items.Add(" "); for (int i = 65; i < 150; i++) { ddl_Age.Items.Add(i.ToString()); } BLL.B_ApplyInfo b_apply = new BLL.B_ApplyInfo(); model = b_apply.getInfo((int)Session["UID"], (int)Session["ApplyTypes"]); if (model != null) { for (int i = 0; i < ddl_Age.Items.Count; i++) { if (ddl_Age.Items[i].Value == model.Age.ToString()) { ddl_Age.SelectedIndex = i; } } BLL.B_UInfo b_uinfo = new BLL.B_UInfo(); Model.UInfo uinfo = b_uinfo.GetUInfo(model.UID); if (uinfo != null) { tb_Name.Text = uinfo.Name; tb_Number.Text = uinfo.Number; } tb_Addr.Text = model.Address; rbl_Gender.SelectedValue = model.Gender; tb_Job.Text = model.Job; tb_Money.Text = model.Money.ToString(); tb_Tel.Text = model.Tel; } } }