public RegisterStepThreePage(UserRegistrationRequest objUserRegistrationRequest, RetailerList objRetailerList)
        {
            InitializeComponent();
            NavigationPage.SetBackButtonTitle(this, "");
            XFLblTAC.Text    = $"T&C";
            _objRetailerList = new RetailerList();
            if (objRetailerList != null)
            {
                _objRetailerList = objRetailerList;

                imgCompanyLogo.Source   = objRetailerList.imagePath;
                XFLBLCompanyRate.Text   = $"{objRetailerList.rate:0.00}" + "c";
                XFBTN_Duration.Text     = objRetailerList.duration + " Months";
                xflblnoAccounttext.Text = "Haven't started electric service at this address yet? Call " + objRetailerList.retailerName + "at " + objRetailerList.phoneNumber + " and set up an account for this address. Then enter the 20-digit number to complete your order.";
            }

            _objUserRegistrationRequest = new UserRegistrationRequest();
            _objUserRegistrationRequest = objUserRegistrationRequest;

            this.BindingContext = _objUserRegistrationRequest;

            _objUserRegistrationResponse = new UserRegistrationResponse();

            _apiService     = new RestApi();
            _baseUrl        = Domain.Url + Domain.UserSignUpApiConstant;
            _objHeaderModel = new HeaderModel();
        }
Exemplo n.º 2
0
        public RegisterStepOnePage(RetailerList objRetailerList)
        {
            InitializeComponent();
            NavigationPage.SetBackButtonTitle(this, "");
            XFLblTAC.Text = $"T&C";
            _objGetDetailsFromZipcodeResponse = new GetDetailsFromZipcodeResponse();
            _baseUrl         = Domain.Url + Domain.GetDetailsByZipCode;
            _objHeaderModel  = new HeaderModel();
            _apiService      = new RestApi();
            _objRetailerList = new RetailerList();
            if (Settings.IsLoggedIn)
            {
                xfGridPass.IsVisible = false;
            }
            if (objRetailerList != null)
            {
                _objRetailerList = objRetailerList;

                imgCompanyLogo.Source = objRetailerList.imagePath;
                XFLBLCompanyRate.Text = $"{objRetailerList.rate:0.00}" + "c";
                XFBTN_Duration.Text   = objRetailerList.duration + " Months";
            }

            _objUserRegistrationRequest = new UserRegistrationRequest();
            GetDeatailsFromZipCode();
        }
        private void XFPlanDetail_Clicked(object sender, EventArgs e)
        {
            Image        image           = (Image)sender;
            object       bindingContext  = image.BindingContext;
            RetailerList objRetailerList = bindingContext as RetailerList;

            App.NavigationPage.Navigation.PushAsync(new PlansDetails(objRetailerList));
        }
        private void XFBtnPlanDetail_Clicked(object sender, EventArgs e)
        {
            Button       btn             = (Button)sender;
            object       bindingContext  = btn.BindingContext;
            RetailerList objRetailerList = bindingContext as RetailerList;

            App.NavigationPage.Navigation.PushAsync(new RegisterStepOnePage(objRetailerList));
        }
Exemplo n.º 5
0
        public PlansDetails(RetailerList objRetailerList)
        {
            InitializeComponent();

            _objRetailerList = new RetailerList();
            _objRetailerList = objRetailerList;

            _objElectricityAndGasPlanDetailsResponse = new ElectricityAndGasPlanDetailsResponse();

            _apiService = new RestApi();
            _baseUrl    = Domain.Url + Domain.ElectricityAndGasDetailApiConstant;

            XFLabelPlanTitle.Text = objRetailerList.retailerName;
            imgCompanyLogo.Source = objRetailerList.imagePath;

            GetPlanDetailsbyId();
        }
        public RegisterStepTwoPage(UserRegistrationRequest objUserRegistrationRequest, RetailerList objRetailerList)
        {
            InitializeComponent();
            NavigationPage.SetBackButtonTitle(this, "");
            XFLblTAC.Text    = $"T&C";
            _objRetailerList = new RetailerList();
            if (objRetailerList != null)
            {
                _objRetailerList = objRetailerList;

                imgCompanyLogo.Source = objRetailerList.imagePath;
                XFLBLCompanyRate.Text = $"{objRetailerList.rate:0.00}" + "c";
                XFBTN_Duration.Text   = objRetailerList.duration + " Months";

                TCfirst.Text = "I agree that I have read and understood the Terms and Conditions " +
                               "of" + _objRetailerList.retailerName + "and I hereby agree to be bound by them. " +
                               "I am authorized to make this change for my household, and the account ";

                TCsecond.Text = " allow " + _objRetailerList.retailerName + " and its contractors or affiliates to " +
                                "contact me at the phone number I provided in this enrollment. " +
                                "Contacts by " + _objRetailerList.retailerName + " may be made using automatic" +
                                " dialers, text messaging, or prerecorded messages." +
                                " I understand that I am responsible for any charges" +
                                " by my cellular phone carrier that may result from such " +
                                "contacts. I understand that I can revoke this consent at any time.";

                TCThird.Text = " verify that all information is correct, and " +
                               "that I have authorization to change this account. I understand that " +
                               "electronic acceptance of the sales agreement and " +
                               "Terms or Service is an agreement to initiate service and begin enrollment.";
            }

            _objUserRegistrationRequest = new UserRegistrationRequest();
            _objUserRegistrationRequest = objUserRegistrationRequest;

            this.BindingContext = _objUserRegistrationRequest;
        }
