コード例 #1
0
        public List <JunkCar.DataModel.Models.Sec_Password_Question> GetAllSecurityQuestion()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            return(((DomainModel.Models.Signup)domainService.Query(SearchCriteriaEnum.GET_ALL_SECURITY_QUESTIONS)).SecurityQuestions);
        }
コード例 #2
0
        public List <int?> GetCylinders()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(SearchCriteriaEnum.GET_CYLINDERS)).Cylinders);
        }
コード例 #3
0
        public IQueryable GetLabs()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(PracticesSearchDomainService));
            return(((DomainModel.Models.PracticesSearch)domainService.Query(CareHub.Core.Enumerations.SearchCriteriaEnum.GET_LABS)).Labs.AsQueryable());
        }
コード例 #4
0
        public List <int?> GetRegistrationYears()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(SearchCriteriaEnum.GET_REGISTRATION_YEARS)).Years);
        }
コード例 #5
0
        public List <Set_Questionnaire_Detail> GetQuestionnaire()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(SearchCriteriaEnum.GET_QUESTIONNAIRE)).Questionnaire);
        }
コード例 #6
0
        public List <Set_State> GetStates()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(SearchCriteriaEnum.GET_STATES)).States);
        }
コード例 #7
0
        public IQueryable GetLocalities()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            return(((DomainModel.Models.ProviderRegistration)domainService.Query(CareHub.Core.Enumerations.SearchCriteriaEnum.GET_LOCALITIES)).Localities.AsQueryable());
        }
コード例 #8
0
        public IQueryable GetTreatments()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(DoctorsSearchDomainService));
            return(((DomainModel.Models.DoctorsSearch)domainService.Query(CareHub.Core.Enumerations.SearchCriteriaEnum.GET_TREATMENTS)).Treatments.AsQueryable());
        }
コード例 #9
0
        public IQueryable GetSpecialties()
        {
            FactoryFacade factory = new FactoryFacade();

            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(DoctorsSearchDomainService));
            return(((DomainModel.Models.DoctorsSearch)domainService.Query(CareHub.Core.Enumerations.SearchCriteriaEnum.GET_SPECIALTIES)).Specialties.AsQueryable());
        }
コード例 #10
0
        public string ConfirmOfferWithQuestionnaire(string address, int cityId, string contactNo, int customerId, short cylinders, string emailAddress, string make, string model, string name, string phone, string price, string questionnaire, int selectedMakeId, int selectedModelId, int selectedYear, int stateId, string zipCode)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(Home));
            domainModel.Fill(HashHelper.ConfirmOfferWithQuestionnaire(address, cityId, contactNo, customerId, cylinders, emailAddress, make, model, name, phone, price, questionnaire, selectedMakeId, selectedModelId, selectedYear, stateId, zipCode));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(domainModel, DomainModelEnum.CONFIRM_OFFER_WITH_QUESTIONNAIRE)).ResponseMessage);
        }
コード例 #11
0
        public string GetABetterOffer(string address, int cityId, int customerId, short cylinders, string emailAddress, string make, string model, string name, string phone, string questionnaire, int selectedMakeId, int selectedModelId, int selectedYear, int stateId, string zipCode)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(Home));
            domainModel.Fill(HashHelper.GetABetterOffer(address, cityId, customerId, cylinders, emailAddress, make, model, name, phone, questionnaire, selectedMakeId, selectedModelId, selectedYear, stateId, zipCode));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(domainModel, DomainModelEnum.GET_A_BETTER_OFFER)).OfferPrice);
        }
コード例 #12
0
        public int GetCustomerId(string address, int cityId, string emailAddress, string name, string phone, int stateId, string zipCode)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(Home));
            domainModel.Fill(HashHelper.GetCustomerId(address, cityId, emailAddress, name, phone, stateId, zipCode));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(domainModel, DomainModelEnum.GET_CUSTOMER_ID)).CustomerId);
        }
コード例 #13
0
        public List <JunkCar.DataModel.Models.Set_Model> GetModels(int year, int makeId)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(Home));
            domainModel.Fill(HashHelper.GetModels(year, makeId));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(domainModel, DomainModelEnum.GET_MODELS)).Models);
        }
