コード例 #1
0
        private void EditCase()
        {
            CaseViewModel caseVM = ((CaseViewModel)dgHospitalizations.SelectedItem);

            if (caseVM.IsLocked)
            {
                MessageBox.Show("Either this case or contacts of this case are locked for editing. Please wait until other users have released this lock before proceeding.", "Record locked", MessageBoxButton.OK, MessageBoxImage.Information);
                return;
            }

            DataHelper.SendMessageForLockCase(caseVM);

            Epi.Enter.EnterUIConfig         uiConfig = Core.Common.GetCaseConfig(DataHelper.CaseForm, DataHelper.LabForm);
            Epi.Windows.Enter.EnterMainForm emf      = new Epi.Windows.Enter.EnterMainForm(DataHelper.Project, DataHelper.CaseForm, uiConfig);

            int uniqueKey = caseVM.UniqueKey;

            emf.LoadRecord(uniqueKey);
            emf.RecordSaved += new SaveRecordEventHandler(emfCases_RecordSaved);
            emf.ShowDialog();
            emf.RecordSaved -= new SaveRecordEventHandler(emfCases_RecordSaved);

            System.Threading.Thread.CurrentThread.CurrentUICulture = System.Threading.Thread.CurrentThread.CurrentCulture;

            DataHelper.SendMessageForUnlockCase(caseVM);
        }
コード例 #2
0
ファイル: EnterMainForm.cs プロジェクト: NALSS/epiinfo-82474
 public EnterMainForm(Project initialProject, View initialForm, EnterUIConfig uiConfig)
 {
     config = Configuration.GetNewInstance();
     System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(config.Settings.Language);
     InitializeComponent();
     UIConfig = uiConfig;
     Construct(UIConfig.ShowLinkedRecordsViewer);
     LoadInitialForm(initialProject, initialForm);
 }