private void DataLoad() { try { dataSet = member.SelectUserInfo(UserId); DataTable dt = dataSet.Tables[0]; DataRow dr = dt.Rows[0]; EduNum = dr["edunum"].ToString(); this.lblName.Text = "이름 : " + dr["name"].ToString(); this.lblEduNum.Text = "학번 : " + EduNum; this.lblBirth.Text = "생년월일 : " + dr["birth"].ToString(); this.lblEmail.Text = "이메일 : " + dr["email"].ToString(); this.lblPhone.Text = "핸드폰 : " + dr["phone"].ToString(); dataSet = subject.SelectSubject(EduNum); dt = dataSet.Tables[0]; foreach (DataRow row in dt.Rows) { foreach (var item in row.ItemArray) { subtmp.Add(item.ToString()); } } } catch (Exception e) { Console.WriteLine("DataLoad_Error : " + e.Message); } }
private void Form3_Load(object sender, EventArgs e) { member = new ProMember(); //member = new OraMember(); txtBirth.Select(); dataSet = member.SelectUserInfo(UserId); DataTable dt = dataSet.Tables[0]; DataRow dr = dt.Rows[0]; this.txtName.Text = dr["name"].ToString(); this.txtEduNum.Text = dr["edunum"].ToString(); this.txtBirth.Text = dr["birth"].ToString(); this.txtEmail.Text = dr["email"].ToString(); this.txtPhone.Text = dr["phone"].ToString(); }