Пример #1
0
        private void button1_Click(object sender, EventArgs e) //更改摊位信息
        {
            if (textBox1.Text == String.Empty)                 //输入不能为空
            {
                MessageBox.Show("输入不能为空!");
                return;
            }
            string stall_id = textBox1.Text.ToString();
            Stall  stall    = new Stall();

            if (stall.stallexist(stall_id))
            {
                sForm2_update f2     = new sForm2_update();
                bool          result = stall.showStall(stall_id);
                if (result)
                {
                    {
                        f2.Form2showStall(stall_id, stall.merchant_id, stall.staff_id, stall.area, stall.start_time, stall.end_time, stall.rent_money, stall.price);
                    }
                    this.Hide();
                    f2.ShowDialog();
                    this.Close();
                }
                else
                {
                    MessageBox.Show("failed");
                }
            }
            else
            {
                MessageBox.Show("该摊位不存在");
            }
        }
Пример #2
0
 public sForm1_main()
 {
     InitializeComponent();
     sForm2_update form2_search_result = new sForm2_update();
 }