public OtherInformationPage(CustomerReview customer, CustomerImages images)
        {
            InitializeComponent();
            this.customer = customer;
            licenceIssueDate.MaximumDate  = DateTime.Now;
            licenceExpiryDate.MinimumDate = DateTime.Now;
            _token = App.Current.Properties["currentToken"].ToString();
            GetAllStateForMobileRequest stateRequest = new GetAllStateForMobileRequest();
            List <string> stateList = new List <string>();

            stateRequest.CountryID = (int)customer.CountryId;
            stateResponse          = getStates(stateRequest, _token);
            if (stateResponse.stateList.Count > 0)
            {
                foreach (State s in stateResponse.stateList)
                {
                    stateList.Add(s.StateCode);
                }
                ;
            }
            licenceStatePicker.ItemsSource = stateList;
            imageMobileRequest             = new UploadCustomerImageMobileRequest();
            imageMobileResponse            = null;
            this.images                = images;
            licExpireDateSelected      = false;
            licIssueDateSelected       = false;
            licfrontIamgeStat          = new CustomerImages();
            licBackIamgeStat           = new CustomerImages();
            LicenceImagesRequest       = new AddLicenceImagesRequest();
            licenceImageResponse       = null;
            customer.CustomerType      = "Retail";
            confirmEmailAddressRequest = new ConfirmEmailAddressRequest();
            emailAddressResponse       = null;
            this.fromVal               = 0;
        }
예제 #2
0
        public CheckConfirmEmailAddressResponse checkConfirmEmailAddress(ConfirmEmailAddressRequest request, string token)
        {
            CheckConfirmEmailAddressResponse res = new CheckConfirmEmailAddressResponse();

            try
            {
                using (var client = new HttpClient())
                {
                    client.BaseAddress = new Uri(ConstantData.ApiURL.ToString() + "RegistrationMobile/checkConfirmEmailAddress");
                    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

                    var myContent   = JsonConvert.SerializeObject(request);
                    var buffer      = Encoding.UTF8.GetBytes(myContent);
                    var byteContent = new ByteArrayContent(buffer);
                    byteContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");

                    var response = client.PostAsync(client.BaseAddress, byteContent).Result;
                    if (response.IsSuccessStatusCode)
                    {
                        var responseStream = response.Content.ReadAsStringAsync().Result;
                        res = JsonConvert.DeserializeObject <CheckConfirmEmailAddressResponse>(responseStream);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(res);
        }
예제 #3
0
        private CheckConfirmEmailAddressResponse checkConfirmEmailAddress(ConfirmEmailAddressRequest request)
        {
            CheckConfirmEmailAddressResponse response = new CheckConfirmEmailAddressResponse();
            LoginController controller = new LoginController();

            response = controller.checkConfirmEmailAddress(request, token);
            return(response);
        }
예제 #4
0
        private ConfirmEmailAddressResponse ConfirmEmailAddress(ConfirmEmailAddressRequest confirmEmailAddressRequest)
        {
            ConfirmEmailAddressResponse response   = null;
            LoginController             controller = new LoginController();

            response = controller.ConfirmEmailAddress(confirmEmailAddressRequest, token);
            return(response);
        }
예제 #5
0
 public enterConfirmationCodePage(int customerId)
 {
     InitializeComponent();
     request  = new ConfirmEmailAddressRequest();
     response = null;
     token    = App.Current.Properties["currentToken"].ToString();
     emailAddressLabel.Text = Constants.cutomerAuthContext.CustomerEmail;
     this.customerId        = customerId;
     this.confirmationType  = emailConfirmationType.LogIn;
     this.fromVal           = 0;
 }
예제 #6
0
 public ConfirmEmailRequest(int customerId, emailConfirmationType register)
 {
     InitializeComponent();
     confirmEmailAddressRequest = new ConfirmEmailAddressRequest();
     emailAddressResponse       = null;
     yourEmaillabel.Text        = Constants.cutomerAuthContext.CustomerEmail;
     token                 = App.Current.Properties["currentToken"].ToString();
     this.customerId       = customerId;
     this.confirmationType = register;
     this.fromVal          = 0;
 }
예제 #7
0
        public CheckConfirmEmailAddressResponse checkConfirmEmailAddress(ConfirmEmailAddressRequest request, string token)
        {
            CheckConfirmEmailAddressResponse response = new CheckConfirmEmailAddressResponse();

            try
            {
                response = loginservice.checkConfirmEmailAddress(request, token);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(response);
        }