Beispiel #1
0
        protected void verifyCode_Click(object sender, EventArgs e)
        {
            WebClient client           = new WebClient();
            string    pin              = verifyCodeTextBox.Text;
            string    msisdn           = Session["Login_msisdn"].ToString();
            var       WifiCodeUrl      = KeyConstant.BaseAddress + "Wifi/VerifyWifiCode?msisdn=" + msisdn + "&wificode=" + pin;
            var       smsData          = client.DownloadString(WifiCodeUrl);
            Code      VerificationCode = new JavaScriptSerializer().Deserialize <Code>(smsData);

            if (VerificationCode.reply.ToLower().Contains("success"))
            {
                Session[KeyConstant.Session_msisdn]         = msisdn;
                Session[KeyConstant.Session_Content_Access] = "1";
                SiteMaster master = (SiteMaster)this.Master;
                master.SubscriptionCheck();
                if ((string)Session[KeyConstant.Session_subscribed] == "0")
                {
                    Response.Redirect("~/subscription.aspx");
                }
                else
                {
                    Response.Redirect("home.aspx");
                }
            }
            else
            {
                lblInvalidCode.Text         = "Invalid Pin.Please Try Again";
                verifyCodeTextBox.Visible   = true;
                btnVerifyCodeButton.Visible = true;
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Session[KeyConstant.PageId] = "131";

            if (Request.QueryString["resultCode"] != null)
            {
                string cnfmResult      = Request.QueryString["cnfmResult"].ToString() == "" ? "0" : Request.QueryString["cnfmResult"].ToString();
                string resultCode      = Request.QueryString["resultCode"].ToString() == "" ? "69" : Request.QueryString["resultCode"].ToString();
                string isDoubleConfrim = Request.QueryString["isDoubleConfrim"].ToString() == "" ? "9" : Request.QueryString["isDoubleConfrim"].ToString();
                string transactionId   = Request.QueryString["transactionId"].ToString() == "" ? "0" : Request.QueryString["transactionId"].ToString();
                var    callURL         = new WebClient();
                callURL.DownloadString("http://crux.bongobd.com/api/Consent/RobiConsentResponse?msisdn=" + Session[KeyConstant.Session_msisdn].ToString() + "&cnfmResult=" + cnfmResult + "&resultCode=" + resultCode + "&isDoubleConfrim=" + isDoubleConfrim + "&transactionId=" + transactionId);
                //Session[ServiceInformation_Generic.Session_promo] = 0;
            }


            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
            if (Request.QueryString["ref"] != null)
            {
                SiteMaster master = (SiteMaster)this.Master;
                master.getMSISDN();

                if (Request.QueryString["ref"] == "smssub")
                {
                    Response.Redirect("~/subscription.aspx");
                }
            }



            if (!IsPostBack)
            {
                GetTopnews();
                GetLatestNews();
                PopularNews();
                ddlDivisionLoad();
                GetPhotoGalary();

                // GetSportsNews();
            }
        }