private void Setting_Load(object sender, EventArgs e) { examiner = ExamAdministratorManager.GetByID(UserID); txbFirstName.Text = examiner.FirstName.ToString(); txbLastName.Text = examiner.LastName.ToString(); txbEmail.Text = examiner.ExaminerEmail.ToString(); }
private void Reset() { DisableButton(); leftBorderBtn.Visible = false; iconCurrentChildForm.IconChar = IconChar.Home; iconCurrentChildForm.IconColor = Color.FromArgb(128, 128, 255); lblTitleChildForm.Text = "Home"; currentChildForm.Close(); examAdmin = ExamAdministratorManager.GetByID(UserID); lblWelcom.Text = "Welcome, " + "\n" + "\n" + examAdmin.FirstName.ToString() + " " + examAdmin.LastName.ToString(); }
public static void Update(ExamAdministrator examadmin) { var entity = db.ExamAdministrators.SingleOrDefault(e => e.ExaminerID == examadmin.ExaminerID); db.Entry(entity).CurrentValues.SetValues(examadmin); db.SaveChanges(); //catch (DbEntityValidationException ex) //{ // foreach (var errors in ex.EntityValidationErrors) // { // foreach (var validationError in errors.ValidationErrors) // { // // get the error message // string errorMessage = validationError.ErrorMessage; // } // } //} }
private void Home_Load(object sender, EventArgs e) { examAdmin = ExamAdministratorManager.GetByID(UserID); lblWelcom.Text = "Welcome, " + "\n" + "\n" + examAdmin.FirstName.ToString() + " " + examAdmin.LastName.ToString(); }