/// <summary> /// Add Students to the system /// </summary> /// <history> /// <Created 5 May 2014>Arun Gopinath</Created> /// <Modified 5 May 2014></Modified> /// </history> private void AddStudentsToSystem () { int inValidEntries = 0; int added = 0; Validator inputValidator = new Validator ( this ); foreach ( Student s in importStudentList ) { string screenName = s.ScreenName; string err; if ( inputValidator.IsScreenNameValid ( screenName, out err ) == false ) { inValidEntries++; } else { AddNewStudent ( s ); added++; } } string msg = "Added " + added + " students. " + "Failed to add " + inValidEntries + " Students to the System."; MessageBox.Show ( msg, "Select Input file", MessageBoxButtons.OK, MessageBoxIcon.Information ); }
/// <summary> /// Instantiate frmAddProblemSet; tie this form to a control object /// </summary> /// <author> Jeff Bunce </author> public frmAddProblemSet(CtrlAdmin mmControl) { InitializeComponent(); control = mmControl; problemSetBindingSource.DataSource = control.ProblemSetList; inputValidator = new Validator ( control ); this.SetupTooltips(); }
/// <summary> /// Constructor /// </summary> /// <param name="mmControl">Controller object</param> /// <history> /// <Created 20 April 2014>Arun Gopinath</Created> /// <Modified 20 April 2014></Modified> /// </history> public frmAddUser ( CtrlAdmin ctrl ) { InitializeComponent (); control = ctrl; inputValidator = new Validator ( control ); studentBindingSource.DataSource = control.StudentList; this.SetupTooltips(); }
/// <summary> /// Constructor /// </summary> /// <param name="mmControl">Controller object</param> /// <history> /// <Created 20 April 2014>Arun Gopinath</Created> /// <Modified 20 April 2014></Modified> /// </history> public frmEditUser ( CtrlAdmin ctrl ) { control = ctrl; InitializeComponent (); inputValidator = new Validator ( ctrl ); this.SetupTooltips(); }