Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         ShowMedicalCard SMC = new ShowMedicalCard(Editor.GetId(listBox1.SelectedItem.ToString()));
         iShowMedicalCard = SMC;
         MedicalCardOpen?.Invoke(this, EventArgs.Empty);
         SMC.ShowDialog();
     }
 }
Exemplo n.º 2
0
        public ShowMedicalCardPresenter(IShowMedicalCard iShowMedicalCard, IMedicalCardManager medicalCardManager)
        {
            if (iShowMedicalCard is null)
            {
                throw new ArgumentNullException(String.Format("{0} is null", nameof(iShowMedicalCard)));
            }

            this.iShowMedicalCard   = iShowMedicalCard;
            this.medicalCardManager = medicalCardManager;

            iShowMedicalCard.MedicalCardOpen += IShowMedicalCard_MedicalCardOpen;
        }
Exemplo n.º 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedIndex != -1)
     {
         ShowMedicalCard SMC = new ShowMedicalCard(Editor.GetId(listBox1.SelectedItem.ToString()));
         showMedicalCard = SMC;
         MedicalCardOpen?.Invoke(this, EventArgs.Empty);
         SMC.Show();
     }
     else
     {
         MessageBox.Show("Выберите пациента из списка ниже!", "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }