예제 #1
0
        public List <VerificationModel> ReadVerificationsList()
        {
            string query = @"
                select IdVerification, IdResult, IdEmployee, DateOfVerification, Description
                from Verifications
            ";

            return(BaseDAO.Select(query, ReadVerificationModel));
        }
        public List <StudyModel> ReadStudiesList()
        {
            string query = @"
                select IdStudy, IdProfile, IdEmployee, IdOrder, IdStatus, DateOfStudy
                from Studies
            ";

            return(BaseDAO.Select(query, ReadStudyModel));
        }
예제 #3
0
        public List <ResultModel> ReadResultsList()
        {
            string query = @"
                select IdResult, IdEmployee, IdStudy, DateOfResult, Description, ReasonForRepeat, Actual
                from Results
            ";

            return(BaseDAO.Select(query, ReadResultModel));
        }
예제 #4
0
        public List <UserModel> ReadUsersList()
        {
            string query = @"
                select IdUser, IdEmployee, Login, Password, DateOfChange, InUse
                from Users
            ";

            return(BaseDAO.Select(query, ReadUserModel));
        }
        public List <EmployeeModel> ReadEmployeesList()
        {
            string query = @"
                select IdEmployee, IdPosition, FirstName, Surname, Pesel, Sex, Street, HouseNumber, City, PostalCode, Country, 
                    Phone, Email, DateOfEmployment, DateOfLaying, LicenseNumber, IdWard
                from Employees
            ";

            return(BaseDAO.Select(query, ReadEmployeeModel));
        }
예제 #6
0
        public List <ResultUnitModel> ReadResultUnitModelByResultId(long id)
        {
            string query = $@"
                select IdResultUnit, IdOrderedTests, IdResult, Value
                from ResultUnits
                where IdResult = {id}
            ";

            return(BaseDAO.Select(query, ReadResultUnitModel));
        }
        public List <PatientModel> ReadPatientsList()
        {
            string query = @"
                select IdPatient, FirstName, Surname, Pesel, Sex, Street, HouseNumber, City, PostalCode, Country, Phone, IdCardNumber, Insurance, 
                    ContactPersonFirstName, ContactPersonSurname, ContactPersonPesel, ContactPersonPhone 
                from Patients
            ";

            return(BaseDAO.Select(query, ReadPatientModel));
        }
예제 #8
0
        public List <OrderModel> ReadOrdersList()
        {
            string query = @"
                select IdOrder, IdPatient, IdEmployee, IdWard, Institution, Comment, DateOfOrder, DateOfReceived, IdStatus,
                    IdPriority
                from Orders
            ";

            return(BaseDAO.Select(query, ReadOrderModel));
        }
        public List <StudyModel> ReadStudiesListByOrderId(long?id)
        {
            string query = $@"
                select IdStudy, IdProfile, IdEmployee, IdOrder, IdStatus, DateOfStudy
                from Studies
                where IdOrder = {id}
            ";

            return(BaseDAO.Select(query, ReadStudyModel));
        }
        public List <EmployeeModel> ReadConsultantsList(long idOrder)
        {
            string query = $@"
                select e.IdEmployee, e.IdPosition, e.FirstName, e.Surname, e.Pesel, e.Sex, e.Street, e.HouseNumber, e.City, e.PostalCode, e.Country, 
                    e.Phone, e.Email, e.DateOfEmployment, e.DateOfLaying, e.LicenseNumber, e.IdWard
                from Employees e join Consultants c on e.IdEmployee = c.IdEmployee 
                where c.IdOrder = {idOrder}
            ";

            return(BaseDAO.Select(query, ReadEmployeeModel));
        }
        public List <DictionaryModel> ReadDictionaryListByType(DictionaryTypesEnum type, string lang)
        {
            string query = "";

            switch (type)
            {
            case DictionaryTypesEnum.Positions:
                query = $@"
                        select p.IdPosition as Id, t.Name as Name
                        from Positions p
                        join PositionTranslations t on p.IdPosition = t.IdPosition 
                        join Languages l on t.IdLanguage = l.IdLanguage
                        where l.code = '{lang}'
                    ";
                break;

            case DictionaryTypesEnum.Ward:
                query = $@"
                        select p.IdWard as Id, t.Name as Name
                        from Wards p
                        join WardTranslations t on p.IdWard = t.IdWard 
                        join Languages l on t.IdLanguage = l.IdLanguage
                        where l.code = '{lang}'
                    ";
                break;

            case DictionaryTypesEnum.Priorities:
                query = $@"
                            select p.IdPriority as Id, t.Name as Name
                            from Priorities p
                            join PriorityTranslations t on p.IdPriority = t.IdPriority
                            join Languages l on t.IdLanguage = l.IdLanguage
                            where l.code = '{lang}'
                        ";
                break;

            case DictionaryTypesEnum.Status:
                query = $@"
                            select p.IdStatus as Id, t.Name as Name
                            from Status p
                            join StatusTranslations t on p.IdStatus = t.IdStatus
                            join Languages l on t.IdLanguage = l.IdLanguage
                            where l.code = '{lang}'
                        ";
                break;
            }
            List <DictionaryModel> list = BaseDAO.Select(query, ReadDictionaryModel);

            foreach (DictionaryModel model in list)
            {
                model.Type = type;
            }
            return(list);
        }
예제 #12
0
        public List <TestModel> ReadTestsList(string lang)
        {
            string query = $@"
                select t.IdTest, t.IdProfile, t.Code, t.NormMinM, t.NormMaxM, t.NormMinF, t.NormMaxF, tr.Name as Name
                from Tests t
                join TestTranslations tr on t.IdTest = tr.IdTest
                join Languages l on tr.IdLanguage = l.IdLanguage
                where l.code = '{lang}'
            ";

            return(BaseDAO.Select(query, ReadTestModel));
        }
        public List <ProfileModel> ReadProfilesList(string lang)
        {
            string query = $@"
                select p.IdProfile, p.Code, p.Permament, t.Name as Name
                from Profiles p
                join ProfileTranslations t on p.IdProfile = t.IdProfile
                join Languages l on t.IdLanguage = l.IdLanguage
                where l.code = '{lang}'
            ";

            return(BaseDAO.Select(query, ReadProfileModel));
        }