protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { Response.Redirect("Login.aspx"); } if (!IsPostBack) { if (Request.QueryString["pid"] != null) { lblPropertyId.Text = Request.QueryString["pid"].ToString(); string quer = "select * from Property_info where Prop_id='" + Request.QueryString["pid"].ToString() + "'"; DataTable dt = new DataTable(); dt = db.GetDataTableByQuery(quer); if (dt.Rows.Count > 0) { lblBooking.Text = dt.Rows[0]["Booking_Price"].ToString(); } } else if (Request.QueryString["sid"] != null) { lblPropertyId.Text = Request.QueryString["sid"].ToString(); string quer = "select * from SellerUpload_Property where Sell_id='" + Request.QueryString["sid"].ToString() + "'"; DataTable dt = new DataTable(); dt = db.GetDataTableByQuery(quer); if (dt.Rows.Count > 0) { lblBooking.Text = dt.Rows[0]["Booking_Price"].ToString(); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["pid"] != null) { string query = "Select * from Property_info where Prop_id='" + Request.QueryString["pid"].ToString() + "'"; DataTable dt = new DataTable(); dt = db.GetDataTableByQuery(query); if (dt.Rows.Count > 0) { Image1.ImageUrl = dt.Rows[0]["Image1"].ToString(); Image2.ImageUrl = dt.Rows[0]["Image2"].ToString(); Image3.ImageUrl = dt.Rows[0]["Image3"].ToString(); Image4.ImageUrl = dt.Rows[0]["Image4"].ToString(); LblPropName.Text = dt.Rows[0]["Property_Name"].ToString(); LblAddress.Text = dt.Rows[0]["Address"].ToString(); LblBHK.Text = dt.Rows[0]["BHK"].ToString(); LblFLoor.Text = dt.Rows[0]["Floor"].ToString(); LblWashroom.Text = dt.Rows[0]["Washroom"].ToString(); LblBedroom.Text = dt.Rows[0]["hall"].ToString(); LblHall.Text = dt.Rows[0]["hall"].ToString(); LblKitchen.Text = dt.Rows[0]["kitchen"].ToString(); LblDesc.Text = dt.Rows[0]["Description"].ToString(); lblPrice.Text = dt.Rows[0]["Price"].ToString(); lblBook.Text = dt.Rows[0]["Booking_Price"].ToString(); lblrentstatus.Text = dt.Rows[0]["Rent"].ToString(); LabelRent.Text = dt.Rows[0]["Rent_amount"].ToString(); } } else if (Request.QueryString["sid"] != null) { string query = "Select * from SellerUpload_Property where Sell_id='" + Request.QueryString["sid"].ToString() + "'"; DataTable dt = new DataTable(); dt = db.GetDataTableByQuery(query); if (dt.Rows.Count > 0) { Image1.ImageUrl = dt.Rows[0]["Image1"].ToString(); Image2.ImageUrl = dt.Rows[0]["Image2"].ToString(); Image3.ImageUrl = dt.Rows[0]["Image3"].ToString(); Image4.ImageUrl = dt.Rows[0]["Image4"].ToString(); LblPropName.Text = dt.Rows[0]["Property_Name"].ToString(); LblAddress.Text = dt.Rows[0]["Address"].ToString(); LblBHK.Text = dt.Rows[0]["BHK"].ToString(); LblFLoor.Text = dt.Rows[0]["Floor"].ToString(); LblWashroom.Text = dt.Rows[0]["Washroom"].ToString(); LblBedroom.Text = dt.Rows[0]["hall"].ToString(); LblHall.Text = dt.Rows[0]["hall"].ToString(); LblKitchen.Text = dt.Rows[0]["kitchen"].ToString(); LblDesc.Text = dt.Rows[0]["Description"].ToString(); lblPrice.Text = dt.Rows[0]["Price"].ToString(); lblBook.Text = dt.Rows[0]["Booking_Price"].ToString(); btnRent.Visible = false; lblrentstatus.Visible = false; LabelRent.Visible = false; } } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { Response.Redirect("Login.aspx"); } if (Request.QueryString["pid"] != null) { lblProperty.Text = Request.QueryString["pid"].ToString(); string quer = "select * from Property_info where Prop_id='" + Request.QueryString["pid"].ToString() + "'"; DataTable dt = new DataTable(); dt = db.GetDataTableByQuery(quer); if (dt.Rows.Count > 0) { lblRentAmount.Text = dt.Rows[0]["Rent_Amount"].ToString(); } } }