Exemplo n.º 1
0
        public OneOfManyForm(StudentData student)
        {
            this.student = student;

            InitializeComponent();
            SetupValidators();
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter = "xml files(*.xml)|*.xml";

            if (ofd.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            XmlSerializer serializer = new XmlSerializer(typeof(StudentData));
            var           sw         = new FileStream(ofd.FileName, FileMode.Open);

            sw.Close();
            StudentData student = (StudentData)serializer.Deserialize(sw);

            textBox1.Text  = student.Name;
            textBox2.Text  = student.Gender.ToString();
            textBox3.Text  = student.BirthDay.Date.ToString();
            textBox4.Text  = student.Passport;
            textBox5.Text  = student.City;
            textBox6.Text  = student.Address;
            textBox7.Text  = student.Phone;
            textBox8.Text  = student.Email;
            textBox9.Text  = student.Track;
            textBox10.Text = student.Course.ToString();
            textBox11.Text = student.Group.ToString();
            sw.Close();
        }
Exemplo n.º 3
0
 public PersonalDatas(StudentData student)
 {
     this.student = student;
     InitializeComponent();
     error.BlinkRate    = 2;
     buttonPrev.Enabled = false;
 }
Exemplo n.º 4
0
 public StudyDatas(StudentData student)
 {
     InitializeComponent();
     this.student    = student;
     error.BlinkRate = 2;
 }
Exemplo n.º 5
0
 public ContactDatas(StudentData student)
 {
     this.student = student;
     InitializeComponent();
     error.BlinkRate = 2;
 }