//New Property
if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_type='New Property'", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_type='New Property'", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_type='New Property' ", con);
}
//New-Category!=All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='New Property'", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='New Property'", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 and prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category Type!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-State!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
//New- City!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership) and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
//new- Category,Category Type ! All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category,State!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category,City!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3 ) and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3 ) and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3 ) and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category Type,State!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category Type,City!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-State,City!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category,Category Type,State!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category,Category Type,City
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category,State,City!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category Type,State,City
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
//New-Category,Category Type,State,City!All
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 1 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='New Property' ", con);
}
//Resale Property
if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_type='Resale Property'", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3)and prop_type='Resale Property' ", con);
}
//resale-Category!=All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='Resale Property'", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='Resale Property'", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 and prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//Resale-Category Type!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//Resale-State!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//resale- City!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership) and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//resale- Category,Category Type ! All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//Resale-Category,State!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//resale-Category,City!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3 ) and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3 ) and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3 ) and prop_cat='" + DropDownList3_category.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "' and prop_type='Resale Property'", con);
}
//resale-Category Type,State!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//resale-Category Type,City!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//Resale-State,City!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//Resale-Category,Category Type,State!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text == "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//resale-Category,Category Type,City
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "' and prop_type='Resale Property'", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text == "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//resale-Category,State,City!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text == "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//Resale-Category Type,State,City
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text == "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
//Resale-Category,Category Type,State,City!All
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.SelectedIndex == -1)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=1 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=2 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and prop_ownership=3 and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == false)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == false && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == false && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
else if (RadioButtonList1.SelectedIndex == 2 && DropDownList3_category.SelectedItem.Text != "All" && DropDownList1_categorytype.SelectedItem.Text != "All" && DropDownList_state.SelectedItem.Text != "All" && DropDownList_city.SelectedItem.Text != "All" && CheckBoxList1.Items[0].Selected == true && CheckBoxList1.Items[1].Selected == true && CheckBoxList1.Items[2].Selected == true)
{
cmd =
new SqlCommand("select a.img,a.prop_name,b.state_name,c.city_name,d.price,d.prop_price_type,d.builtup_area,d.carpet_area,d.bedrooms,d.prop_desc,e.ownership_name from tbl_image_entry a,tbl_state_new b,tbl_city_new c,tbl_new_sale_property d,tbl_ownership_master e where a.user_id=d.user_id and b.state_id=d.state and c.city_id=d.city and a.prop_name=d.prop_name and e.ownership_id=d.prop_ownership and (prop_ownership=1 or prop_ownership=2 or prop_ownership=3) and prop_cat='" + DropDownList3_category.SelectedValue + "' and prop_cat_type='" + DropDownList1_categorytype.SelectedValue + "' and state='" + DropDownList_state.SelectedValue + "' and city='" + DropDownList_city.SelectedValue + "'and prop_type='Resale Property' ", con);
}
DataSet ds = new DataSet();
SqlDataAdapter adap = new SqlDataAdapter(cmd);
adap.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();