// Constructor
 public EnrollmentForm(AddStudent addStudentForm)
 {
     this.addStudentForm = addStudentForm;
     type = this.addStudentForm.type;
     InitializeComponent();
     Data = new AppData();
     ExchangeData(true);                                 // Init data with default control values;
     Data.OnChange += delegate { ExchangeData(false); }; // Track data changes to keep the form synchronized
 }
        public AddGuardiancs(AddStudent addStudentForm)
        {
            InitializeComponent();

            if (addStudentForm.type == "Add")
            {
                searchBox.Visible = false;
                newStdGuardUpdateBtn.Visible = false;
            }
            else if (addStudentForm.type == "Existing")
            {
                newStdGuardSaveBtn.Visible = false;
                newStdGuarCnic.Enabled = false;
                newStdGuarName.Enabled = false;
                newStdGuarRel.Enabled = false;
                newStdGurNo.Enabled = false;
                newStdGuardEmailTxt.Enabled = false;
                newStdGuardAddressTxt.Enabled = false;
            }

            this.addStudentForm = addStudentForm;
        }
Esempio n. 3
0
 private void metroTile2_Click(object sender, EventArgs e)
 {
     AddStudent ads = new AddStudent();
     ads.Show();
 }