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

📄 prorequire.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 prorequire : System.Web.UI.Page
{
    static string tran;
    static string proty;
    static string city;
    static string userid;
    
    protected void Page_Load(object sender, EventArgs e)
    {
        tran = Session["tr"].ToString();
        proty = Session["ap"].ToString();
        city = Session["ci"].ToString();
        userid = Session["uid"].ToString();
    }
    protected void TextBox4_TextChanged(object sender, EventArgs e)
    {

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

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

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

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int num;
        Random obj;
        obj = new Random();
        num = Convert.ToInt32(obj.Next(1000)) + 1;

        SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=epropertydb;Integrated Security=True");
        conn.Open();
        SqlDataAdapter da1 = new SqlDataAdapter("insert into propertyrequirements values('" + num + "','" + tran + "','" + proty + "','" + TextBox2.Text + "','" + city + "','" + DropDownList1.SelectedItem.ToString() + "','" + TextBox4.Text + "')", conn);
        DataSet ds1 = new DataSet();
        da1.Fill(ds1);

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

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

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

    }
}

⌨️ 快捷键说明

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