Web/Admin/HouseDetail.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RentHouseModel;
using RentHouseBLL;

public partial class Admin_HouseDetail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = string.Empty;
        if (Request.QueryString["HouseID"] == null)
            id = "";
        else
            id = Request.QueryString["HouseID"].ToString().Trim();
        if (id == "")
        {
            Response.Write("<font color='red'>无效的传值</font>返回<a href='Admin/Index.aspx'>后台首页</a>");
            Response.End();
        }
        if (!Page.IsPostBack)
        {
            House house = HouseManager.GetHouseByID(id);
            Picture pic = PictureManager.GetPictureByHouseID(id);
            imgPic.ImageUrl = pic.Img1;
            img1.ImageUrl = pic.Img1;
            img2.ImageUrl = pic.Img2;
            img3.ImageUrl = pic.Img3;
            img4.ImageUrl = pic.Img4;
            img5.ImageUrl = pic.Img5;

            lblID.Text = house.ID;
            lblFbDate.Text = house.FbDate;
            lblHire.Text = house.Hire.ToString();
            lblPayType.Text = house.PayType;
            lblSituation.Text = house.Situation;
            lblStyle.Text = house.Style;
            lblMode.Text = house.Mode;
            lblStatus.Text = house.Status;
            lblArea.Text = house.Area.ToString();
            lblFloor.Text = house.Floor;
            lblCommunity.Text = house.Community;
            lblAddress.Text = house.Address;
            lblAllocation.Text = house.Allocation;
            lblDescription.Text = house.Description;

            imgPhoto.ImageUrl ="../"+ house.User.Photo;
            lblUserName.Text = house.User.UserName;
            lblPhone.Text = house.User.Phone;
            lblUserStatus.Text = house.User.Status;
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。