Beispiel #1
0
        private void button8_Click(object sender, EventArgs e)
        {
            BLL.Stumes stumes      = new BLL.Stumes();
            DataTable  myDatatable = stumes.getAll();

            dataGridView1.DataSource = myDatatable;
        }
Beispiel #2
0
 private void button7_Click(object sender, EventArgs e)
 {
     BLL.Stumes   stumes = new BLL.Stumes();
     Model.Stumes model  = new Model.Stumes();
     if (textBox6.Text == "" || textBox3.Text == "")
     {
         MessageBox.Show("请输入数据");
     }
     else
     {
         model.Name   = textBox6.Text.Trim();
         model.Number = textBox3.Text.Trim();
         DataTable myDatatable = stumes.getmes(model);
         dataGridView1.DataSource = myDatatable;
     }
 }
Beispiel #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            BLL.Stumes   stumes = new BLL.Stumes();
            Model.Stumes model  = new Model.Stumes();
            model.Name     = textBox2.Text.Trim();
            model.Number   = textBox1.Text.Trim();
            model.Major    = textBox4.Text.Trim();
            model.Stuclass = textBox5.Text.Trim();

            string mes = "";

            if (stumes.update(model, UserName, out mes) == true)
            {
                MessageBox.Show("更新成功!");
            }
            else
            {
                MessageBox.Show(mes);
            }
        }
Beispiel #4
0
        //上方第四个按钮,结果查询
        private void button4_Click(object sender, EventArgs e)
        {
            panel1.Visible = false;
            panel2.Visible = false;
            panel5.Visible = false;
            panel6.Visible = true;
            panel1.Size    = panel6.Size;

            BLL.Stumes   stumes = new BLL.Stumes();
            Model.Stumes model  = stumes.select(UserName);

            textBox12.Text = model.Name;
            textBox11.Text = model.Number;
            textBox10.Text = model.Major;
            textBox9.Text  = model.Stuclass;

            BLL.wish   Wish      = new BLL.wish();
            Model.wish wishModel = Wish.select(UserName);

            textBox5.Text = wishModel.First;
            textBox6.Text = wishModel.Second;
            textBox7.Text = wishModel.Third;
            textBox8.Text = wishModel.Result;
        }