Exemplo n.º 1
0
        private async Task RefreshDataViewGridAsync()
        {
            var medicamentsList = await _medicamentsService.ReadListAsync(SearchName);

            _dataGridViewService.Clear();
            foreach (var medicament in medicamentsList)
            {
                _dataGridViewService.AddRow(medicament.Id, medicament.Name, medicament.StockQuantity);
            }
        }
Exemplo n.º 2
0
        private async Task RefreshDataViewGridAsync()
        {
            var symptomsList = await _symptomsService.ReadListAsync(SearchName);

            _dataGridViewService.Clear();
            foreach (var symptom in symptomsList)
            {
                _dataGridViewService.AddRow(symptom.Id, symptom.Name);
            }
        }
        private async Task RefreshDataViewGridAsync()
        {
            var diseasesList = await _diseasesService.ReadListAsync(SearchName);

            _dataGridViewService.Clear();
            foreach (var disease in diseasesList)
            {
                _dataGridViewService.AddRow(disease.Id, disease.Name);
            }
        }
        private async Task RefreshDataViewGridAsync()
        {
            var clientsList = await _clientsService.ReadListAsync(SearchFullName);

            _clientsDataGridViewService.Clear();
            foreach (var client in clientsList)
            {
                _clientsDataGridViewService.AddRow(client.Id,
                                                   client.FullName,
                                                   client.PhoneNumber,
                                                   client.InsurancePolicyNumber,
                                                   client.Sex);
            }
        }
Exemplo n.º 5
0
        private async Task RefreshSubstituteDataGridViewAsync()
        {
            var medicamentsList = await _substitutesService.ReadSubstitutesListByOriginalMedicamentIdAsync(
                _medicament.Id,
                SubstituteSearchName);

            _substituteDataGridViewService.Clear();
            foreach (var substitute in medicamentsList)
            {
                _substituteDataGridViewService.AddRow(substitute.SubstituteMedicamentId,
                                                      substitute.SubstituteMedicament.Name,
                                                      substitute.DosageMultiplier);
            }
        }
Exemplo n.º 6
0
        public async Task RefreshRecipesDataGridViewAsync()
        {
            var recipesList = await _recipesService.ReadListAsync(SearchText);

            _recipesDataGridViewService.Clear();
            foreach (var recipe in recipesList)
            {
                _recipesDataGridViewService.AddRow(recipe.Id,
                                                   recipe.ClientId,
                                                   recipe.Client.FullName,
                                                   recipe.DiseaseId,
                                                   recipe.Disease.Name,
                                                   recipe.Date.ToShortDateString());
            }
        }
Exemplo n.º 7
0
        private async Task RefreshDataViewGridAsync()
        {
            var list = await _diseasesSymptomsService.ReadListAsync(_initialDiseaseId,
                                                                    _initialSymptomId,
                                                                    SearchDiseaseName,
                                                                    SearchSymptomName);

            _dataGridViewService.Clear();
            foreach (var diseaseSymptom in list)
            {
                _dataGridViewService.AddRow(diseaseSymptom.DiseaseId,
                                            diseaseSymptom.Disease.Name,
                                            diseaseSymptom.SymptomId,
                                            diseaseSymptom.Symptom.Name);
            }
        }
Exemplo n.º 8
0
        private async Task RefreshDataViewGridAsync()
        {
            var list = await _diseasesMedicamentsService.ReadListAsync(_initialDiseaseId,
                                                                       _initialMedicamentId,
                                                                       SearchDiseaseName,
                                                                       SearchMedicamentName);

            _dataGridViewService.Clear();
            foreach (var diseaseMedicament in list)
            {
                _dataGridViewService.AddRow(diseaseMedicament.Id,
                                            diseaseMedicament.DiseaseId,
                                            diseaseMedicament.Disease.Name,
                                            diseaseMedicament.MedicamentId,
                                            diseaseMedicament.Medicament.Name);
            }
        }
Exemplo n.º 9
0
        private async Task RefreshDataViewGridAsync()
        {
            var dosagesList = (await _dosagesService.ReadListAsync())
                              .Where(d => d.DiseaseMedicamentId == _diseaseMedicament.Id)
                              .ToList();

            _dosagesDataGridViewService.Clear();
            foreach (var dosage in dosagesList)
            {
                _dosagesDataGridViewService.AddRow(dosage.Id,
                                                   dosage.DiseaseMedicamentId,
                                                   dosage.DiseaseMedicament.Disease.Name,
                                                   dosage.DiseaseMedicament.Medicament.Name,
                                                   dosage.MinAge,
                                                   dosage.Dose);
            }
        }