protected void Page_Load(object sender, EventArgs e) { user = (UserModel)Session["User"]; if (Session["User"] == null || Session["User"].ToString() == "" || user.UserType != 1) { Response.Redirect("../Login.aspx"); } else { BaseInfoBLL bll = new BaseInfoBLL(); List <BaseInfoModel> list = bll.ShowBaseInfo(); if (list.Count != 0) { Session["BaseInfoID"] = list[0].ID; BaseName.Text = list[0].HomeName; Amount.Text = list[0].Amount.ToString() + "栋"; BuildArea.Text = list[0].BuildArea.ToString() + "亩"; GreenArea.Text = list[0].GreenArea.ToString() + "亩"; RoadArea.Text = list[0].RoadArea.ToString() + "亩"; ParkArea.Text = list[0].ParkingArea.ToString() + "亩"; BuildDate.Text = list[0].BuildDate.ToString("yyy年MM月dd日"); MainHead.Text = list[0].MainHead; Telephone.Text = list[0].Tel; Address.Text = list[0].Address; BaseMemo.Text = list[0].Memo; } else { Response.Redirect("AddBaseInfo.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { user = (UserModel)Session["User"]; if (Session["User"] == null || Session["User"].ToString() == "" || user.UserType != 1) { Response.Redirect("../Login.aspx"); } else { if (!IsPostBack) { BaseInfoBLL bll = new BaseInfoBLL(); List <BaseInfoModel> list = bll.ShowBaseInfo(); if (list.Count != 0) { txtBaseName.Text = list[0].HomeName; txtAmount.Text = list[0].Amount.ToString(); txtBuildArea.Text = list[0].BuildArea.ToString(); txtGreenArea.Text = list[0].GreenArea.ToString(); txtRoadArea.Text = list[0].RoadArea.ToString(); txtParkArea.Text = list[0].ParkingArea.ToString(); txtBuildDate.Value = list[0].BuildDate.ToString("yyy-MM-dd"); txtMainHead.Text = list[0].MainHead; txtTelephone.Text = list[0].Tel; txtAddress.Text = list[0].Address; txtMemo.Text = list[0].Memo; } } } }
protected void Page_Load(object sender, EventArgs e) { BaseInfoBLL bll = new BaseInfoBLL(); List <BaseInfoModel> list = bll.ShowBaseInfo(); if (list.Count != 0) { MainHead.Text = list[0].MainHead; Tel.Text = list[0].Tel; Address.Text = list[0].Address; } }
protected void Page_Load(object sender, EventArgs e) { BaseInfoBLL bll = new BaseInfoBLL(); List <BaseInfoModel> list = bll.ShowBaseInfo(); if (list.Count != 0) { BaseName.Text = list[0].HomeName; Amount.Text = list[0].Amount.ToString(); BuildArea.Text = list[0].BuildArea.ToString(); GreenArea.Text = list[0].GreenArea.ToString(); RoadArea.Text = list[0].RoadArea.ToString(); MainHead.Text = list[0].MainHead; Tel.Text = list[0].Tel; Address.Text = list[0].Address; } }
protected void Page_Load(object sender, EventArgs e) { BaseInfoBLL bll = new BaseInfoBLL(); List <BaseInfoModel> list = bll.ShowBaseInfo(); if (list.Count != 0) { BaseName.Text = list[0].HomeName; MainHead.Text = list[0].MainHead; BuildDate.Text = list[0].BuildDate.ToString("yyyy年MM月dd日"); BuildArea.Text = list[0].BuildArea.ToString(); Amount.Text = list[0].Amount.ToString(); ParkingArea.Text = list[0].ParkingArea.ToString(); RoadArea.Text = list[0].RoadArea.ToString(); GreenArea.Text = list[0].GreenArea.ToString(); Tel.Text = list[0].Tel; Address.Text = list[0].Address; Introduce.Text = list[0].Memo; } }
public BaseInfoHelper() { user = WebConfig.GetSession(); bll = new BaseInfoBLL(user.Ledger, user.Uid); }