hourse/hourse_modify.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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

using HourseRentSystem.Model;
using HourseRentSystem.BLL;

public partial class hourse_hourse_modify : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["username"] == null)
        {
            Response.Write("<script>alert('请登录系统!');top.location.href='../login.aspx';</script>");
            return;
        }


        /*初始化房屋信息显示*/ 
        if (!IsPostBack)
        {
            int hourseId = Int32.Parse(Request.QueryString["hourseId"]);
            HourseBLL hourseBll = new HourseBLL();
            Hourse hourse = hourseBll.GetHourseById(hourseId);
            /*显示房屋信息各个属性*/
            this.zujin.Text = hourse.getZujin().ToString();
            this.huxing.Text = hourse.getHuxing();
            this.mianji.Text = hourse.getMianji().ToString();
            this.zhuangxiu.Text = hourse.getZhuangxiu();
            this.leixing.Text = hourse.getLeixing();
            this.louceng.Text = hourse.getLouceng();
            this.quyu.Text = hourse.getQuyu();
            this.xiaoqu.Text = hourse.getXiaoqu();
            this.dizhi.Text = hourse.getDizhi();
            this.chuangFlag.Checked = hourse.getChuangFlag() == 1;
            this.dianhuaFlag.Checked = hourse.getDianhuaFlag() == 1;
            this.kongtiaoFlag.Checked = hourse.getKongtiaoFlag() == 1;
            this.bingxiangFlag.Checked = hourse.getBingxiangFlag() == 1;
            this.reshuiqiFlag.Checked = hourse.getReshuiqiFlag() == 1;
            this.xiyijiFlag.Checked = hourse.getXiyijiFlag() == 1;
            this.kuandaiFlag.Checked = hourse.getKuandaiFlag() == 1;
            this.dianshiFlag.Checked = hourse.getDianshiFlag() == 1; 

        }

    }
    protected void Btn_Modify_Click(object sender, EventArgs e)
    {
        /*建立数据模型*/
        Hourse hourse = new Hourse();
        try
        {
            /*取得房屋信息*/
            int hourseId = Int32.Parse(Request.QueryString["hourseId"]);
            hourse.setHourseId(hourseId);
            hourse.setZujin(Convert.ToSingle(this.zujin.Text));
            hourse.setHuxing(this.huxing.Text);
后面还有 34 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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