Example #1
0
        public PatientHistory(Patient patient, Patient_history patient_History)
        {
            InitializeComponent();
            var materialSkinManager = MaterialSkinManager.Instance;

            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.Blue400, Primary.Blue700, Primary.BlueGrey500, Accent.LightBlue100, TextShade.WHITE);
            if (patient.Pasport_ID == patient_History.Client_ID)
            {
                materialLabel2.Text = patient.Surname + " " + patient.Name + " " + patient.Midle_name;
                richTextBox1.Text   = patient_History.History;
            }
        }
Example #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (_Patient == null)
     {
         Patient_history patient_History = new Patient_history()
         {
             History = "H: "
         };
         patient_History.Save();
         Patient patient = new Patient()
         {
             Birthday   = textBox1.Text,
             Surname    = textBox2.Text,
             Name       = textBox3.Text,
             Midle_name = textBox4.Text,
             Sex        = textBox5.Text,
             Phone      = textBox6.Text,
             Address    = textBox7.Text
         };
         patient.onValidationError += Patient_onValidationError;
         if (patient.Save() > 0)
         {
             MessageBox.Show("Новый пациент добавлен");
         }
         else
         {
             MessageBox.Show("Ошибка в добавлении");
         }
     }
     else
     {
         _Patient.Birthday   = textBox1.Text;
         _Patient.Surname    = textBox2.Text;
         _Patient.Name       = textBox3.Text;
         _Patient.Midle_name = textBox4.Text;
         _Patient.Sex        = textBox5.Text;
         _Patient.Phone      = textBox6.Text;
         _Patient.Address    = textBox7.Text;
         if (_Patient.Save() > 0)
         {
             MessageBox.Show("Пациент обновлён");
         }
     }
     this.Close();
 }