示例#1
0
 private void LnkNewRecord_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     using (var frm = new PatientInfoDialog())
     {
         if (frm.ShowDialog(this) != DialogResult.OK)
         {
             return;
         }
         SelectedPatient = frm.PatientItem;
         DialogResult    = DialogResult.OK;
     }
 }
示例#2
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            var newItem = new Core.Patient();

            using (var frm = new PatientInfoDialog())
            {
                frm.PatientItem = newItem;
                if (frm.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                DisplayToGridRow(newItem, Grid.Rows[Grid.Rows.Add()]);
            }
        }
示例#3
0
        private void BtnOpenPatientInfo_Click(object sender, System.EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            using (var frm = new PatientSearchDialog())
            {
                if (frm.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                using (var patientForm = new PatientInfoDialog())
                {
                    patientForm.PatientItem = frm.SelectedPatient;
                    patientForm.ShowDialog(this);
                }
            }
        }
示例#4
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;

            var item = (Core.Patient)Grid.CurrentRow?.Tag;

            if (item == null)
            {
                return;
            }
            using (var frm = new PatientInfoDialog())
            {
                frm.PatientItem = item;
                if (frm.ShowDialog(this) != DialogResult.OK)
                {
                    return;
                }

                DisplayToGridRow(item, Grid.CurrentRow);
            }
        }