private void Form2_Load(object sender, EventArgs e) { Connection conObj = new Connection(); try { SqlDataReader myReader = null; SqlCommand myCommand = new SqlCommand("select StNo,firstName,lastName,year,GPA,contactNo,email from STUDENT", conObj.connect()); myReader = myCommand.ExecuteReader(); while (myReader.Read()) { lblStNo.Text = myReader["StNo"].ToString(); lblFirstName.Text = myReader["firstName"].ToString(); lblLastName.Text = myReader["lastName"].ToString(); lblLevel.Text = myReader["year"].ToString(); lblGPA.Text = myReader["GPA"].ToString(); lblContactNo.Text = myReader["contactNo"].ToString(); lblEmail.Text = myReader["email"].ToString(); } } catch (Exception Ex) { MessageBox.Show(Ex.ToString()); } ProfilePanel.BringToFront(); }
private void profileToolStripMenuItem_Click(object sender, EventArgs e) { ProfilePanel.BringToFront(); }
private void Form1_Load(object sender, EventArgs e) { ProfilePanel.BringToFront(); this.Text = "Dr. Chathura Rajapaksha"; }
private void Form1_Load(object sender, EventArgs e) { ProfilePanel.BringToFront(); this.Text = "IM/2014/027"; }
private void frmstudents_Load(object sender, EventArgs e) { ProfilePanel.BringToFront(); }