public HomePageMaster() { InitializeComponent(); //Common.mMasterPage.Master = this; customoerController = new CustomerController(); token = Application.Current.Properties["currentToken"].ToString(); customerId = (int)Application.Current.Properties["CustomerId"]; portalDetailsMobileRequest = new GetCustomerPortalDetailsMobileRequest(); portalDetailsMobileRequest.customerId = customerId; PortalDetailsMobileResponse = null; BindingContext = new HomePageMasterViewModel(); if (Constants.cutomerAuthContext != null) { welcomeText.Text = "Welcome " + Constants.cutomerAuthContext.FirstName; } ListView = MenuItemsListView; var homeTab = new TapGestureRecognizer(); homeTab.Tapped += (s, e) => { Navigation.PushAsync(new HomePageDetail()); }; //HomeBtn.GestureRecognizers.Add(homeTab); }
public LoginPage(int fromVal) { InitializeComponent(); //BindingContext = new SocialLoginPageViewModel(); store = AccountStore.Create(); var assembly = typeof(LoginPage); portalDetailsMobileRequest = new GetCustomerPortalDetailsMobileRequest(); PortalDetailsMobileResponse = null; // logoImage.Source = ImageSource.FromResource("MaxVonGrafKftMobile.Assets.logo_high_resolution_white-1.png", assembly); //emailIcon.Source = ImageSource.FromResource("MaxVonGrafKftMobile.Assets.emailIcon.png", assembly); // passwordIcon.Source = ImageSource.FromResource("MaxVonGrafKftMobile.Assets.passwordIcon.png", assembly); //LoginButton.ImageSource= ImageSource.FromResource("MaxVonGrafKftMobile.Assets.LoginIcon.png", assembly); if (PopupNavigation.Instance.PopupStack.Count > 0) { PopupNavigation.Instance.PopAllAsync(); } var forgetPassword_tab = new TapGestureRecognizer(); forgetPassword_tab.Tapped += (s, e) => { Navigation.PushModalAsync(new ForgetPasswordPage()); }; forgetPasswordLabel.GestureRecognizers.Add(forgetPassword_tab); this.fromVal = fromVal; }
public UpdateProfile(CustomerReview customerReview) { InitializeComponent(); DateOfBithEntry.MaximumDate = DateTime.Now.AddYears(-18); //licIssueDate.MaximumDate = DateTime.Now; licenceexpiDate.MinimumDate = DateTime.Now; this.customerReview = customerReview; _token = App.Current.Properties["currentToken"].ToString(); customerId = (int)Application.Current.Properties["CustomerId"]; countryResponse = null; stateResponse = null; ProfileDetailsMobileRequest = new UpdateCustomerProfileDetailsMobileRequest(); profileDetailsMobileResponse = null; portalDetailsMobileRequest = new GetCustomerPortalDetailsMobileRequest(); portalDetailsMobileRequest.customerId = customerId; PortalDetailsMobileResponse = null; customoerController = new CustomerController(); Images = null; //licenceIssueDate.MaximumDate = DateTime.Now; //licenceExpiryDate.MinimumDate = DateTime.Now; licExpireDateSelected = false; licIssueDateSelected = false; licfrontIamgeStat = new CustomerImages(); licBackIamgeStat = new CustomerImages(); LicenceImagesRequest = new AddLicenceImagesRequest(); licenceImageResponse = null; var editPhoto = new TapGestureRecognizer(); editPhoto.Tapped += (s, e) => { if (Images != null) { if (Images.Base64 == null) { PopupNavigation.PushAsync(new editPrrofilePhotoPage()); } else { PopupNavigation.PushAsync(new editPrrofilePhotoPage(Images)); } } else { PopupNavigation.PushAsync(new editPrrofilePhotoPage()); } }; profileImage.GestureRecognizers.Add(editPhoto); }
public MyProfile() { InitializeComponent(); customoerController = new CustomerController(); token = Application.Current.Properties["currentToken"].ToString(); customerId = (int)Application.Current.Properties["CustomerId"]; getMobileCustomerByIDRequest = new GetMobileCustomerByIDRequest(); getMobileCustomerByIDRequest.CustomerId = customerId; getMobileCustomerResponse = null; portalDetailsMobileRequest = new GetCustomerPortalDetailsMobileRequest(); portalDetailsMobileRequest.customerId = customerId; PortalDetailsMobileResponse = null; GetCustomerAgreementReservationCountRequest = new GetCustomerAgreementReservationCountRequest(); GetCustomerAgreementReservationCountRequest.customerID = customerId; GetCustomerAgreementReservationCountRequest.clientId = Constants.ClientId; }
private void updateConstantCustomerDetails(GetCustomerPortalDetailsMobileRequest portalDetailsMobileRequest) { GetCustomerPortalDetailsMobileResponse response = new GetCustomerPortalDetailsMobileResponse(); CustomerController customoerController = new CustomerController(); try { response = customoerController.getCustomerDetailsWithProfilePic(portalDetailsMobileRequest, token); } catch (Exception ex) { throw ex; } if (response.customerReview != null) { Constants.customerDetails = response.customerReview; } }
private GetCustomerPortalDetailsMobileResponse getCustomerDetailsWithProfilePic(GetCustomerPortalDetailsMobileRequest portalDetailsMobileRequest, string token) { GetCustomerPortalDetailsMobileResponse response = new GetCustomerPortalDetailsMobileResponse(); try { response = customoerController.getCustomerDetailsWithProfilePic(portalDetailsMobileRequest, token); } catch (Exception ex) { throw ex; } return(response); }
public GetCustomerPortalDetailsMobileResponse getCustomerDetailsWithProfilePic(GetCustomerPortalDetailsMobileRequest portalDetailsMobileRequest, string token) { GetCustomerPortalDetailsMobileResponse result = null; try { using (var client = new HttpClient()) { client.BaseAddress = new Uri(ConstantData.ApiURL.ToString() + "CustomerMobile/GetProfile"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var myContent = JsonConvert.SerializeObject(portalDetailsMobileRequest); 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; result = JsonConvert.DeserializeObject <GetCustomerPortalDetailsMobileResponse>(responseStream); } } } catch (Exception ex) { throw ex; } return(result); }