Exemplo n.º 1
0
        public async Task StorePatientRecordInExcelAsyncTest()
        {
            var patient = new Patient
            {
                Id             = 0,
                Name           = "Muster",
                Vorname        = "Hans",
                Strasse        = "Teststrasse 99",
                Plz            = 9999,
                Ort            = "Testort",
                Geburtsdatum   = new DateTime(1901, 1, 1),
                Geschlecht     = GeschlechtType.M,
                PatientenNr    = "PatientenNr002",
                AhvNr          = "AhvNr002",
                VekaNr         = "VekaNr002",
                VersichertenNr = "VersNr002",
                Kanton         = "TE",
                Kopie          = false,
                VerguetungsArt = VerguetungsartType.Tp,
                VertragsNr     = "VertrNr002"
            };

            var excel = new ExcelConnector(ExcelFilePath);

            //var res = await excel.StorePatientRecordInExcelAsync(patient);
            await excel.StorePatientRecordInExcelAsync(patient);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Get entire Row
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DataGridPatient_RowEditEnding(object sender, DataGridRowEditEndingEventArgs e)
        {
            try
            {
                Mouse.OverrideCursor = Cursors.Wait;

                _excel.StorePatientRecordInExcelAsync(_patient);
                GetPatientRecords();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace, ex.Message);
            }
            finally
            {
                Mouse.OverrideCursor = null;
            }
        }