Beispiel #1
0
        /// <summary>
        /// Handler for the add document button.
        /// </summary>
        private void BtnDocAdd_Click(object sender, RoutedEventArgs e)
        {
            // Opening the add document window.
            AddEditDocument addDocument = new AddEditDocument(this.idPatient);

            bool?result = addDocument.ShowDialog();


            // Actions after closing the window.
            if (result == true)
            {
                this.documentsAfterSearch.Clear();

                this.ShowNotification("Document added");

                this.ShowPatientDocsToADatagrid();

                this.dataGridDocumentList.SelectedIndex = this.dataGridDocumentList.Items.Count - 1;

                this.dataGridDocumentList.ScrollIntoView(this.dataGridDocumentList.SelectedItem);
            }
            else
            {
                this.ReturningLatestDataInTable();

                this.SelectionInTableOfEditedPatient();
            }
        }
Beispiel #2
0
        /// <summary>
        /// Opening the document editing window.
        /// </summary>
        private void OpeningDocumentEditingWindow()
        {
            int currentDocId
                = (this.dataGridDocumentList.SelectedItem as RedefinedMedicalDoc)
                  .Id;


            //Opening the edit window.
            AddEditDocument addDocument
                = new AddEditDocument(this.idPatient, currentDocId);

            bool?result = addDocument.ShowDialog();


            // Actions after closing the window.
            if (result == true)
            {
                this.ShowNotification("Document edited");
            }

            this.ReturningLatestDataInTable();

            this.SelectionInTableOfEditedPatient();
        }