private void saveSpecifiedSkillsButton_Click(object sender, EventArgs e) { string [] sArr = skillsIdTextBox.Text.Split(','); int[] skillIds = sArr.Select(int.Parse).ToArray(); UserFullDTO ufDTO = userController.saveSkills(skillIds, userIdSelect.Text); if (ufDTO == null) { MessageBox.Show("Could not save specified skills."); } else { string userDesc = ""; //NOTE: Due to instruction server not working properly author is not sure whether returned object is DetailsFullDTO. PropertyInfo[] fields = typeof(DetailsFullDTO).GetProperties(BindingFlags.NonPublic | BindingFlags.Instance); foreach (var field in fields) { userDesc += field.Name + " : " + field.GetValue(ufDTO) + Environment.NewLine; } MessageBox.Show(userDesc); } this.Close(); }
public DetailsFullDTO(string foStudy, string fName, string ID, string lName, string uni, UserFullDTO User, int yoStudy) { fieldOfStudy = foStudy; firstName = fName; id = ID; lastName = lName; university = uni; user = User; yearOfStudy = yoStudy; }