Example #1
0
    protected void Page_Load(object sender, EventArgs e)


    {
        string msisdn = ms.GetMSISDN();

        if (!msisdn.StartsWith("8801"))
        {
            //  Response.Redirect("CheckOperator.aspx");
        }
        #region "MSISDN"
        if (Session["MSISDN"] == null)
        {
            try
            {
                if (string.IsNullOrEmpty(oUAProfile.GetMSISDN()) || oUAProfile.GetMSISDN().StartsWith("Error"))
                {
                    throw new Exception();
                }
                else
                {
                    sMsisdn = oUAProfile.GetMSISDN();
                }
            }
            catch //(Exception ex)
            {
                sMsisdn = string.Empty;
            }
        }
        else
        {
            sMsisdn = Session["MSISDN"].ToString();
        }


        #endregion "MSISDN"


        #region Profiling

        if (Session["HSOS"] == null)
        {
            HS_OS = "Android";
            //pavel
            //string UAPROF_URL = oUAProfile.GetUserAgent();


            //HSProfiling.Service profile = new HSProfiling.Service();
            //var HSProfiling = profile.HansetDetection(UAPROF_URL, oUAProfile.GetUAProfileXWap());


            //HS_OS = HSProfiling.OS;
            //UAPROF_URL = HSProfiling.UAXML;
            //pavel
        }

        else
        {
            HS_OS = Session["HSOS"].ToString();
        }
        #endregion Profiling


        if (!isSubscribe(sMsisdn) && !sMsisdn.StartsWith("88018"))
        {
            //pavel Response.Redirect("Default.aspx");
        }
        else if (!isSubscribe(sMsisdn) && sMsisdn.StartsWith("88018"))
        {
            //pavel Response.Redirect("~/Confirmation.aspx");
        }

        if (HS_OS == "iOS")
        {
            smartphone = true;
        }
        else if (HS_OS == "Firefox")
        {
            smartphone = true;
        }
        else if (HS_OS == "Android")
        {
            smartphone = true;
        }
        else if (HS_OS == "Windows Phone")
        {
            smartphone = true;
        }
        else if (HS_OS == "Desktop")
        {
            smartphone = true;
        }
        if (smartphone)
        {
        }
        else
        {
            smartphone1.Style.Add("display", "none");
            fphone.Style.Add("display", "block");
        }

        string scriptForBl = @" $(document).ready(function() {

           $('.vdtitle').css('background-color','#58c1e6');
           
             
              });";



        cssTemplate.Attributes.Add("href", "~/Css/StyleSheetBL.css");
        ScriptManager.RegisterStartupScript(this, this.GetType(), "myScriptName", scriptForBl, true);
        imgMore.ImageUrl = "~/images/more.png";


        CategoryCode = Request.QueryString["CategoryCode"].ToString().Trim();
        if (CategoryCode.Equals("E564F048-1AD7-450A-BA81-47409FC58BFE") ||
            CategoryCode.Equals("7E8B1C80-EB99-402C-BE1E-00E7F7C99A3F"))
        {
            lblten.Visible = true;
            if (sMsisdn.StartsWith("88019") || sMsisdn.StartsWith("88016"))
            {
                lblten.Text = "<b>Price:</b> Tk 20(+VAT, SD and SC)";
            }
            else
            {
                lblten.Text = "<b>Price:</b> Tk 10(+VAT, SD and SC)";
            }
            lblten.ForeColor = Color.Red;
        }

        if ((Request.QueryString["CategoryCode"].ToString() == "01A332B2-A207-44B9-9D3C-F85A1563571A") || (Request.QueryString["CategoryCode"].ToString() == "873E3EA9-3A28-484B-B74B-68C107DDD800"))
        {
            imgMore.Visible = false;
        }


        if (!IsPostBack)
        {
            if (Session["endUserId"] != null)
            {
                sMsisdn = Session["endUserId"].ToString();
            }

            GpSubUnsubConfig();


            Loadcontent();
            //pavel loadAudioInfo();
            LoadRelatedvideo();
            sMobNo = ms.GetMSISDN();
            bool subs = isSubscribe(sMobNo);
            cancelSubscriptionBlink.Visible = subs;
            //   HS_MANUFAC = Session["HS_MANUFAC"].ToString();
            //HS_MOD = Session["HS_MOD"].ToString();
            //HS_DIM = Session["HS_DIM"].ToString();
            //HS_OS = Session["HS_OS"].ToString();
            //SOURCE_URL = System.Web.HttpContext.Current.Request.Url.AbsoluteUri;
            //UAPROF_URL = Session["UAPROF_URL"].ToString();
            string PORTAL_N_SHORT = "JossBody/JB";
            CA.ExecuteNonQuery("EXEC [AurkoCRM].[dbo].[spInsertPortalVisitLog]'" + SOURCE_URL + "','" + "JossBody:Home" + "','" + oUAProfile.Decode(sMsisdn) + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + HS_DIM + "','" + APN + "','" + PORTAL_N_SHORT + "','" + HS_OS + "','" + Request.UserAgent + "','" + oUAProfile.GetUserIP() + "','13'", "Aurko");
        }
    }
