//private void SearchButton_Click(object sender, EventArgs e) //{ // int realtyType = Convert.ToInt32(RealtyTypeComboBox.SelectedValue); // int tradeType = Convert.ToInt32(TradeTypeComboBox.SelectedValue); // float minPrice = PriceMinTextBox.Value; // float maxPrice = PriceMaxTextBox.Value; // float minArea = AreaMinTextBox.Value; // float maxArea = AreaMaxTextBox.Value; // float minLandArea = LandAreaMinTextBox.Value; // float maxLandArea = LandAreaMaxTextBox.Value; // var elements = DistrictCheckedListBox.CheckedItems; // string districts = ManagerForm.CreateParameters(DistrictCheckedListBox); // string rooms = ManagerForm.CreateParameters(RoomsCheckedListBox); // dataGridView1.DataSource = Query.SelectEstateObjects(realtyType, tradeType, minPrice, maxPrice, minArea, maxArea, minLandArea, maxLandArea, districts, rooms, SqlConnection); //} private void SearchButton_Click_1(object sender, EventArgs e) { int realtyType = Convert.ToInt32(RealtyTypeComboBox.SelectedValue); int tradeType = Convert.ToInt32(TradeTypeComboBox.SelectedValue); float minPrice = PriceMinTextBox.Value; float maxPrice = PriceMaxTextBox.Value; float minArea = AreaMinTextBox.Value; float maxArea = AreaMaxTextBox.Value; float minLandArea = LandAreaMinTextBox.Value; float maxLandArea = LandAreaMaxTextBox.Value; var elements = DistrictCheckedListBox.CheckedItems; string districts = ManagerForm.CreateParameters(DistrictCheckedListBox); string rooms = ManagerForm.CreateParameters(RoomsCheckedListBox); dataGridView1.DataSource = Query.SelectEstateObjects(realtyType, tradeType, minPrice, maxPrice, minArea, maxArea, minLandArea, maxLandArea, districts, rooms, SqlConnection); }
public void DataLoad() { int realtyType = Convert.ToInt32(RealtyTypeComboBox.SelectedValue); int tradeType = Convert.ToInt32(TradeTypeComboBox.SelectedValue); float minPrice = PriceMinTextBox.Value; float maxPrice = PriceMaxTextBox.Value; float minArea = AreaMinTextBox.Value; float maxArea = AreaMaxTextBox.Value; float minLandArea = LandAreaMinTextBox.Value; float maxLandArea = LandAreaMaxTextBox.Value; var elements = DistrictCheckedListBox.CheckedItems; string districts = ManagerForm.CreateParameters(DistrictCheckedListBox); string rooms = ManagerForm.CreateParameters(RoomsCheckedListBox); if (notation == Notation.ManagerRequests) { dataGridView1.DataSource = ShowTable.DisplayCurrentRequests(SqlConnection); } else { dataGridView1.DataSource = Query.SelectEstateObjects(realtyType, tradeType, minPrice, maxPrice, minArea, maxArea, minLandArea, maxLandArea, districts, rooms, SqlConnection); } }