Exemple #1
0
 public frmParentReport(Parent parent)
 {
     InitializeComponent();
     //this.Text = title;
     this.parent = parent;
     data = new DataContainer();
 }
Exemple #2
0
 public frmParentReport(Parent parent, DataContainer data)
 {
     InitializeComponent();
     //this.Text = title;
     this.parent = parent;
     this.data = data;
 }
Exemple #3
0
        public frmMainMenu()
        {
            InitializeComponent();
            data = new DataContainer();
            db = new Database();

            childIDList = new List<int>();
            staffIDList = new List<string>();
            parentIDList = new List<int>();
            contactIDList = new List<int>();
            //data.loadItems();
        }
Exemple #4
0
 private void btnAddMedical_Click(object sender, EventArgs e)
 {
     new frmMedicalInformation().ShowDialog();
     data = new DataContainer();
 }
Exemple #5
0
        private void btnAddParent_Click(object sender, EventArgs e)
        {
            frmEditParent addParentForm = new frmEditParent("Add a Parent");
            addParentForm.ShowDialog();

            data = new DataContainer(); //Refresh Data from DB
            ChildToAdd.ParentsIDs[0] = data.parents[data.parents.Count - 1].ParentID;
        }
Exemple #6
0
        //TODO: Make Child Form so we can keep reference to created Parent
        private void btnAddEC_Click(object sender, EventArgs e)
        {
            new frmEditParent("Add an Emergency Contact").ShowDialog();

            data = new DataContainer(); //Refresh Data from DB
            ChildToAdd.EmergencyContactsIDs[0] = data.contacts[(data.contacts.Count - 1)].ContactID;
        }
Exemple #7
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     frmEditChild editForm = new frmEditChild(child);
     editForm.ShowDialog();
     data = new DataContainer();
 }
Exemple #8
0
 public frmChildReport(Child childtoDisplay,DataContainer data)
 {
     InitializeComponent();
     child = childtoDisplay;
     this.data = data;
 }
Exemple #9
0
 public frmChildReport(Child childtoDisplay)
 {
     InitializeComponent();
     child = childtoDisplay;
     data = new DataContainer();
 }
Exemple #10
0
 private void btnAddStaff_Click(object sender, EventArgs e)
 {
     new frmEditEmployee().ShowDialog();
     data = new DataContainer();
 }
Exemple #11
0
 //Add new persons to database...
 private void btnAddParent_Click(object sender, EventArgs e)
 {
     new frmEditParent("Add a Parent").ShowDialog();
     data = new DataContainer();
 }
Exemple #12
0
 private void btnAddChild_Click(object sender, EventArgs e)
 {
     new frmEditChild().ShowDialog();
     data = new DataContainer();
 }
Exemple #13
0
        private void button1_Click(object sender, EventArgs e)
        {
            data = new DataContainer();

            //Refresh children
            lstChildren.Items.Clear();
            childIDList = new List<int>();
            foreach (Child child in data.children)
            {
                lstChildren.Items.Add(child.FirstName + " " + child.LastName);
                childIDList.Add(child.ChildID);
            }

            //Refresh parents
            lstParents.Items.Clear();
            parentIDList = new List<int>();
            foreach (Parent parent in data.parents)
            {
                lstParents.Items.Add(parent.FirstName + " " + parent.LastName);
                parentIDList.Add(parent.ParentID);
            }

            //refresh staff
            lstStaff.Items.Clear();
            staffIDList = new List<string>();
            foreach (Employee employee in data.employees)
            {
                lstStaff.Items.Add(employee.FirstName + " " + employee.LastName);
                staffIDList.Add(employee.NINo);
            }
        }