protected void Page_Load(object sender, EventArgs e)
        {
            width = Request.QueryString["w"];
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            hotro = Request.QueryString["hotro"];
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            if (!IsPostBack)
            {
                _info = Get_User_Agent_Info();
                //Detail
                DataTable dtDetail = GameController.GetGameDetailByIDHasCache(Session["telco"].ToString(), id);
                //end detail
                if (dtDetail.Rows.Count > 0)
                {
                    lnkCateChannel.NavigateUrl = UrlProcess.GetGameCategoryUrlNew(lang.ToString(), width, dtDetail.Rows[0]["W_GameCategoryID"].ToString(), hotro);
                    lnkHomeChannel.NavigateUrl = UrlProcess.GetGameHomeUrlNew(lang.ToString(), width, hotro);

                    rptDetail.DataSource     = dtDetail;
                    rptDetail.ItemDataBound += rptDetail_ItemDataBound;
                    rptDetail.DataBind();

                    Price = ConfigurationSettings.AppSettings.Get("gameprice");
                    if (id == 1402 || id == 1401)
                    {
                        Price = "5000";
                    }
                    if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + dtDetail.Rows[0]["W_GameCategoryID"] + ",") > -1)
                    {
                        freecate = true;
                    }
                    if (freecate == true)
                    {
                        Price = "0";
                    }
                    if (lang == 1)
                    {
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper();
                    }
                    else
                    {
                        lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper();
                    }


                    int       totaltopdownload = 0;
                    DataTable dtltopdownload   = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_GameCategoryID"]), 0, pagesize, 1, out totaltopdownload);
                    rptGameCungLoai.DataSource     = dtltopdownload;
                    rptGameCungLoai.ItemDataBound += rptlstCategory_ItemDataBound;
                    rptGameCungLoai.DataBind();
                }
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int totalrecord = 0;

            width = Request.QueryString["w"];
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]);

            _info = Get_User_Agent_Info();

            //Tải nhiều nhất
            //DataTable dtHottest = GameController.GetAllGameByCategoryAndDisplayType(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, 30, 1, out totalrecord);
            //DataTable dtHottest = GameController.GetAllGameByCateTypeAndAgentNoCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, 30, 1, out totalrecord);

            var dtHottest = new DataTable();

            dtHottest = GameController.GetAllGameByCateTypeAndAgentNoCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, 30, 1, out totalrecord);
            if (dtHottest.Rows.Count == 0)
            {
                dtHottest = GameController.GetAllGameByCategoryAndDisplayType(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, 30, 1, out totalrecord);
            }

            if (dtHottest != null && dtHottest.Rows.Count > 0)
            {
                string gameLink = UrlProcess.GetGameHomeUrlNew(lang.ToString(), width, hotro.ToString());

                lnkXemThem.NavigateUrl = gameLink;

                Random rnd = new Random();
                while (dtHottest.Rows.Count > 3)
                {
                    dtHottest.Rows.RemoveAt(rnd.Next(0, dtHottest.Rows.Count));
                    dtHottest.AcceptChanges();
                }
                rptGame.DataSource     = dtHottest;
                rptGame.ItemDataBound += rptGame_ItemDataBound;
                rptGame.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width = ConvertUtility.ToInt32(Request.QueryString["w"]).ToString();

            if (!IsPostBack)
            {
                string msisdn = ConvertUtility.ToString(Session["msisdn"]);
                if (lang == "1")
                {
                    if (string.IsNullOrEmpty(msisdn))
                    {
                        ltrXinChao.Text = "Xin chào : <span class=\"pink bold\">khách</span>";
                    }
                    else
                    {
                        ltrXinChao.Text = "Xin chào thuê bao : <span class=\"pink bold\">" + msisdn + "</span>";
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(msisdn))
                    {
                        ltrXinChao.Text = "Xin chao : <span class=\"pink bold\">khach</span>";
                    }
                    else
                    {
                        ltrXinChao.Text = "Xin chao thue bao : <span class=\"pink bold\">" + msisdn + "</span>";
                    }
                }

                string gameUrl  = UrlProcess.GetGameHomeUrlNew(lang, width, "0");
                string musicUrl = UrlProcess.GetMusicHomeUrlNew(lang, width);
                string clipUrl  = UrlProcess.GetVideoHomeUrlNew(lang, width);

                string rawUrl = HttpContext.Current.Request.RawUrl;

                if (rawUrl.Contains("/Game/"))
                {
                    litGame.Text = "<a style=\"text-decoration: none;color:#FF8000; font-weight:bold;\" href=\" " + gameUrl + " \">Game</a>";
                }
                else
                {
                    litGame.Text = "<a style=\"text-decoration: none;color:Black;\" href=\" " + gameUrl + " \">Game</a>";
                }

                if (rawUrl.Contains("/Video/"))
                {
                    litClip.Text = "<a style=\"text-decoration: none;color:#FF8000; font-weight:bold;\" href=\"" + clipUrl + "\">Clip</a>";
                }
                else
                {
                    litClip.Text = "<a style=\"text-decoration: none;color:Black;\" href=\"" + clipUrl + "\">Clip</a>";
                }

                if (rawUrl.Contains("/Music/"))
                {
                    litMusic.Text = "<a style=\"text-decoration: none;color:#FF8000; font-weight:bold;\" href=\"" + musicUrl + "\"> Music </a>";
                }
                else
                {
                    litMusic.Text = "<a style=\"text-decoration: none;color:Black;\" href=\"" + musicUrl + "\"> Music </a>";
                }
            }
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("gameprice");
            lang  = Request.QueryString["lang"];
            hotro = Request.QueryString["hotro"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            if (id == 1402 || id == 1401)
            {
                price = "15000";
            }
            telCo   = Session["telco"].ToString();
            linkStr = "<a href=\"../" + UrlProcess.GetGameHomeUrlNew(lang, width.ToString(), hotro).Replace("~/", "") + "\" >GAME<a>";

            if (!IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width.ToString() + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                DataTable dtDetail = GameController.GetGameDetailByID(Session["telco"].ToString(), id);
                if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + dtDetail.Rows[0]["W_GameCategoryID"].ToString() + ",") > -1 || (",1712,1713,").IndexOf("," + id.ToString() + ",") > -1)
                {
                    freecate = true;
                    HienThiNoiDung(true);
                    return;
                }
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("gamecode") + " " + dtDetail.Rows[0]["Game_Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("gamecommandcode") + "</b> để tải game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                        if (id == 1402 || id == 1401)
                        {
                            ltrSMS.Text = "Soạn tin <b>HOT</b> gửi <b>333</b> để tải game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                        }
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("gamecode") + " " + dtDetail.Rows[0]["Game_Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("gamecommandcode") + "</b> de tai game <b>" + dtDetail.Rows[0]["GameName"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                        if (id == 1402 || id == 1401)
                        {
                            ltrSMS.Text = "Soan tin <b>HOT</b> gui <b>333</b> de tai game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                        }
                    }
                }
                else
                {
                    pnlThongBao.Visible = false;
                    switch (Session["telco"].ToString())
                    {
                    case "Vietnamobile":
                        WapXzone_VNM.Library.VNMCharging.VNMChargingGW charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();

                        //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), price, "D", "JG", Request.QueryString["id"].ToString());
                        //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN");

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "JG", Request.QueryString["id"] + "|Game: " + dtDetail.Rows[0]["GameNameUnicode"]);

                        if (messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false);
                        }
                        break;
                    }
                }
            }
        }