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);
        }
Exemple #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);
        }
Exemple #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());
        }
Exemple #4
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);
        }
Exemple #5
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());
        }
        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());
        }
Exemple #7
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());
        }
Exemple #8
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);
        }
Exemple #9
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);
        }
Exemple #10
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);
        }
Exemple #11
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);
        }
Exemple #12
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);
        }
Exemple #13
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);
        }
Exemple #14
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);
        }
Exemple #15
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);
        }
Exemple #16
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());
        }
        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));
        }
Exemple #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());
        }
Exemple #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());
        }
        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));
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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));
        }
        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);
        }
        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);
        }
        public string Signup(string address, string email, string name, string password, string phone, string zipCode, int questionId, string answer)
        {
            string        response = string.Empty;
            FactoryFacade factory  = new FactoryFacade();
            Signup        signup   = null;

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(Signup));
            domainModel.Fill(HashHelper.Signup(address, email, name, password, phone, zipCode, questionId, answer));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            signup        = (Signup)domainService.Save(domainModel, DomainModelEnum.SIGNUP);
            return(signup.ResponseMessage);
        }
Exemple #29
0
        public string ContactEmailMessage(string email, string message, string name, string phone, string subject)
        {
            string        response  = string.Empty;
            FactoryFacade factory   = new FactoryFacade();
            ContactUs     contactUs = null;

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ContactUs));
            domainModel.Fill(HashHelper.ContactEmailMessage(name, email, phone, subject, message));
            domainService = factory.DomainServiceFactory.CreateDomainService(typeof(ContactUsDomainService));
            contactUs     = (ContactUs)domainService.Query(domainModel, DomainModelEnum.CONTACT_EMAIL_MESSAGE);
            return(contactUs.ResponseMessage);
        }
        public IHttpActionResult ProviderRegistration(string name, int gender, string phone, string email, string password, string clinicName, long majorSpecialty, int country, long city, long area, string clinicAddress)
        {
            string               response             = string.Empty;
            FactoryFacade        factory              = new FactoryFacade();
            ProviderRegistration providerRegistration = null;

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ProviderRegistration));
            domainModel.Fill(HashHelper.ProviderRegistration(name, gender, phone, email, password, clinicName, majorSpecialty, country, city, area, clinicAddress));
            domainService        = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            providerRegistration = (ProviderRegistration)domainService.Save(domainModel, CareHub.Factory.Enumerations.DomainModelEnum.PROVIDER_REGISTRATION);

            return(Ok(providerRegistration.ResponseMessage));
        }