Exemplo n.º 7
0
        /// <param name='city'>
        /// Required.
        /// </param>
        /// <param name='state'>
        /// Required.
        /// </param>
        /// <param name='diamond'>
        /// Optional.
        /// </param>
        /// <param name='radius'>
        /// Optional.
        /// </param>
        /// <param name='page'>
        /// Optional.
        /// </param>
        /// <param name='pagesize'>
        /// Optional.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public async Task <HttpOperationResponse <RetailerList> > FindByCityAndStateWithOperationResponseAsync(string city, string state, bool?diamond = null, double?radius = null, int?page = null, int?pagesize = null, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            // Validate
            if (city == null)
            {
                throw new ArgumentNullException("city");
            }
            if (state == null)
            {
                throw new ArgumentNullException("state");
            }

            // Tracing
            bool   shouldTrace  = ServiceClientTracing.IsEnabled;
            string invocationId = null;

            if (shouldTrace)
            {
                invocationId = ServiceClientTracing.NextInvocationId.ToString();
                Dictionary <string, object> tracingParameters = new Dictionary <string, object>();
                tracingParameters.Add("city", city);
                tracingParameters.Add("state", state);
                tracingParameters.Add("diamond", diamond);
                tracingParameters.Add("radius", radius);
                tracingParameters.Add("page", page);
                tracingParameters.Add("pagesize", pagesize);
                ServiceClientTracing.Enter(invocationId, this, "FindByCityAndStateAsync", tracingParameters);
            }

            // Construct URL
            string url = "";

            url = url + "/retailers/findbycityandstate";
            List <string> queryParameters = new List <string>();

            queryParameters.Add("city=" + Uri.EscapeDataString(city));
            queryParameters.Add("state=" + Uri.EscapeDataString(state));
            if (diamond != null)
            {
                queryParameters.Add("diamond=" + Uri.EscapeDataString(diamond.Value.ToString().ToLower()));
            }
            if (radius != null)
            {
                queryParameters.Add("radius=" + Uri.EscapeDataString(radius.Value.ToString()));
            }
            if (page != null)
            {
                queryParameters.Add("page=" + Uri.EscapeDataString(page.Value.ToString()));
            }
            if (pagesize != null)
            {
                queryParameters.Add("pagesize=" + Uri.EscapeDataString(pagesize.Value.ToString()));
            }
            if (queryParameters.Count > 0)
            {
                url = url + "?" + string.Join("&", queryParameters);
            }
            string baseUrl = this.Client.BaseUri.AbsoluteUri;

            // Trim '/' character from the end of baseUrl and beginning of url.
            if (baseUrl[baseUrl.Length - 1] == '/')
            {
                baseUrl = baseUrl.Substring(0, baseUrl.Length - 1);
            }
            if (url[0] == '/')
            {
                url = url.Substring(1);
            }
            url = baseUrl + "/" + url;
            url = url.Replace(" ", "%20");

            // Create HTTP transport objects
            HttpRequestMessage httpRequest = new HttpRequestMessage();

            httpRequest.Method     = HttpMethod.Get;
            httpRequest.RequestUri = new Uri(url);

            // Set Credentials
            if (this.Client.Credentials != null)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await this.Client.Credentials.ProcessHttpRequestAsync(httpRequest, cancellationToken).ConfigureAwait(false);
            }

            // Send Request
            if (shouldTrace)
            {
                ServiceClientTracing.SendRequest(invocationId, httpRequest);
            }
            cancellationToken.ThrowIfCancellationRequested();
            HttpResponseMessage httpResponse = await this.Client.HttpClient.SendAsync(httpRequest, cancellationToken).ConfigureAwait(false);

            if (shouldTrace)
            {
                ServiceClientTracing.ReceiveResponse(invocationId, httpResponse);
            }
            HttpStatusCode statusCode = httpResponse.StatusCode;

            cancellationToken.ThrowIfCancellationRequested();
            string responseContent = await httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);

            if (statusCode != HttpStatusCode.OK)
            {
                HttpOperationException <object> ex = new HttpOperationException <object>();
                ex.Request  = httpRequest;
                ex.Response = httpResponse;
                ex.Body     = null;
                if (shouldTrace)
                {
                    ServiceClientTracing.Error(invocationId, ex);
                }
                throw ex;
            }

            // Create Result
            HttpOperationResponse <RetailerList> result = new HttpOperationResponse <RetailerList>();

            result.Request  = httpRequest;
            result.Response = httpResponse;

            // Deserialize Response
            if (statusCode == HttpStatusCode.OK)
            {
                RetailerList resultModel = new RetailerList();
                JToken       responseDoc = null;
                if (string.IsNullOrEmpty(responseContent) == false)
                {
                    responseDoc = JToken.Parse(responseContent);
                }
                if (responseDoc != null)
                {
                    resultModel.DeserializeJson(responseDoc);
                }
                result.Body = resultModel;
            }

            if (shouldTrace)
            {
                ServiceClientTracing.Exit(invocationId, result);
            }
            return(result);
        }