Beispiel #1
0
    protected void FillGrid()
    {
        con.Open();
        string query = "select Land_id,Name,CONVERT(varchar,Area)+' '+Unit as 'Area' ,Price,City from Land where City = '" + City + "' and Price between " + Min_Prc + " and " + Max_Prc;

        cmd             = new SqlCommand();
        cmd.CommandText = query;
        cmd.Connection  = con;
        da  = new SqlDataAdapter(cmd);
        ds2 = new DataSet();
        da.Fill(ds2, "Land");
        GV_QckFnd.DataSource = ds2.Tables["Land"];
        GV_QckFnd.DataBind();
        con.Close();
    }
Beispiel #2
0
    protected void FillGrid()
    {
        con.Open();
        string query = "select Home_id,Name,Area,Price,City,Category from Home where City = '" + City + "' and Price between " + Min_Prc + " and " + Max_Prc;

        cmd             = new SqlCommand();
        cmd.CommandText = query;
        cmd.Connection  = con;
        da  = new SqlDataAdapter(cmd);
        ds1 = new DataSet();
        da.Fill(ds1, "Home");
        GV_QckFnd.DataSource = ds1.Tables["Home"];;
        GV_QckFnd.DataBind();
        con.Close();
    }