⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 land.aspx.cs

📁 its a website on property dealing made in c# and .net framework.. the database is missing though.
💻 CS
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class land : System.Web.UI.Page
{
    static string city;
    static string transaction;
    static string propertytype;
    static string area;
    static string price;
    static string locality;
    static string address;
    static int propid;
    static string userid;
   
    protected void Page_Load(object sender, EventArgs e)
    {
        transaction = Session["t"].ToString();
        city = Session["c"].ToString();
        area = Session["area"].ToString();
        price = Session["price"].ToString();
        locality = Session["locality"].ToString();
        address = Session["address"].ToString();
        propertytype = Session["a"].ToString(); ;
        propid = Convert.ToInt32(Session["prop"]);
        userid = Session["uid"].ToString();

    }
    protected void TextBox8_TextChanged(object sender, EventArgs e)
    {

    }
    protected void TextBox7_TextChanged(object sender, EventArgs e)
    {

    }
    protected void TextBox6_TextChanged(object sender, EventArgs e)
    {

    }
        protected void TextBox5_TextChanged(object sender, EventArgs e)
        {


    }
     protected void TextBox4_TextChanged(object sender, EventArgs e)
    {

    }
     protected void TextBox9_TextChanged(object sender, EventArgs e)
    {

    }
    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }
    
    protected void TextBox2_TextChanged1(object sender, EventArgs e)
    {

    }
   
   
  
    protected void Button1_Click(object sender, EventArgs e)
    {
        SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=epropertydb;Integrated Security=True");
        conn.Open();

        SqlDataAdapter da = new SqlDataAdapter("insert into residentialland (propertyid,facing,shortdescription,annualdues,electricalsupply,railwaydistance,schooldistance,busstopdistance,hospitaldistance,photourl) values ('" + propid + "','" + DropDownList4.SelectedItem.ToString() + "','" + TextBox8.Text + "','" + DropDownList2.SelectedItem.ToString() + "','" + DropDownList1.SelectedValue.ToString() + "','" + TextBox5.Text + "','" + TextBox7.Text + "','" + TextBox4.Text + "','" + TextBox6.Text + "','" + FileUpload1.FileName + "')", conn);
        DataSet ds = new DataSet();
        da.Fill(ds);

        SqlDataAdapter da1 = new SqlDataAdapter("insert into propertyforsalerent values('" + propid + "','" + transaction + "','" + propertytype + "','" + area + "','" + city + "','" + price + "','" + locality + "','" + address + "')", conn);
        DataSet ds1 = new DataSet();
        da1.Fill(ds1);

        SqlDataAdapter da2 = new SqlDataAdapter("insert into propertyowner (userid,propertyid) values ('"+userid+"','" + propid + "')", conn);
        DataSet ds2 = new DataSet();
        da2.Fill(ds2);


        conn.Close();
        Response.Redirect("thank.aspx");

        
    }



    protected void B1_Click(object sender, EventArgs e)
    {

    }
    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
}

    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -