public void getDetails(string cn) { rbStudent.Visible = false; rbUser.Visible = false; DataClasses1DataContext db = new DataClasses1DataContext(Tool.ConnectionString); var i = db.AccountSelectByID(this.Tag.ToString()).FirstOrDefault(); if (!i.Level_cn.Equals(3)) { wizard1.SelectedTab = tabPage3; txt_fname.Text = i.Firstname; txt_MName.Text = i.Middlename; txt_Lname.Text = i.Lastname; txt_username.Text = i.Email; cbo_level.Tag = i.Level_cn; txt_username.Text = i.Email; try { DateTime Bd = i.BirrthDate.Value; dtBirthDate.Text = Bd.ToShortDateString(); } catch (Exception ex) { Console.WriteLine(ex.Message); } txtSy.Text = i.SchoolYear; txtStrand.Text = i.Strand; txtGuardiansName.Text = i.GuardianName; txt_password.Text = EncodeString.Decrypt(i.Password); try { pbUser.Image = Tool.bytetoimage(i.AVATAR.ToArray()); } catch (Exception) { pbUser.Image = Properties.Resources.AnonymousPic; } try { FingerPrintScanner.FingerprintTemplate = i.biometrics.ToArray(); } catch (Exception) { } } else { wizard1.SelectedTab = tabPage4; FirstNameStudent.Text = i.Firstname; MiddleNameStudent.Text = i.Middlename; LastNameStudent.Text = i.Lastname; LRNStudent.Text = i.LRN; txtQrCode.Text = i.RFID; cboGrade.Text = i.GradeName; cboSection.Text = i.Section_; cboCourse.Text = i.CourseName; txtSectionOther.Text = i.SectionOther; txtGradeOther.Text = i.GradeName; PhoneNumberStudent.Text = i.PhoneNo; txtGuardiansName.Text = i.GuardianName; string schedule = i.Schedule; string[] scheduleSplited = schedule.Split('/'); dt_TimeIN.Text = scheduleSplited[0]; dt_TimeOUT.Text = scheduleSplited[1]; txtAdviser.Text = i.Adviser; try { pbStudent.Image = Tool.bytetoimage(i.AVATAR.ToArray()); } catch (Exception) { pbStudent.Image = Properties.Resources.AnonymousPic; } try { FingerPrintScanner.FingerprintTemplate = i.biometrics.ToArray(); } catch (Exception) { } } }