Пример #1
0
        private void WindowDoctor_Load(object sender, EventArgs e)
        {
            var PM = new PatientM
            {
                DateTime = dateTimePicker1.Value.ToString()
            };
            var PReg = new PrWRegstr();

            PReg.WritetoFile(PM);
        }
Пример #2
0
        private void registerButton_Click(object sender, EventArgs e)
        {
            var PM = new PatientM {
                Name   = namesTextBox.Text,
                Gender = genderTextBox.Text,
                Age    = ageTextBox.Text
            };
            var PReg = new PrWRegstr();

            PReg.WritetoFile(PM);


            dataGridView1.Rows.Add(namesTextBox.Text, ageTextBox.Text, genderTextBox.Text);
            //обновляем таблицу
            dataGridView1.Refresh();
            namesTextBox.Clear();
            ageTextBox.Clear();
            genderTextBox.Clear();
        }