public RestoreForm(Login login) { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // optionSystem = new OptionSystem(); this.login = login; Login.COM_PORT_IS_BUSY = true; }
private void btmSearch_Click(object sender, System.EventArgs e) { DataTable dtStuName = new OptionSystem().GetStuNameByNumber(tetNumber.Text); if (dtStuName != null) { if (dtStuName.Rows.Count > 0) { tetName.Text = dtStuName.Rows[0]["info_stuName"].ToString(); } else { MessageBox.Show("该学号学生不存在!"); } } }