private void button1_search_Click(object sender, EventArgs e)
        {
            string  name  = textBox1_name.Text.Trim();
            decimal price = 0;

            if (textBox2_price.Text.Trim() != "")
            {
                price = Decimal.Parse(textBox2_price.Text.Trim());
            }
            decimal price2 = Decimal.MaxValue;

            if (textBox_price2.Text.Trim() != "")
            {
                price2 = Decimal.Parse(textBox_price2.Text.Trim());
            }
            string kind  = comboBox1_kind.Text.Trim();
            string state = textBox_state.Text.Trim();

            HotelManagementBLL.Room obj = new HotelManagementBLL.Room(_dgv);
            obj.Search(name, price, price2, kind, state, checkBox_auto.Checked);
        }
Exemple #2
0
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            string  name  = "";
            decimal price = 0;

            if (textBoxPriceLowLim.Text.Trim() != "")
            {
                price = Decimal.Parse(textBoxPriceLowLim.Text.Trim());
            }
            decimal price2 = Decimal.MaxValue;

            if (textBoxPriceHighLim.Text.Trim() != "")
            {
                price2 = Decimal.Parse(textBoxPriceHighLim.Text.Trim());
            }
            string kind  = comboBox1_kind.Text.Trim();
            string state = "未入住";

            HotelManagementBLL.Room obj = new HotelManagementBLL.Room(dataGridView1);
            obj.Search(name, price, price2, kind, state, false);
        }