private void button1_Click(object sender, EventArgs e) { string zh = textBox1.Text; string mm = textBox2.Text; RepastModel.Users u = new RepastModel.Users(); u.U_name = zh; u.U_password = mm; RepastBLL.wordsManager w = new RepastBLL.wordsManager(); bool b = w.login(u); if (b) { MessageBox.Show("登录成功"); namea = u.U_name; //Main m = new Main(); //m.Show(); dh d = new dh(); namea = textBox1.Text; d.Show(); } else { MessageBox.Show("登录失败"); } }
private void button1_Click(object sender, EventArgs e) { string name = textBox1.Text.Trim(); RepastBLL.wordsManager wm = new RepastBLL.wordsManager(); RepastModel.Coursedetails c = wm.byname(name); lbid.Text = c.Cd_id.ToString(); lbname.Text = c.Cd_name.ToString(); lbmean.Text = c.Cd_mean.ToString(); lbsentence.Text = c.Cd_sentence.ToString(); }