public void child_Close(object sender, EventArgs e) { if (SaveCourseDialog != null) { SaveCourseDialog.Close(); } SaveCourseDialog = null; if (EditPrescriptionDialog != null) { EditPrescriptionDialog.Close(); BindData(); } EditPrescriptionDialog = null; }
public void child_Close(object sender, EventArgs e) { if (ControlDialog != null) { ControlDialog.Close(); } ControlDialog = null; if (ReportPrintDialog != null) { ReportPrintDialog.Close(); } ReportPrintDialog = null; if (FitResultDialog != null) { FitResultDialog.Close(); } FitResultDialog = null; if (SaveCourseDialog != null) { SaveCourseDialog.Close(); } SaveCourseDialog = null; }
private void btnSavePrescription_Click(object sender, RoutedEventArgs e) { SetPrescriptionItems(); ThreadPool.QueueUserWorkItem(new WaitCallback((obj) => { lock (objLock) { Application.Current.Dispatcher.Invoke(new Action(() => { if (listResult.Count > 0) { if (SaveCourseDialog == null) { SaveCourseDialog = new SaveCourseDialog(); SaveCourseDialog.Parent = this; SaveCourseView child = new SaveCourseView(listResult); child.Close += new EventHandler(child_Close); SaveCourseDialog.Content = child; SaveCourseDialog.Show(); } } })); } })); }
private void btnSaveCourse_Click(object sender, RoutedEventArgs e) { ThreadPool.QueueUserWorkItem(new WaitCallback((obj) => { lock (objLock) { Application.Current.Dispatcher.Invoke(new Action(() => { if (patientInfo == null) { AlarmDialog dialog = new AlarmDialog(); dialog.lblTitle.Text = "提示信息"; dialog.lblMsg.Text = "请选择病人!"; dialog.ShowDialog(); } else { if (listResult.Count > 0) { if (SaveCourseDialog == null) { SaveCourseDialog = new SaveCourseDialog(); SaveCourseDialog.Parent = this; SaveCourseView child = new SaveCourseView(listResult); child.Close += new EventHandler(child_Close); SaveCourseDialog.Content = child; SaveCourseDialog.Show(); } } else { AlarmDialog dialog = new AlarmDialog(); dialog.lblTitle.Text = "提示信息"; dialog.lblMsg.Text = "请选择训练动作及模式!"; dialog.ShowDialog(); } } })); } })); }