//--------<add(Type type, TypeItem ti) implement opreation to add everything we need into table>------- public void add(Type type, File file, Namespace ns, T_name t_Name) { TypeItem temp; temp.file = file; temp.namesp = ns; temp.typename = t_Name; add(type, temp); }
private void ShowInfo() //选中的编号教师信息显示 { string sql = String.Format("select * from 个人信息_教师 where 编号='{0}'", MySystem.Program.UserNo); using (SqlConnection conn = new SqlConnection(connString)) { conn.Open(); SqlCommand comm = new SqlCommand(sql, conn); SqlDataReader reader = comm.ExecuteReader(); if (reader.Read()) //学生已注册过 { T_name.Text = reader.GetString(1); string sex = reader.GetString(2); if (sex == "男") { rdoMale.Checked = true; } else { rdoFemale.Checked = true; } T_zhicheng.Text = reader.GetString(3); T_xuewei.Text = reader.GetString(4); T_Brithday.Value = reader.GetDateTime(5); T_Year.Value = reader.GetInt32(6); T_dept.Text = reader.GetString(7); string C_no = reader.GetString(8); if (C_no == "暂无") { T_class.Text = C_no; } else { Search_Class_name(C_no); } } else { MessageBox.Show("您还没有进行注册!请先注册个人信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); T_name.Focus(); } } Dept_old = T_dept.Text; Lock_Control(); }