Example #2
0
    private string SubscriberStatus(string MSISDN)
    {
        MSISDN = oUAProfile.Decode(MSISDN);
        string Status = string.Empty;
        //STEP2: Subscriber Exist or not
        object IsUser = CA.getSingleValue("Select RegDate from [DPDP].[dbo].[tblBase] where MSISDN= '" + MSISDN + "' AND RegStatus!=0 AND serviceID=13", "DPDP");

        if (IsUser != null) //If Subscriber Exist
        {
            DateTime LastChg_dt  = Convert.ToDateTime(IsUser);
            DateTime CurrentDate = System.DateTime.Now.Date;
            DateTime NextDate    = CurrentDate.AddHours(-24);
            if (LastChg_dt.Date < NextDate) //Chk 48 Hr Charging Status
            {
                //IF:NO CHARGING STAUS FOUND:Charging Here Then Display the Content
                //string ReplyCGW = CGW(MSISDN); //STEP3: CHARGING; MACHANISM
                string ReplyCGW = "SUCCESSFUL"; //STEP3: CHARGING; MACHANISM
                if (ReplyCGW == "SUCCESSFUL")
                {
                    Status = "Y";
                    if (sMsisdn.StartsWith("88017"))
                    {
                        CA.ExecuteNonQuery("EXEC [Partner_API].[dbo].[spProcessRequestOnlineAdvertisement] '" + sMsisdn + "','SB'", "WAPDB");
                    }
                    else
                    {
                        CA.ExecuteNonQuery("EXEC Sp_UPDATE_SUBSCRIBER_STATUS_BY_ONLINE_CHARGING '" + MSISDN + "'", "SBDB");
                    }
                }
                else
                {
                    Status = "Y";
                    //lblMsg.ForeColor = Color.Red;
                    //lblMsg.Text = "Your registration is temporayly block.Please top up your account & visit again.";
                }
            }
            else //SUBSCRIPTION CHARGING OCCURED & SUBSCRIBER LIVE FOR GET CONTENT
            {
                Status = "Y";
            }
        }
        else //FOR NEW SUBSCRIBER
        {
            if (MSISDN.StartsWith("88017"))
            {
                Status = "Y";
            }


            try
            {
                string GPBC = Request.QueryString["source"].ToString();
                if (GPBC == "GP")
                {
                    GPURL = "&source=GP";
                }
            }
            catch { }



            //string ReplyCGW = CGW(MSISDN);
            //if (ReplyCGW == "SUCCESSFUL")
            //{
            //    Status = "Y";

            //    oCDA.ExecuteNonQuery("EXEC ShaboxBuddy.dbo.spInsertSubscriberBuddy 1"+",'"+sMsisdn+"','"+HS_MANUFAC+"','"+HS_MOD+"','"+ "WAP"+"','1','"+"1"+"','"+System.DateTime.Now+"'", "SBDB");
            //}
            //else // ENTRY SUBSCRIBER WHITHOUT CHARGING BUT WILL TRY TO CHARGE NEXT DAY / NEXT VISIT
            //{
            //    Status = "N";
            //    oCDA.ExecuteNonQuery("EXEC ShaboxBuddy.dbo.spInsertSubscriberBuddy 1" + ",'" + sMsisdn + "','" + HS_MANUFAC + "','" + HS_MOD + "','" + "WAP" + "','-1','" + "0" + "','" + System.DateTime.Now + "'", "SBDB");
            //}
            // Charging & Insert Into Subscriber Table.
        }

        return(Status);
    }