Esempio n. 1
0
 public void Load()
 {
     List<CStudent> _oStudents = new List<CStudent>();
     CFile oFile = new CFile();
     string sRecords = oFile.Read();
     string[] arStudents = sRecords.Split('|');
     foreach (string sRecord in arStudents)
     {
         CStudent oStudent = new CStudent(sRecord);
         this.Add(oStudent);
     }
 }
Esempio n. 2
0
        public void Load()
        {
            List <CStudent> _oStudents = new List <CStudent>();
            CFile           oFile      = new CFile();
            string          sRecords   = oFile.Read();

            string[] arStudents = sRecords.Split('|');
            foreach (string sRecord in arStudents)
            {
                CStudent oStudent = new CStudent(sRecord);
                this.Add(oStudent);
            }
        }
        private void btnPopulate_Click(object sender, EventArgs e)
        {
            CStudent oStudent = new CStudent();

            txtId.Text = Guid.NewGuid().ToString();
            txtFirstName.Text = "Homer";
            txtLastName.Text = "Simpson";
            txtStudentID.Text = "123456789";
            txtAddr1.Text = "123 Main St.";
            txtAddr2.Text = "Apt. #4";
            txtCity.Text = "Springfield";
            cboState.Text = "IL";
            txtZIP.Text = "34566";
            txtProgram.Text = "Programmer/Analyst";
            txtGPA.Text = "3.45";
        }
        private void btnAddToCollection_Click(object sender, EventArgs e)
        {
            CStudent oStudent = new CStudent();
            Guid oGuid;
            Guid.TryParse(txtId.Text, out oGuid);

            oStudent.Id = oGuid;
            oStudent.StudentId = txtStudentID.Text;
            oStudent.Program = txtProgram.Text;
            oStudent.FirstName = txtFirstName.Text;
            oStudent.LastName = txtLastName.Text;
            oStudent.Address1.City = txtCity.Text;
            oStudent.Address1.State = cboState.Text;
            oStudent.Address1.ZIP = txtZIP.Text;
            oStudent.Address1.StAddress = txtAddr1.Text;

            oStudent.GPA = float.Parse(txtGPA.Text);
            oStudents.Add(oStudent);

            this.Text = oStudents.Count().ToString();

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = oStudents.Students;
        }
 private void btnSpeak_Click(object sender, EventArgs e)
 {
     CStudent oStudent = new CStudent();
     txtSpeak.Text = oStudent.Speak(txtSpeak.Text, false);
     oStudent = null;
 }
Esempio n. 6
0
 public void Add(CStudent oStudent)
 {
     _oStudents.Add(oStudent);
 }
Esempio n. 7
0
 public void Add(CStudent oStudent)
 {
     _oStudents.Add(oStudent);
 }