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));
        }
        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 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 IHttpActionResult ChangePassword(string currentPassword, string newPassword)
        {
            ChangePassword changePassword = null;
            string         data           = TicketHelper.GetDecryptedUserId();

            string []     dataList = data.Split(',');
            FactoryFacade factory  = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(ChangePassword));
            domainModel.Fill(HashHelper.ChangePassword(currentPassword, newPassword, dataList[0]));
            domainService  = factory.DomainServiceFactory.CreateDomainService(typeof(AccountsDomainService));
            changePassword = (ChangePassword)domainService.Update(domainModel, CareHub.Factory.Enumerations.DomainModelEnum.CHANGE_PASSWORD);
            return(Ok(changePassword.ResponseMessage));
        }
        public IHttpActionResult EditProfile(string name, string address, string phone, string zipCode, int?questionId, string answer)
        {
            EditProfile editProfile = null;
            string      data        = TicketHelper.GetDecryptedUserId();

            string[]      dataList = data.Split(',');
            FactoryFacade factory  = new FactoryFacade();

            domainModel = factory.DomainModelFactory.CreateDomainModel(typeof(EditProfile));
            domainModel.Fill(HashHelper.EditProfile(dataList[0], 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));
        }