Example #1
0
        public void LoadFullList()
        {
            ep.SetError(dataGridView1, "");
            try
            {
                dataGridView1.AutoGenerateColumns = false;
                DataBase db;
                if (rdStudents.Checked)
                {
                    db = new StudenData();
                }
                else
                {
                    db = new StaffData();
                }

                _fullPersonList          = db.GetList();
                _bs.DataSource           = _fullPersonList;
                dataGridView1.DataSource = _bs.DataSource;

                if (Application.OpenForms["MDIMainForm"] as MDIMainForm != null)
                {
                    MDIMainForm mfrm = Application.OpenForms["MDIMainForm"] as MDIMainForm;
                }
                lblJobCount.Text = "Student Count - " + dataGridView1.Rows.Count.ToString();
            }
            catch (Exception ex)
            {
                ep.SetError(dataGridView1, ex.Message);
            }
        }
Example #2
0
        public void LoadFullList()
        {
            ep.SetError(dataGridView1, "");
            try
            {
                DataBase db;
                if (rbAllStudents.Checked)
                {
                    db = new StudenData();
                }
                else
                {
                    db = new StaffData();
                }

                _allStudentList      = db.GetList().ConvertAll(x => x as Student);
                _filteredStudentList = _allStudentList;
            }
            catch (Exception ex)
            {
                ep.SetError(dataGridView1, ex.Message);
            }
        }
Example #3
0
        private void SaveChanges()
        {
            StudenData sd = new StudenData(DBCommand.TransactionType.WithTransaction);

            sd.Update(_student);
        }