Exemple #1
0
        public frm_student_information_entry_guardian(int StudentID)
        {
            InitializeComponent();
            _StudentID = StudentID;
            _guardian  = StudentInfo.GetStudentGuardian(_StudentID);

            if (_guardian.StudentGuardianID == 0)
            {
                saving = SavingOptions.INSERT;
            }
            else
            {
                saving = SavingOptions.UPDATE;
            }


            txtMotherName.Text       = _guardian.MotherName;
            txtMotherMobile.Text     = _guardian.MotherMobile;
            txtFatherName.Text       = _guardian.FatherName;
            txtFatherMobile.Text     = _guardian.FatherMobile;
            txtGuardianName.Text     = _guardian.GuardianName;
            txtGuardianMobile.Text   = _guardian.GuardianMobile;
            txtGuardianRelation.Text = _guardian.GuardianRelation;

            if (txtGuardianMobile.Text == txtMotherMobile.Text)
            {
                rbMotherGuardian.Checked = true;
            }
            else if (txtGuardianMobile.Text == txtFatherMobile.Text)
            {
                rbFatherGuardian.Checked = true;
            }
            else
            {
                rbOtherGuardian.Checked = true;
            }
        }