コード例 #14
0
        public override AbstractDomainModel Query(SearchCriteriaEnum searchCriteria)
        {
            DomainModel.Models.PracticesSearch searchPractice = new DomainModel.Models.PracticesSearch();

            FactoryFacade factory = new FactoryFacade();

            try
            {
                switch (searchCriteria)
                {
                case SearchCriteriaEnum.GET_HOSPITALS:
                    unitOfWork     = factory.UnitOfWorkFactory.CreateUnitOfWork(typeof(CareHub.UnitOfWork.PracticesSearchUOW));
                    searchPractice = (DomainModel.Models.PracticesSearch)unitOfWork.GetAll(searchCriteria);
                    break;

                case SearchCriteriaEnum.GET_LABS:
                    unitOfWork     = factory.UnitOfWorkFactory.CreateUnitOfWork(typeof(CareHub.UnitOfWork.PracticesSearchUOW));
                    searchPractice = (DomainModel.Models.PracticesSearch)unitOfWork.GetAll(searchCriteria);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                switch (searchCriteria)
                {
                case SearchCriteriaEnum.GET_HOSPITALS:
                    searchPractice.ResponseMessage = ex.Message;
                    break;

                case SearchCriteriaEnum.GET_LABS:
                    searchPractice.ResponseMessage = ex.Message;
                    break;

                default:
                    break;
                }
            }
            finally
            {
                factory = null;
            }
            switch (searchCriteria)
            {
            case SearchCriteriaEnum.GET_HOSPITALS:
                return(searchPractice);

            case SearchCriteriaEnum.GET_LABS:
                return(searchPractice);

            default:
                break;
            }
            return(null);
        }
コード例 #15
0
        public List <Set_City> GetCities(int stateId)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(Home));
            domainModel.Fill(HashHelper.GetCities(stateId));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(domainModel, DomainModelEnum.GET_CITIES)).Cities);
        }
コード例 #16
0
        public CheckZipCode_Result CheckZipCode(string zipCode)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(Home));
            domainModel.Fill(HashHelper.CheckZipCode(zipCode));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(HomeDomainService));
            return(((DomainModel.Models.Home)domainService.Query(domainModel, DomainModelEnum.CHECK_ZIPCODE)).ZipCodeResult);
        }
コード例 #17
0
        public override AbstractDomainModel Query(AbstractDomainModel domainModel, CareHub.Factory.Enumerations.DomainModelEnum domainModelType)
        {
            DomainModel.Models.DoctorsSearch searchDoctor = (DomainModel.Models.DoctorsSearch)domainModel;
            try
            {
                if (domainModel != null)
                {
                    FactoryFacade factory = new FactoryFacade();
                    switch (domainModelType)
                    {
                    case CareHub.Factory.Enumerations.DomainModelEnum.DOCTOR_SEARCH:
                        unitOfWork   = factory.UnitOfWorkFactory.CreateUnitOfWork(typeof(CareHub.UnitOfWork.DoctorsSearchUOW));
                        searchDoctor = (DomainModel.Models.DoctorsSearch)unitOfWork.Get(searchDoctor);
                        searchDoctor.ResponseMessage = "Valid domain model";
                        break;

                    default:
                        break;
                    }
                }
                else
                {
                    switch (domainModelType)
                    {
                    case CareHub.Factory.Enumerations.DomainModelEnum.DOCTOR_SEARCH:
                        searchDoctor.ResponseMessage = "Invalid domain model";
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                switch (domainModelType)
                {
                case CareHub.Factory.Enumerations.DomainModelEnum.DOCTOR_SEARCH:
                    searchDoctor.ResponseMessage = ex.Message;
                    break;

                default:
                    break;
                }
            }
            switch (domainModelType)
            {
            case CareHub.Factory.Enumerations.DomainModelEnum.DOCTOR_SEARCH:
                return(searchDoctor);

            default:
                break;
            }

            return(null);
        }
コード例 #18
0
        public IQueryable SearchPractice(long city, string locality, string hospital, string lab, int searchType)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(PracticesSearch));
            domainModel.Fill(HashHelper.SearchPractice(city, locality, hospital, lab, searchType));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(PracticesSearchDomainService));
            domainModel   = domainService.Query(domainModel, CareHub.Factory.Enumerations.DomainModelEnum.PRACTICE_SEARCH);
            return(((DomainModel.Models.PracticesSearch)domainModel).Practices.AsQueryable());
        }
コード例 #19
0
        public IQueryable SearchProvider(long city, string locality, string specialty, string doctor, string hospital, string lab, string pharmacist, string nurse, string treatment, int searchType)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(DoctorsSearch));
            domainModel.Fill(HashHelper.SearchDoctor(city, locality, specialty, doctor, hospital, lab, pharmacist, nurse, treatment, searchType));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(DoctorsSearchDomainService));
            domainModel   = domainService.Query(domainModel, CareHub.Factory.Enumerations.DomainModelEnum.DOCTOR_SEARCH);
            return(((DomainModel.Models.DoctorsSearch)domainModel).Providers.AsQueryable());
        }
コード例 #20
0
        public IQueryable GetLocalities(int country, long city, int searchType)
        {
            FactoryFacade factory = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(DoctorsSearch));
            domainModel.Fill(HashHelper.GetLocalitiesByCountryCity(country, city, searchType));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(DoctorsSearchDomainService));
            domainModel   = domainService.Query(domainModel, CareHub.Factory.Enumerations.DomainModelEnum.DOCTOR_SEARCH);
            return(((DomainModel.Models.DoctorsSearch)domainModel).Localities.AsQueryable());
        }
