Ejemplo n.º 1
0
        /// <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 );
        }
Ejemplo n.º 2
0
        /// <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();
        }
Ejemplo n.º 3
0
 /// <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();
 }
Ejemplo n.º 4
0
        /// <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();
        }