private void button2_Click(object sender, EventArgs e) //面积 { DataSet ds = new DataSet(); stall_merchant.Stall stall = new stall_merchant.Stall(); if (stall.areaexist(textBox2.Text.ToString())) { ds = stall.selectStallwithArea(textBox2.Text.ToString()); dataGridView1.DataSource = ds; dataGridView1.DataMember = "stall"; } else { MessageBox.Show("该面积的摊位不存在"); } }
private void button2_Click(object sender, EventArgs e) { stall_merchant.Stall stall = new stall_merchant.Stall(); if (stall.areaexist(textBox1.Text.ToString())) { bool result = stall.updateQuotation(textBox1.Text.ToString(), textBox2.Text.ToString()); if (result) { MessageBox.Show("sucessful"); } else { MessageBox.Show("failed"); } } else { MessageBox.Show("该摊位面积不存在"); } }