コード例 #21
0
        public IHttpActionResult ForgotPassword(string newPassword, string userId)
        {
            ForgotPassword forgotPassword = null;
            FactoryFacade  factory        = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ForgotPassword));
            domainModel.Fill(HashHelper.ForgotPassword(newPassword, userId));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            return(Ok(((ForgotPassword)domainService.Update(domainModel, CareHub.Factory.Enumerations.DomainModelEnum.FORGOT_PASSWORD)).ResponseMessage));
        }
コード例 #22
0
        public string CheckSecurityQuestionAnswer(string answer, int questionId, string userId)
        {
            FactoryFacade  factory        = new FactoryFacade();
            ForgotPassword forgotPassword = null;

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ForgotPassword));
            domainModel.Fill(HashHelper.CheckSecurityQuestion(questionId, answer.ToLower(), userId));
            domainService  = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            forgotPassword = (ForgotPassword)domainService.Query(domainModel, DomainModelEnum.CHECK_SECURITY_QUESTION_ANSWER);
            return(forgotPassword.ResponseMessage);
        }
コード例 #23
0
        public IHttpActionResult ChangePasswordApp(string email, string currentPassword, string newPassword)
        {
            ChangePassword changePassword = null;
            FactoryFacade  factory        = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ChangePassword));
            domainModel.Fill(HashHelper.ChangePassword(currentPassword, newPassword, email));
            domainService  = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            changePassword = (ChangePassword)domainService.Update(domainModel, JunkCar.Core.Enumerations.DomainModelEnum.CHANGE_PASSWORD);
            return(Ok(changePassword.ResponseMessage));
        }
コード例 #24
0
        public string ResetPassword(string newPassword, string userId)
        {
            FactoryFacade  factory        = new FactoryFacade();
            ForgotPassword forgotPassword = null;

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ForgotPassword));
            domainModel.Fill(HashHelper.ResetPassword(userId, newPassword));
            domainService  = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            forgotPassword = (ForgotPassword)domainService.Query(domainModel, DomainModelEnum.RESET_PASSWORD);
            return(forgotPassword.ResponseMessage);
        }
コード例 #25
0
        public string CheckUserId(string userId)
        {
            FactoryFacade factory      = new FactoryFacade();
            Authenticate  authenticate = null;

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(Authenticate));
            domainModel.Fill(HashHelper.CheckUserId(userId));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            authenticate  = (Authenticate)domainService.Query(domainModel, DomainModelEnum.CHECK_USER_ID);
            return(authenticate.ResponseMessage);
        }
コード例 #26
0
 public BaseUnitOfWork()
 {
     DomainModelCollection = new List <AbstractDomainModel>();
     Context = new shiner49_medicareEntities();
     Factory = new FactoryFacade();
     if (Context.Database.Connection.State == System.Data.ConnectionState.Closed)
     {
         Context.Database.Connection.ConnectionString = InitializeConnectionString();
         Context.Database.Connection.Open();
     }
 }
コード例 #27
0
        public JunkCar.DataModel.Models.Sec_Password_Question GetSecurityQuestion(string userId)
        {
            FactoryFacade  factory        = new FactoryFacade();
            ForgotPassword forgotPassword = null;

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ForgotPassword));
            domainModel.Fill(HashHelper.GetSecurityQuestion(userId));
            domainService  = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            forgotPassword = (ForgotPassword)domainService.Query(domainModel, DomainModelEnum.GET_SECURITY_QUESTION);
            return(forgotPassword.SecurityQuestion);
        }
コード例 #28
0
        public UserProfile GetUserInfoApp(string email)
        {
            UserProfile   userProfile = null;
            FactoryFacade factory     = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(UserProfile));
            domainModel.Fill(HashHelper.GetUserInfo(email));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            userProfile   = (UserProfile)domainService.Query(domainModel, DomainModelEnum.GET_USER_INFO);
            return(userProfile);
        }
コード例 #29
0
        public string CheckVerificationCode(int verificationCode)
        {
            FactoryFacade  factory        = new FactoryFacade();
            ForgotPassword forgotPassword = null;

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ForgotPassword));
            domainModel.Fill(HashHelper.CheckVerificationCode(verificationCode));
            domainService  = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            forgotPassword = (ForgotPassword)domainService.Query(domainModel, DomainModelEnum.CHECK_VERIFICATION_CODE);
            return(forgotPassword.ResponseMessage);
        }
コード例 #30
0
        public IHttpActionResult EditProfileApp(string email, string name, string address, string phone, string zipCode, int?questionId, string answer)
        {
            EditProfile   editProfile = null;
            FactoryFacade factory     = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(EditProfile));
            domainModel.Fill(HashHelper.EditProfile(email, name, address, phone, zipCode, questionId, answer));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            editProfile   = (EditProfile)domainService.Update(domainModel, JunkCar.Core.Enumerations.DomainModelEnum.EDIT_PROFILE);
            return(Ok(editProfile.ResponseMessage));
        }