コード例 #1
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            ObservableCollection<PrescriptionItem> list= SetPrescriptionItems();
            if (list != null && list.Count > 0)
            {
                prescriptionDialog = new PrescriptionDialog();
                prescriptionDialog.Parent = this;

                SavePrescriptionView child = new SavePrescriptionView(list);
                child.Close += new EventHandler(child_Close);
                prescriptionDialog.Content = child;
                prescriptionDialog.Show();
            }
            else
            {
                AlarmDialog msgBox = new AlarmDialog();
                msgBox.lblMsg.Text = "暂无可保存的处方信息!";
                msgBox.lblTitle.Text = "提示信息";
                msgBox.Show();
            }
        }
コード例 #2
0
 public void child_Close(object sender, EventArgs e)
 {
     if (ReportPrintDialog != null)
     {
         ReportPrintDialog.Close();
     }
     if (prescriptionDialog != null)
     {
         prescriptionDialog.Close();
     }
     prescriptionDialog = null;
     ReportPrintDialog = null;
 }