protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int totalrecord = 0; _info = Get_User_Agent_Info(); DataTable dtHottest = GameController.GetAllGameByCateTypeAndAgentNoCache(Constant.T_Vietnamobile, 15, (int)Constant.Game.Topdownload, _info, 30, 1, out totalrecord); if (dtHottest.Rows.Count == 0) { dtHottest = GameController.GetAllGameByCategoryAndDisplayType(Constant.T_Vietnamobile, 15, (int)Constant.Game.Topdownload, 30, 1, out totalrecord); } Random rnd = new Random(); while (dtHottest.Rows.Count > 6) { dtHottest.Rows.RemoveAt(rnd.Next(0, dtHottest.Rows.Count)); dtHottest.AcceptChanges(); } //IList<DataRow> contentTop = dtHottest.Select().Skip(0).Take(1).ToList(); IList <DataRow> contentBottom = dtHottest.Select().Skip(0).Take(6).ToList(); //rptTop.DataSource = contentTop.CopyToDataTable(); //rptTop.DataBind(); rptBottom.DataSource = contentBottom.CopyToDataTable(); rptBottom.DataBind(); //rptGameHay.DataSource = dtHottest; //rptGameHay.DataBind(); } }
protected User_AgentInfo Get_User_Agent_Info() { if (Application["wurflFileProcessor"] == null) { string s_path = HttpContext.Current.Request.MapPath("WURFL_Data\\wurfl.xml"); Application["wurflFileProcessor"] = new wurflApi.deviceFileProcessor(s_path); } wurflApi.deviceFileProcessor o_deviceFileProcessor = (Application["wurflFileProcessor"] as wurflApi.deviceFileProcessor); // prepare capability getter wurflApi.capabilitiesGetter o_capabilityGetter = new wurflApi.capabilitiesGetter(ref o_deviceFileProcessor); // o_capabilityGetter.prepareNavigatorModelCapabilities(Request); if (txtUserAgentName.Text == "") { // current device o_capabilityGetter.prepareNavigatorModelCapabilities(Request); } else { o_capabilityGetter.prepareNavigatorModelCapabilities(txtUserAgentName.Text); } User_AgentInfo _info = new User_AgentInfo(); _info.device_os = o_capabilityGetter.getCapability("device_os"); _info.mobile_browser = o_capabilityGetter.getCapability("mobile_browser"); _info.resolution_width = o_capabilityGetter.getCapability("resolution_width"); _info.resolution_height = o_capabilityGetter.getCapability("resolution_height"); _info.model_name = o_capabilityGetter.getCapability("model_name"); _info.brand_name = o_capabilityGetter.getCapability("brand_name"); return(_info); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (Application["wurflFileProcessor"] == null) { string s_path = HttpContext.Current.Request.MapPath("WURFL_Data\\wurfl.xml"); Application["wurflFileProcessor"] = new wurflApi.deviceFileProcessor(s_path); } wurflApi.deviceFileProcessor o_deviceFileProcessor = (Application["wurflFileProcessor"] as wurflApi.deviceFileProcessor); // prepare capability getter wurflApi.capabilitiesGetter o_capabilityGetter = new wurflApi.capabilitiesGetter(ref o_deviceFileProcessor); if (txtUserAgentName.Text == "") { // current device o_capabilityGetter.prepareNavigatorModelCapabilities(Request); } else { o_capabilityGetter.prepareNavigatorModelCapabilities(txtUserAgentName.Text); } // output result to label User_AgentInfo _info = new User_AgentInfo(); string s_result = "Width: " + o_capabilityGetter.getCapability("resolution_width"); s_result += " - Height: " + o_capabilityGetter.getCapability("resolution_height") + ";"; s_result += "Dinh dang anh ho tro: Jpg(" + o_capabilityGetter.getCapability("jpg") + ") -"; s_result += " Gif(" + o_capabilityGetter.getCapability("gif") + ") -"; s_result += " Anh dong(" + o_capabilityGetter.getCapability("gif_animated") + ");"; s_result += " He dieu ha`nh: " + o_capabilityGetter.getCapability("device_os") + ";"; s_result += " Tri`nh duyet: " + o_capabilityGetter.getCapability("mobile_browser") + ";"; txtResult.Text = s_result; o_capabilityGetter.destroy(); }
protected void Page_Load(object sender, EventArgs e) { width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = Request.QueryString["hotro"]; width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); _info = Get_User_Agent_Info(); int totalrecord = 0; if (lang == 1) { litGia.Text = "(Giá: " + AppEnv.GetSetting("gameprice") + " đ/game)"; } else { litGia.Text = "(Gia: " + AppEnv.GetSetting("gameprice") + " d/game)"; } //Tải nhiều nhất DataTable dtHottest = GameController.GetAllGameByCategoryAndDisplayType(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, 1, out totalrecord); 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 btnLogin_Click(object sender, EventArgs e) { User_AgentInfo info = Get_User_Agent_Info(); width = info.resolution_width; if (ConvertUtility.ToInt32(width) == 0 || ConvertUtility.ToInt32(width) >= 480) { width = ConvertUtility.ToString((int)Constant.DefaultScreen.Standard); } string urlRes = AppEnv.GetSetting("WapDefault") + UrlProcess.GetWapHomeUrl("1", width).Replace("~", ""); string msisdn = txtSDT.Text.Trim(); string model = AppEnv.GetUserAgent(); if (!string.IsNullOrEmpty(msisdn)) { if (validateMobileNumber(msisdn)) { if (msisdn.StartsWith("0")) { msisdn = msisdn.Replace("0", "84"); } if (S2_TTKD_GetUserInfo(msisdn)) { Session["msisdn"] = txtSDT.Text.Trim(); //vào trang default if (model == "high") { urlRes = AppEnv.GetSetting("WapDefault") + "/login.aspx"; Response.Redirect(urlRes); } else { Response.Redirect(urlRes); } } else { //thông báo chưa đăng ký dịch vụ lblAlert.Text = "Thuê bao " + msisdn + " chưa đăng ký dịch vụ, vui lòng xem lại !"; litScript.Text = ("<script type=\"text/javascript\">$(function () {$(\"#popup-login\").modal(); }) </script>"); } } else { lblAlert.Text = "Thuê bao " + msisdn + " không tồn tại, vui lòng xem lại !"; litScript.Text = ("<script type=\"text/javascript\">$(function () {$(\"#popup-login\").modal(); }) </script>"); } } else { lblsdt.Text = "Bạn chưa nhập số điện thoại, vui lòng xem lại !"; } }
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(); } } }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); _info = Get_User_Agent_Info(); if (Session["msisdn"] != null) { string value = AppEnv.GetRegisterService(Session["msisdn"].ToString(), AppEnv.GetSetting("S2DK_Game")); if (value == "1") { // pnlS2DkGame2.Visible = false; } } int totalrecord = 0; if (lang == 0) { //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia_KD + ConfigurationSettings.AppSettings.Get("gameprice") + Resources.Resource.wDonViTien_KD + "/game)"; } else { //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + ConfigurationSettings.AppSettings.Get("gameprice") + Resources.Resource.wDonViTien + "/game)"; } lnkXemThem.NavigateUrl = UrlProcess.GetGameHomeUrl(lang.ToString(), width, "0"); //Tải nhiều nhất //DataTable dtHottest = GameController.GetAllGameByCategoryAndDisplayType(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, 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); } Random rnd = new Random(); while (dtHottest.Rows.Count > 3) { dtHottest.Rows.RemoveAt(rnd.Next(0, dtHottest.Rows.Count)); dtHottest.AcceptChanges(); } rptHottest.DataSource = dtHottest; rptHottest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound); rptHottest.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { User_AgentInfo info = Get_User_Agent_Info(); width = info.resolution_width; height = info.resolution_height; if (ConvertUtility.ToInt32(width) == 0 || ConvertUtility.ToInt32(width) > 400) { width = ConvertUtility.ToString((int)Constant.DefaultScreen.Standard); } ltrimg.Text = " <img src=\"/images/banner1.jpg\" width=\"" + width + "px\" height = \"94%\" />"; //ltrimg.Text = " <img src=\"/images/banner1.jpg\" width=\"" + width + "px\" height = \"" + height + "px\" />"; //ltrimg.Text = " <img src=\"/images/banner1.jpg\" width=\"" + width + "px\" />"; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { _info = Get_User_Agent_Info(); int totalrecord = 0; var dtLastest = new DataTable(); dtLastest = GameController.GetAllGameByCateTypeAndAgent(AppEnv.CheckSessionTelco(), 16, (int)Constant.Game.Lastest, _info, 12, 1, out totalrecord); if (dtLastest.Rows.Count == 0) { dtLastest = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 16, (int)Constant.Game.Lastest, 12, 1, out totalrecord); } rptGameHay.DataSource = dtLastest; rptGameHay.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { _info = Get_User_Agent_Info(); int totalrecord = 0; DataTable dtHotNhat = new DataTable(); DataTable dtMoiNhat = new DataTable(); #region HOT NHAT dtHotNhat = PhanmemController.GetAllAppByCateTypeAndAgent(AppEnv.CheckSessionTelco(), 10, (int)Constant.APP.Topdownload, _info, pagesize, curpage, out totalrecord); if (dtHotNhat.Rows.Count == 0) { dtHotNhat = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 10, (int)Constant.APP.Topdownload, pagesize, curpage, out totalrecord); } if (dtHotNhat.Rows.Count > 0) { rptHotNhat.DataSource = dtHotNhat; rptHotNhat.DataBind(); } #endregion #region MOI NHAT dtMoiNhat = PhanmemController.GetAllAppByCateTypeAndAgent(AppEnv.CheckSessionTelco(), 9, (int)Constant.APP.Lastest, _info, pagesize, tpage, out totalrecord); if (dtMoiNhat.Rows.Count == 0) { dtMoiNhat = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 9, (int)Constant.APP.Lastest, pagesize, tpage, out totalrecord); } if (dtMoiNhat.Rows.Count > 0) { rptMoiNhat.DataSource = dtMoiNhat; rptMoiNhat.DataBind(); } #endregion } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { int catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); _info = Get_User_Agent_Info(); string CatName = string.Empty; DataTable catInfo = GameController.GetCategoryByCatIDHasCache(catID); if (catInfo != null && catInfo.Rows.Count > 0) { CatName = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper(); lblCategoryName.Text = CatName; } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } int totalrecord = 0; var dt = new DataTable(); dt = GameController.GetAllGameByCateTypeAndAgent(AppEnv.CheckSessionTelco(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord); if (dt.Rows.Count == 0) { dt = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord); } rptGameHay.DataSource = dt; rptGameHay.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = UrlProcess.GameChuyenMuc(catID, curpage, CatName); Paging1.queryparam = UrlProcess.GameChuyenMuc(catID, curpage, CatName); } }
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(); } }
//Search App Agent public static DataTable GetAllApp_ItemByKeyAndAgent(string telCo, string strKeySearch, User_AgentInfo _info, int pagesize, int pageIndex, out int totalRecord) { DataCaching data = new DataCaching(); string key = "W4A_Wap_App.GetAllApp_ItemByKeyAndAgent"; string param = "telCo=" + telCo + "&KeySearch=" + strKeySearch + "&info=" + _info.model_name; DataTable dtRetval = (DataTable)data.GetHashCache(key, param); if (dtRetval == null || dtRetval.Rows.Count == 0) { DataTable dtCat = GetAllApp_ItemByKey(telCo, strKeySearch, 9999, 1, out totalRecord); //Xoá những game không hỗ trợ for (int i = 0; i < totalRecord; i++) { if (!MobileUtils.CheckValidModel(dtCat.Rows[i]["ModelSupport"].ToString(), _info)) { dtCat.Rows[i].Delete(); } } dtCat.AcceptChanges(); //Ghi vào cache data.SetHashCache(key, param, GetExpire(), dtCat); dtRetval = dtCat; } totalRecord = dtRetval.Rows.Count; // int vFrom = ((pageIndex - 1) * pagesize); int vTo = pageIndex * pagesize; if (vTo > totalRecord) { vTo = totalRecord; } DataTable dtReturn = dtRetval.Clone(); for (int i = vFrom; i < vTo; i++) { dtReturn.ImportRow(dtRetval.Rows[i]); } return(dtReturn); }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } _info = Get_User_Agent_Info(); int totalrecord = 0; if (lang == 0) { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat_KD; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat_KD; } else { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat; } //Tải nhiều nhất if (hotro == 1) { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage.ToString(), "cpage=1").Replace("tpage=" + tpage.ToString(), "tpage=1"); rptHottest.DataSource = PhanmemController.GetAllAppByCateTypeAndAgent(Session["telco"].ToString(), 10, (int)Constant.APP.Topdownload, _info, pagesize, curpage, out totalrecord); } else { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage.ToString(), "cpage=1").Replace("tpage=" + tpage.ToString(), "tpage=1"); rptHottest.DataSource = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 10, (int)Constant.APP.Topdownload, pagesize, curpage, out totalrecord); } //DataTable dtHottest = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 10, (int)Constant.APP.Topdownload, pagesize, curpage, out totalrecord); //rptHottest.DataSource = dtHottest; rptHottest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound); rptHottest.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; //Mới nhất if (hotro == 1) { rptLastest.DataSource = PhanmemController.GetAllAppByCateTypeAndAgent(Session["telco"].ToString(), 9, (int)Constant.APP.Lastest, _info, pagesize, tpage, out totalrecord); } else { rptLastest.DataSource = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 9, (int)Constant.APP.Lastest, pagesize, tpage, out totalrecord); } //DataTable dtLatest = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 9, (int)Constant.APP.Lastest,pagesize, tpage, out totalrecord); //rptLastest.DataSource = dtLatest; rptLastest.ItemDataBound += new RepeaterItemEventHandler(rptlastest_ItemDataBound); rptLastest.DataBind(); Paging2.totalrecord = totalrecord; Paging2.pagesize = pagesize; Paging2.numberpage = pagenumber; Paging2.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging2.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"] + "&tpage="; if (lang == 1) { if (hotro == 0) { lnkValidModel.Text = "Chỉ hiển thị những phần mềm hỗ trợ"; } else { lnkValidModel.Text = "Hiển thị tất cả các phần mềm"; } } else if (hotro == 0) { lnkValidModel.Text = "Chi hien thi nhung phan mem ho tro"; } else { lnkValidModel.Text = "Hien thi tat ca cac phan mem"; } lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>"; //Quảng cáo if (!IsPostBack) { var advertisementLevel2 = new VmgPortal.Modules.Adsvertising.Advertisement { Channel = "Home", Position = "GameVT1", Param = 0, Lang = Request.QueryString["lang"], Width = width.ToString() }; ltrAdvLevel2.Text = advertisementLevel2.GetAds(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); string CatName = string.Empty; if (catID == ConvertUtility.ToInt32(AppEnv.GetSetting("freecate"))) { freecate = true; } _info = Get_User_Agent_Info(); int totalrecord = 0; DataTable catInfo = PhanmemController.GetCategoryByCatIDHasCache(catID); if (catInfo != null && catInfo.Rows.Count > 0) { lblChuyenMuc.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper(); CatName = catInfo.Rows[0]["Title"].ToString().ToUpper(); } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } DataTable dtList = new DataTable(); if (catID == 9) { dtList = PhanmemController.GetAllAppByCateTypeAndAgent(AppEnv.CheckSessionTelco(), 9, (int)Constant.APP.Lastest, _info, pagesize, curpage, out totalrecord); if (dtList.Rows.Count == 0) { dtList = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 9, (int)Constant.APP.Lastest, pagesize, curpage, out totalrecord); } } else if (catID == 10) { dtList = PhanmemController.GetAllAppByCateTypeAndAgent(AppEnv.CheckSessionTelco(), 10, (int)Constant.APP.Topdownload, _info, pagesize, curpage, out totalrecord); if (dtList.Rows.Count == 0) { dtList = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 10, (int)Constant.APP.Topdownload, pagesize, curpage, out totalrecord); } } else { dtList = PhanmemController.GetAllAppByCateTypeAndAgent(AppEnv.CheckSessionTelco(), catID, (int)Constant.APP.Category, _info, pagesize, curpage, out totalrecord); if (dtList.Rows.Count == 0) { dtList = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), catID, (int)Constant.APP.Category, pagesize, curpage, out totalrecord); } } if (dtList.Rows.Count > 0) { rptList.DataSource = dtList; rptList.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = UrlProcess.PhanMemChuyenMuc(catID, curpage, CatName); Paging1.queryparam = UrlProcess.PhanMemChuyenMuc(catID, curpage, CatName); } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["SubGame"] != null) { pnlHienThi.Visible = true; Session["SubGame"] = null; } preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); //hotro = 1; if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } _info = Get_User_Agent_Info(); //if (Session["serviceList"] != null) //{ // _arrService = Session["serviceList"] as string[]; //} //if (_arrService != null) //{ // if (_arrService.Length > 0) // { // string dkGame = string.Format(AppEnv.GetSetting("S2DK_Game")); // foreach (var item in _arrService) // { // if (item == dkGame) // { // pnlS2DkGame1.Visible = false; // pnlS2DkGame2.Visible = false; // } // } // } //} if (Session["msisdn"] != null) { string value = AppEnv.GetRegisterService(Session["msisdn"].ToString(), AppEnv.GetSetting("S2DK_Game")); if (value == "1") { pnlS2DkGame1.Visible = false; pnlS2DkGame2.Visible = false; } } int totalrecord = 0; if (lang == 0) { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat_KD; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat_KD; } else { ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat; } //Tải nhiều nhất if (hotro == 1) { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage.ToString(), "cpage=1").Replace("tpage=" + tpage.ToString(), "tpage=1"); //rptHottest.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, pagesize, curpage, out totalrecord); } else { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage.ToString(), "cpage=1").Replace("tpage=" + tpage.ToString(), "tpage=1"); //rptHottest.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, curpage, out totalrecord); } var dtHottest = new DataTable(); dtHottest = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, pagesize, curpage, out totalrecord); if (dtHottest.Rows.Count == 0) { dtHottest = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, curpage, out totalrecord); } rptHottest.DataSource = dtHottest; rptHottest.ItemDataBound += rptlastest_ItemDataBound; rptHottest.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; //Mới nhất //if (hotro == 1) //{ // rptLastest.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, _info, pagesize, curpage, out totalrecord); //} //else //{ // rptLastest.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, pagesize, tpage, out totalrecord); //} var dtLastest = new DataTable(); dtLastest = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, _info, pagesize, curpage, out totalrecord); if (dtLastest.Rows.Count == 0) { dtLastest = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, pagesize, tpage, out totalrecord); } rptLastest.DataSource = dtLastest; rptLastest.ItemDataBound += rptlastest_ItemDataBound; rptLastest.DataBind(); Paging2.totalrecord = totalrecord; Paging2.pagesize = pagesize; Paging2.numberpage = pagenumber; Paging2.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging2.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"] + "&tpage="; // if (lang == 1) { if (hotro == 0) { lnkValidModel.Text = "Chỉ hiển thị những game hỗ trợ"; } else { lnkValidModel.Text = "Hiển thị tất cả các game"; } } else if (hotro == 0) { lnkValidModel.Text = "Chi hien thi nhung game ho tro"; } else { lnkValidModel.Text = "Hien thi tat ca cac game"; } lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>"; //Quảng cáo if (!IsPostBack) { var advertisementLevel2 = new VmgPortal.Modules.Adsvertising.Advertisement { Channel = "Home", Position = "GameVT1", Param = 0, Lang = Request.QueryString["lang"], Width = width.ToString() }; ltrAdvLevel2.Text = advertisementLevel2.GetAds(); } }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); //hotro = 1; _info = Get_User_Agent_Info(); if (!IsPostBack) { lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); if (lang == 1) { ltrTenChuyenMuc.Text = "KẾT QUẢ TÌM KIẾM"; } } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } //start result list int totalrecord = 0; if (hotro == 1) { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage, "cpage=1"); rptResult.DataSource = GameController.GetAllGame_ItemByKeyAndAgent(Session["telco"].ToString(), Request.QueryString["key"], _info, pagesize, curpage, out totalrecord); } else { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage, "cpage=1");; rptResult.DataSource = GameController.GetAllGame_ItemByKey(Session["telco"].ToString(), Request.QueryString["key"], pagesize, curpage, out totalrecord); } rptResult.ItemDataBound += rptlstResult_ItemDataBound; rptResult.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&key=" + Request.QueryString["key"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&key=" + Request.QueryString["key"] + "&cpage="; //end result list if (totalrecord == 0) { Paging1.Visible = false; } if (lang == 1) { ltrCount.Text = "Tìm thấy " + totalrecord + " game"; if (hotro == 0) { lnkValidModel.Text = "Chỉ hiển thị những game hỗ trợ"; } else { lnkValidModel.Text = "Hiển thị tất cả các game"; } } else { ltrCount.Text = "Tim thay " + totalrecord + " game"; if (hotro == 0) { lnkValidModel.Text = "Chi hien thi nhung game ho tro"; } else { lnkValidModel.Text = "Hien thi tat ca cac game"; } } lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>"; }
protected void Page_Load(object sender, EventArgs e) { //price = ConfigurationSettings.AppSettings.Get("gameprice"); preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + catID.ToString() + ",") > -1) { freecate = true; } _info = Get_User_Agent_Info(); if (!IsPostBack) { //DataTable catInfo = GameController.GetCategoryByCatIDHasCache(catID); if (lang == 0) { ltrTieude.Text = "Games Olympic 2012"; lnkXemthem.Text = "Xem them » "; //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia_KD + ConfigurationSettings.AppSettings.Get("gameprice") + Resources.Resource.wDonViTien_KD + "/game)"; } else { ltrTieude.Text = "Games Olympic 2012"; lnkXemthem.Text = "Xem thêm » "; //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + ConfigurationSettings.AppSettings.Get("gameprice") + Resources.Resource.wDonViTien + "/game)"; } } if (!string.IsNullOrEmpty(Request.QueryString["e"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["e"]); } else { Random rnd = new Random(); curpage = rnd.Next(1, 15); } //start category list int totalrecord = 0; if (hotro == 1) { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("e=" + curpage.ToString(), "e=1"); rptlstCategory.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord); } else { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("e=" + curpage.ToString(), "e=1");; rptlstCategory.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache("vietnamobile", catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord); } rptlstCategory.ItemDataBound += new RepeaterItemEventHandler(rptlstCategory_ItemDataBound); rptlstCategory.DataBind(); //Paging1.totalrecord = totalrecord; //Paging1.pagesize = pagesize; //Paging1.numberpage = pagenumber; //Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&a=" + Request.QueryString["a"] + "&b=" + Request.QueryString["b"] + "&c=" + Request.QueryString["c"] + "&d=" + Request.QueryString["d"] + "&f=" + Request.QueryString["f"]; //Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&a=" + Request.QueryString["a"] + "&b=" + Request.QueryString["b"] + "&c=" + Request.QueryString["c"] + "&d=" + Request.QueryString["d"] + "&f=" + Request.QueryString["f"] + "&e="; //end category list if (lang == 1) { if (hotro == 0) { lnkValidModel.Text = "Chỉ hiển thị những game hỗ trợ"; } else { lnkValidModel.Text = "Hiển thị tất cả các game"; } } else if (hotro == 0) { lnkValidModel.Text = "Chi hien thi nhung game ho tro"; } else { lnkValidModel.Text = "Hien thi tat ca cac game"; } lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>"; lnkXemthem.NavigateUrl = UrlProcess.GetGameCategoryUrl(lang.ToString(), width, catID.ToString(), hotro.ToString()); }
protected void Page_Load(object sender, EventArgs e) { preurl = AppEnv.GetSetting("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); //hotro = 1; if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } _info = Get_User_Agent_Info(); int totalrecord = 0; if (Session["serviceList"] != null) { _arrService = Session["serviceList"] as string[]; } if (_arrService != null) { if (_arrService.Length > 0) { string dkGame = string.Format(AppEnv.GetSetting("S2DK_Game")); foreach (var item in _arrService) { if (item == dkGame) { pnlS2DkGame1.Visible = false; pnlS2DkGame2.Visible = false; } } } } #region Tai Nhieu Nhat //Tải nhiều nhất //if (hotro == 1) //{ // rptTaiNhieuNhat.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, pagesize, curpage, out totalrecord); //} //else //{ // rptTaiNhieuNhat.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, curpage, out totalrecord); //} var dtTaiNhieuNhat = new DataTable(); dtTaiNhieuNhat = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, _info, pagesize, curpage, out totalrecord); if (dtTaiNhieuNhat.Rows.Count == 0) { dtTaiNhieuNhat = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 15, (int)Constant.Game.Topdownload, pagesize, curpage, out totalrecord); } rptTaiNhieuNhat.DataSource = dtTaiNhieuNhat; rptTaiNhieuNhat.ItemDataBound += rptTaiNhieuNhat_ItemDataBound; rptTaiNhieuNhat.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; #endregion #region Moi Cap Nhat //if (hotro == 1) //{ // rptMoiCapNhat.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, _info, pagesize, curpage, out totalrecord); //} //else //{ // rptMoiCapNhat.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, pagesize, tpage, out totalrecord); //} var dtMoiCapNhat = new DataTable(); dtMoiCapNhat = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, _info, pagesize, curpage, out totalrecord); if (dtMoiCapNhat.Rows.Count == 0) { dtMoiCapNhat = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 16, (int)Constant.Game.Lastest, pagesize, tpage, out totalrecord); } rptMoiCapNhat.DataSource = dtMoiCapNhat; rptMoiCapNhat.ItemDataBound += rptMoiCapNhat_ItemDataBound; rptMoiCapNhat.DataBind(); Paging2.totalrecord = totalrecord; Paging2.pagesize = pagesize; Paging2.numberpage = pagenumber; Paging2.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging2.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"] + "&tpage="; #endregion }
protected void Page_Load(object sender, EventArgs e) { string msisdn; string Telco = "Other"; int IsWifi = 1; if (!Page.IsPostBack) { int type = ConvertUtility.ToInt32(Request.QueryString["type"]); int id = ConvertUtility.ToInt32(Request.QueryString["id"]); string transactionID = Request.QueryString["transactionID"]; int is3g = 0; msisdn = MobileUtils.GetMSISDN(out is3g); #region Device_Log if (Application["wurflFileProcessor"] == null) { string s_path = HttpContext.Current.Request.MapPath("..\\WURFL_Data\\wurfl.xml"); Application["wurflFileProcessor"] = new wurflApi.deviceFileProcessor(s_path); } wurflApi.deviceFileProcessor o_deviceFileProcessor = (Application["wurflFileProcessor"] as wurflApi.deviceFileProcessor); // prepare capability getter wurflApi.capabilitiesGetter o_capabilityGetter = new wurflApi.capabilitiesGetter(ref o_deviceFileProcessor); o_capabilityGetter.prepareNavigatorModelCapabilities(Request); User_AgentInfo _info = new User_AgentInfo(); _info.device_os = o_capabilityGetter.getCapability("device_os"); _info.mobile_browser = o_capabilityGetter.getCapability("mobile_browser"); _info.resolution_width = o_capabilityGetter.getCapability("resolution_width"); _info.resolution_height = o_capabilityGetter.getCapability("resolution_height"); _info.model_name = o_capabilityGetter.getCapability("model_name"); _info.brand_name = o_capabilityGetter.getCapability("brand_name"); //BasePage.AddDevice(HttpContext.Current.Request.UserAgent, _info.model_name, _info.brand_name, _info.device_os, _info.mobile_browser, _info.resolution_width, _info.resolution_height); #endregion #region Redirect to VNM if (string.IsNullOrEmpty(transactionID)) { //int is3g = 0; msisdn = MobileUtils.GetMSISDN(out is3g); //msisdn = msisdn != "" ? msisdn : "841864950687"; string uniqueID = WapController.UnixTimeStampUTC().ToString(); #region Log nhận diện SDT if (msisdn != "") { Telco = "VNM"; IsWifi = 0; } //WapController.VmgAds94x_Log_Insert(HttpContext.Current.Request.UserAgent, _info.model_name, _info.brand_name, _info.device_os, _info.mobile_browser, _info.resolution_width, _info.resolution_height, Telco, IsWifi, 1, Request.Url.AbsoluteUri, id.ToString(), HttpContext.Current.Request.UserHostAddress, type.ToString(), "MSISDN", msisdn, "Request", 1, id); //WapController.VmgAds94x_Log_Insert(HttpContext.Current.Request.UserAgent, uniqueID, _info.brand_name, _info.device_os, _info.mobile_browser, _info.resolution_width, _info.resolution_height, Telco, IsWifi, 1, "http://wap.vietnamobile.com.vn/wap/registerall.aspx?type=3&id=13", id.ToString(), "113.185.25.115", type.ToString(), "MSISDN", msisdn, "Request", 1, id); #endregion //dang ky 949 if (!string.IsNullOrEmpty(msisdn)) { //string uniqueID = WapController.UnixTimeStampUTC().ToString(); if (type == 1) { //visport WapController.WapRegisterConfirm_Insert(uniqueID, msisdn, 1, -1, "Dịch vụ Visport", "Dịch vụ Visport"); string url = RedirectToTelco(msisdn, "Dịch vụ Visport", "979", "5000", "Dịch vụ Visport", "01", "1", "http://visport.vn", uniqueID); Response.Redirect(url); } else if (type == 2) { //game portal WapController.WapRegisterConfirm_Insert(uniqueID, msisdn, 2, -2, "Dịch vụ Gameportal", "Dịch vụ Gameportal"); string url = RedirectToTelco(msisdn, "Dịch vụ Gameportal", "2288", "10000", "Dịch vụ Gameportal", "07", "1", "http://vmgame.vn/", uniqueID); Response.Redirect(url); } else { if (id > 0) { DataTable tblServices = WapController.S2_94xGetServiceInfo(id); if (tblServices == null || tblServices.Rows.Count < 1) { return; } string ProductName = tblServices.Rows[0]["Product_Name"].ToString(); string Price = tblServices.Rows[0]["Charging_Price"].ToString(); int PeriodLength = ConvertUtility.ToInt32(tblServices.Rows[0]["PeriodLength"].ToString()); string NoChargeLength = tblServices.Rows[0]["NoChargeLength"].ToString(); WapController.WapRegisterConfirm_Insert(uniqueID, msisdn, 3, id, ProductName, ProductName); string url = RedirectToTelco(msisdn, ProductName, "949", Price, ProductName, PeriodLength == 7 ? "07" : "01", NoChargeLength, "http://wap.vietnamobile.com.vn", uniqueID); Response.Redirect(url); } } } } else { //Lấy thông tin khác hàng theo transactionID và đăng ký dịch vụ tương ứng DataTable dt = WapController.WapRegisterConfirm_GetInfo(transactionID); if (dt != null && dt.Rows.Count > 0) { int Service_type = ConvertUtility.ToInt32(dt.Rows[0]["Type"].ToString()); if (Service_type == 1) { Response.Redirect("http://visport.vn/Wap/DangKy.aspx"); } else if (Service_type == 2) { Response.Redirect("http://vmgame.vn/home/landing?pk=DK"); } else { if (msisdn != "") { msisdn = "VNM"; IsWifi = 0; } //WapController.VmgAds94x_Log_Insert(HttpContext.Current.Request.UserAgent, transactionID.ToString(), _info.brand_name, _info.device_os, _info.mobile_browser, _info.resolution_width, _info.resolution_height, Telco, IsWifi, 1, Request.Url.AbsoluteUri, id.ToString(), HttpContext.Current.Request.UserHostAddress, type.ToString(), "REGISTER", msisdn, "Request", 1, id); int Service_ID = ConvertUtility.ToInt32(dt.Rows[0]["Service_ID"].ToString()); Response.Redirect("http://wap.vietnamobile.com.vn/sub/DK.aspx?id=" + Service_ID); } } } #endregion } }
protected void Page_Load(object sender, EventArgs e) { //price = ConfigurationSettings.AppSettings.Get("gameprice"); preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); //hotro = 1; catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); if (Session["serviceList"] != null) { _arrService = Session["serviceList"] as string[]; } if (_arrService != null) { if (_arrService.Length > 0) { string dkGame = string.Format(AppEnv.GetSetting("S2DK_Game")); foreach (var item in _arrService) { if (item == dkGame) { pnlS2DkGame1.Visible = false; } } } } if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + catID.ToString() + ",") > -1) { freecate = true; } _info = Get_User_Agent_Info(); if (!IsPostBack) { DataTable catInfo = GameController.GetCategoryByCatIDHasCache(catID); if (lang == 1) { lnkCateChannel.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper(); } else { lnkCateChannel.Text = catInfo.Rows[0]["Title"].ToString().ToUpper(); } lnkCateChannel.NavigateUrl = UrlProcess.GetGameCategoryUrl(lang.ToString(), width, catID.ToString(), hotro.ToString()); lnkHomeChannel.NavigateUrl = UrlProcess.GetGameHomeUrl(lang.ToString(), width, hotro.ToString()); } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } //start category list int totalrecord = 0; if (hotro == 1) { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage.ToString(), "cpage=1"); //rptlstCategory.DataSource = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord); } else { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage.ToString(), "cpage=1");; //rptlstCategory.DataSource = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord); } var dt = new DataTable(); dt = GameController.GetAllGameByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.Game.Category, _info, pagesize, curpage, out totalrecord); if (dt.Rows.Count == 0) { dt = GameController.GetAllGameByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.Game.Category, pagesize, curpage, out totalrecord); } rptlstCategory.DataSource = dt; rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound; rptlstCategory.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; //end category list if (lang == 1) { if (hotro == 0) { lnkValidModel.Text = "Chỉ hiển thị những game hỗ trợ"; } else { lnkValidModel.Text = "Hiển thị tất cả các game"; } } else if (hotro == 0) { lnkValidModel.Text = "Chi hien thi nhung game ho tro"; } else { lnkValidModel.Text = "Hien thi tat ca cac game"; } lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>"; }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]).ToString(); lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); id = ConvertUtility.ToInt32(Request.QueryString["id"]); if (!IsPostBack) { _info = Get_User_Agent_Info(); if (ConvertUtility.ToInt32(Request.QueryString["g"]) == 1) { txtSoDienThoaiTang.Focus(); } //Detail DataTable dtDetail = PhanmemController.GetAPPDetailByIDHasCache(Session["telco"].ToString(), id); //end detail if (dtDetail.Rows.Count > 0) { price = ConfigurationSettings.AppSettings.Get("Appprice"); if (dtDetail.Rows[0]["Web_Name"].ToString() == "Vmg_zone") { price = "1000"; } lnkCateChannel.NavigateUrl = UrlProcess.GetAppCategoryUrl(lang.ToString(), width, dtDetail.Rows[0]["W_AppCategoryID"].ToString(), hotro); lnkHomeChannel.NavigateUrl = UrlProcess.GetAppHomeUrl(lang.ToString(), width, hotro); if (lang == 1) { lnkHomeChannel.Text = "PHẦN MỀM"; lnkCateChannel.Text = dtDetail.Rows[0]["Title_Unicode"].ToString().ToUpper(); ltrTenAnh.Text = dtDetail.Rows[0]["AppNameUnicode"].ToString(); ltrNhom.Text = Resources.Resource.wTheLoai + dtDetail.Rows[0]["Web_Name"].ToString(); ltrLuottai.Text = Resources.Resource.wLuotTai + dtDetail.Rows[0]["Download"].ToString().ToUpper(); //ltrGiaTai.Text = Resources.Resource.wGiaTai + price + Resources.Resource.wDonViTien; //ltrGiaTang.Text = Resources.Resource.wGiaTang + price + Resources.Resource.wDonViTien; ltrGioiThieu.Text = Resources.Resource.wGioiThieu + dtDetail.Rows[0]["DescriptionUnicode"].ToString(); lnkTai.Text = "<span class=\"bold\">" + Resources.Resource.wTaiVe + "</span>"; ltrGuiTang.Text = Resources.Resource.wGuiTang; ltrCungTheLoai.Text = Resources.Resource.pmPhanMemCungTheLoai; } else { lnkCateChannel.Text = dtDetail.Rows[0]["Title"].ToString().ToUpper(); ltrTenAnh.Text = dtDetail.Rows[0]["AppName"].ToString(); ltrNhom.Text = Resources.Resource.wTheLoai_KD + UnicodeUtility.UnicodeToKoDau(dtDetail.Rows[0]["Web_Name"].ToString()); ltrLuottai.Text = Resources.Resource.wLuotTai_KD + dtDetail.Rows[0]["Download"].ToString().ToUpper(); //ltrGiaTai.Text = Resources.Resource.wGiaTai_KD + price + Resources.Resource.wDonViTien_KD; //ltrGiaTang.Text = Resources.Resource.wGiaTang_KD + price + Resources.Resource.wDonViTien_KD; ltrGioiThieu.Text = Resources.Resource.wGioiThieu_KD + dtDetail.Rows[0]["Description"].ToString(); lnkTai.Text = "<span class=\"bold\">" + Resources.Resource.wTaiVe_KD + "</span>"; ltrGuiTang.Text = Resources.Resource.wGuiTang_KD; ltrCungTheLoai.Text = Resources.Resource.pmPhanMemCungTheLoai_KD; } if (MobileUtils.CheckValidModel(dtDetail.Rows[0]["ModelSupport"].ToString(), _info)) { //lnkTai.NavigateUrl = "../Download.aspx?id=" + dtDetail.Rows[0]["W_AppItemID"].ToString() + "&lang=" + lang + "&w=" + width; lnkTai.NavigateUrl = UrlProcess.GetAppDownloadUrl(lang.ToString(), width, dtDetail.Rows[0]["W_AppItemID"].ToString(), hotro); } else { lnkTai.Visible = false; } WapXzone_VNM.CreateAvatar.MOReceiver ws = new WapXzone_VNM.CreateAvatar.MOReceiver(); ws.GenerateAvatarThumnail(dtDetail.Rows[0]["Avatar"].ToString(), 120, 141); imgDetail.ImageUrl = preurl + MultimediaUtility.GetAvatarThumnail(dtDetail.Rows[0]["Avatar"].ToString(), 120, 141).Replace("~", ""); //imgDetail.ImageUrl = preurl + dtDetail.Rows[0]["Avatar"].ToString().Replace("~", ""); //Other if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } int totaltopdownload = 0; DataTable dtltopdownload = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), ConvertUtility.ToInt32(dtDetail.Rows[0]["W_AppCategoryID"]), 0, pagesize, tpage, out totaltopdownload); rptCungTheLoai.DataSource = dtltopdownload; rptCungTheLoai.ItemDataBound += new RepeaterItemEventHandler(rptCungTheLoai_ItemDataBound); rptCungTheLoai.DataBind(); Paging1.totalrecord = totaltopdownload; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&id=" + Request.QueryString["id"] + "&tpage="; } } }
protected void Page_Load(object sender, EventArgs e) { // User_AgentInfo info = Get_User_Agent_Info(); width = info.resolution_width; if (ConvertUtility.ToInt32(width) == 0 || ConvertUtility.ToInt32(width) >= 480) { width = ConvertUtility.ToString((int)Constant.DefaultScreen.Standard); } //query param int is3g = 0; string msisdn = MobileUtils.GetMSISDN(out is3g); //#region Hai them vao ngay 16/02/2012 //if (String.IsNullOrEmpty(msisdn) && Session["msisdn"] == null) // msisdn = this.GetVietnamobileMsisdn(); //#endregion Session["is3g"] = is3g; #region MSISDN if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile")) { Session["telco"] = Constant.T_Vietnamobile; Session["msisdn"] = msisdn; WapController.WapUserLog(msisdn, 0, string.Empty, 1); } else { Session["msisdn"] = null; Session["telco"] = Constant.T_Undefined; } #endregion //#region Sport Game Hero //if(AppEnv.isMobileBrowser()) //{ // DataTable dtUrl = WapController.VnmGetUrl(); // if (dtUrl != null && dtUrl.Rows[0]["IsLog"].ToString() == "1") // { // if (Session["msisdn"] != null) // { // DataTable dt = WapController.VnmCheckBlackList(Session["msisdn"].ToString()); // if (dt.Rows.Count == 0) // { // string resUrl = dtUrl.Rows[0]["ResUrl"].ToString(); // Response.Redirect(resUrl); // } // } // } //} //#endregion string urlRes = AppEnv.GetSetting("WapDefault") + UrlProcess.GetWapHomeUrl("1", width).Replace("~", ""); if (AppEnv.isMobileBrowser()) { string model = AppEnv.GetUserAgent(); if (model == "high") { urlRes = AppEnv.GetSetting("WapDefault") + "/trang-chu.aspx"; //urlRes = AppEnv.GetSetting("WapDefault") + "/login.aspx"; } else { urlRes = AppEnv.GetSetting("WapDefault") + "/Wap/Default.aspx?lang=1&w=320"; } } else { urlRes = AppEnv.GetSetting("WapDefault") + "/Wap/Default.aspx?lang=1&w=320"; } logger.Debug(urlRes); //urlRes = AppEnv.GetSetting("WapDefault") + "/login.aspx"; //urlRes = AppEnv.GetSetting("WapDefault") + "/trang-chu.aspx"; Response.Redirect(urlRes); //Response.Redirect("NotFound.aspx"); //if (ConvertUtility.ToInt32(AppEnv.GetSetting("NewUrl")) == 1) //{ // Response.Redirect(AppEnv.GetSetting("WapDefault") + UrlProcess.GetWapHomeUrlNew("1", width).Replace("~", "")); //} //else //{ // Response.Redirect(AppEnv.GetSetting("WapDefault") + UrlProcess.GetWapHomeUrl("1", width).Replace("~", "")); // //Response.Redirect("showpopup.aspx"); //} }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } if (!string.IsNullOrEmpty(Request.QueryString["tpage"])) { tpage = ConvertUtility.ToInt32(Request.QueryString["tpage"]); } _info = Get_User_Agent_Info(); int totalrecord = 0; if (lang == 0) { litGia.Text = " (Gia: "+ AppEnv.GetSetting("appprice") + " d/phan mem) "; ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat_KD; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat_KD; } else { litGia.Text = " (Giá: "+ AppEnv.GetSetting("appprice") + " đ/phần mềm) "; ltrTaiNhieuNhat.Text = Resources.Resource.wTaiNhieuNhat; ltrMoiNhat.Text = Resources.Resource.wMoiCapNhat; } //Tải nhiều nhất if (hotro == 1) { rptHottest.DataSource = PhanmemController.GetAllAppByCateTypeAndAgent(Session["telco"].ToString(), 10, (int)Constant.APP.Topdownload, _info, pagesize, curpage, out totalrecord); } else { rptHottest.DataSource = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 10, (int)Constant.APP.Topdownload, pagesize, curpage, out totalrecord); } rptHottest.ItemDataBound += rptlastest_ItemDataBound; rptHottest.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; //Mới nhất if (hotro == 1) { rptLastest.DataSource = PhanmemController.GetAllAppByCateTypeAndAgent(Session["telco"].ToString(), 9, (int)Constant.APP.Lastest, _info, pagesize, tpage, out totalrecord); } else { rptLastest.DataSource = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), 9, (int)Constant.APP.Lastest, pagesize, tpage, out totalrecord); } rptLastest.ItemDataBound += rptlastest_ItemDataBound; rptLastest.DataBind(); Paging2.totalrecord = totalrecord; Paging2.pagesize = pagesize; Paging2.numberpage = pagenumber; Paging2.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"]; Paging2.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&cpage=" + Request.QueryString["cpage"] + "&hotro=" + Request.QueryString["hotro"] + "&tpage="; }
protected void Page_Load(object sender, EventArgs e) { string Telco = "Other"; int IsWifi = 1; string user_id = "khach"; if (!Page.IsPostBack) { if (AppEnv.GetSetting("TestFlag") == "1") { Session["telco"] = Constant.T_Vietnamobile; //Session["msisdn"] = "0987765522"; } //Session["msisdn"] = "841866728649"; if (Session["msisdn"] == null) { int is3g = 0; string msisdn = MobileUtils.GetMSISDN(out is3g); if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile")) { Session["telco"] = Constant.T_Vietnamobile; Session["msisdn"] = msisdn; } else { Session["msisdn"] = null; Session["telco"] = Constant.T_Undefined; } } pnlNoiDung.Visible = true; int id = ConvertUtility.ToInt32(Request.QueryString["id"]); if (id > 0) { DataTable tblServices = WapController.S2_94xGetServiceInfo(id); if (tblServices == null || tblServices.Rows.Count < 1) { return; } //if (tblServices.Rows[0]["status"].ToString() != "3") //{ // return; //} string dangkyThanhCong = string.Empty; string doubleDangKy = string.Empty; string tenDichVu = string.Empty; string regisSystax = tblServices.Rows[0]["Register_Syntax"].ToString().Split('|')[0]; if (Session["msisdn"] != null && Session["msisdn"].ToString() != "") { Telco = "VNM"; IsWifi = 0; user_id = Session["msisdn"].ToString(); ltrTieuDe.Text = "Đăng ký " + tblServices.Rows[0]["Product_Name"].ToString(); tenDichVu = tblServices.Rows[0]["Product_Name"].ToString(); lblTen1.Text = tenDichVu; dangkyThanhCong = tblServices.Rows[0]["Right_Syntax_MT"].ToString(); doubleDangKy = tblServices.Rows[0]["Double_Register_MT"].ToString(); if (AppEnv.GetSetting("DK1chamVNMtest").ToString() == "1") { pnlConfirm.Visible = false; string result = AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "DK", regisSystax);//Andy Service S2_94x string[] arrResult = result.Split('|'); if (arrResult[0] == "1")//DK THANH CONG { ltrNoiDung.Text = dangkyThanhCong; } else if (arrResult[0] == "0")//DOUBE DK { ltrNoiDung.Text = doubleDangKy; } else if (arrResult[0] == "-1")//DK THAT BAI - SAI CU PHAP { ltrNoiDung.Text = "Đăng ký không thành công. Vui lòng thử lại <br /> Hoặc soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>"; } } else { pnlConfirm.Visible = true; } } else { Response.Redirect("http://wap.vietnamobile.com.vn/tin-tuc.aspx"); //ltrNoiDung.Text = "Hệ thống không xác định được số điện thoại của bạn <br /> Vui lòng truy cập bằng 3G/GPRS <br /> Hoặc soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>"; //ltrNoiDung.Text = "<font size=3> Để đăng ký dịch vụ " + tblServices.Rows[0]["Service_Name"].ToString() + " của Vietnamobile, Quý Khách vui lòng soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b></font>"; //if (id == 800 || id == 812||id==813) //{ // Response.Redirect("/Video/Default.aspx?lang=1&display=home&w=320"); //} //else //{ // ltrNoiDung.Text = "<font size=3> Để đăng ký dịch vụ " + tblServices.Rows[0]["Service_Name"].ToString() + " của Vietnamobile, Quý Khách vui lòng soạn tin <b> " + regisSystax + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b></font>"; //} } #region Device_Log try { if (Application["wurflFileProcessor"] == null) { string s_path = HttpContext.Current.Request.MapPath("..\\WURFL_Data\\wurfl.xml"); Application["wurflFileProcessor"] = new wurflApi.deviceFileProcessor(s_path); } wurflApi.deviceFileProcessor o_deviceFileProcessor = (Application["wurflFileProcessor"] as wurflApi.deviceFileProcessor); // prepare capability getter wurflApi.capabilitiesGetter o_capabilityGetter = new wurflApi.capabilitiesGetter(ref o_deviceFileProcessor); o_capabilityGetter.prepareNavigatorModelCapabilities(Request); User_AgentInfo _info = new User_AgentInfo(); _info.device_os = o_capabilityGetter.getCapability("device_os"); _info.mobile_browser = o_capabilityGetter.getCapability("mobile_browser"); _info.resolution_width = o_capabilityGetter.getCapability("resolution_width"); _info.resolution_height = o_capabilityGetter.getCapability("resolution_height"); _info.model_name = o_capabilityGetter.getCapability("model_name"); _info.brand_name = o_capabilityGetter.getCapability("brand_name"); //WapController.VmgAds94x_Log_Insert(HttpContext.Current.Request.UserAgent, _info.model_name, _info.brand_name, _info.device_os, _info.mobile_browser, _info.resolution_width, _info.resolution_height, Telco, IsWifi, 1, Request.Url.AbsoluteUri, id.ToString(), HttpContext.Current.Request.UserHostAddress, "0", "MSISDN", Session["msisdn"].ToString(), "Request", 1, id); WapController.VmgAds94x_Log_Insert(HttpContext.Current.Request.UserAgent, _info.model_name, _info.brand_name, _info.device_os, _info.mobile_browser, _info.resolution_width, _info.resolution_height, Telco, IsWifi, 1, Request.Url.AbsoluteUri, id.ToString(), HttpContext.Current.Request.UserHostAddress, "0", "MSISDN", user_id, "Request", 1, id); } catch (Exception ex) { } #endregion } else { Response.Redirect("http://wap.vietnamobile.com.vn/Wap/Default.aspx?lang=1&w=320"); } } }
public static DataTable GetAllGameByCateTypeAndAgentNoCache(string telCo, int catID, int displayType, User_AgentInfo _info, int pagesize, int pageindex, out int totalrecord) { var dtRetval = new DataTable(); if (dtRetval.Rows.Count == 0) { DataTable dtCat = GetAllGameByCategoryAndDisplayType(telCo, catID, displayType, 9999, 1, out totalrecord); //Xoá những game không hỗ trợ for (int i = 0; i < totalrecord; i++) { if (!MobileUtils.CheckValidModel(dtCat.Rows[i]["ModelSupport"].ToString(), _info)) { dtCat.Rows[i].Delete(); } } dtCat.AcceptChanges(); dtRetval = dtCat; } totalrecord = dtRetval.Rows.Count; // int vFrom = ((pageindex - 1) * pagesize); int vTo = pageindex * pagesize; if (vTo > totalrecord) { vTo = totalrecord; } DataTable dtReturn = dtRetval.Clone(); for (int i = vFrom; i < vTo; i++) { dtReturn.ImportRow(dtRetval.Rows[i]); } return(dtReturn); }
protected void Page_Load(object sender, EventArgs e) { preurl = ConfigurationSettings.AppSettings.Get("urldata"); width = Request.QueryString["w"]; lang = ConvertUtility.ToInt32(Request.QueryString["lang"]); hotro = ConvertUtility.ToInt32(Request.QueryString["hotro"]); catID = ConvertUtility.ToInt32(Request.QueryString["catid"]); if (catID == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("freecate"))) { freecate = true; } _info = Get_User_Agent_Info(); if (!IsPostBack) { DataTable catInfo = PhanmemController.GetCategoryByCatIDHasCache(catID); string price = AppEnv.GetSetting("appprice"); if (catID == 1) { price = "1000"; } if (lang == 1) { litGia.Text = " (Giá: " + price + " đ/phần mềm) "; lnkCateChannel.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper(); lnkHomeChannel.Text = "PHẦN MỀM"; } else { litGia.Text = " (Gia: " + price + " d/phan mem) "; lnkCateChannel.Text = catInfo.Rows[0]["Title"].ToString().ToUpper(); } lnkCateChannel.NavigateUrl = UrlProcess.GetAppCategoryUrlNew(lang.ToString(), width, catID.ToString(), hotro.ToString()); lnkHomeChannel.NavigateUrl = UrlProcess.GetAppHomeUrlNew(lang.ToString(), width, hotro.ToString()); } if (!string.IsNullOrEmpty(Request.QueryString["cpage"])) { curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]); } //start category list int totalrecord = 0; if (hotro == 1) { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage, "cpage=1"); rptlstCategory.DataSource = PhanmemController.GetAllAppByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.APP.Category, _info, pagesize, curpage, out totalrecord); } else { lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage, "cpage=1");; rptlstCategory.DataSource = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.APP.Category, pagesize, curpage, out totalrecord); } rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound; rptlstCategory.DataBind(); Paging1.totalrecord = totalrecord; Paging1.pagesize = pagesize; Paging1.numberpage = pagenumber; Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"]; Paging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage="; //end category list if (lang == 1) { if (hotro == 0) { lnkValidModel.Text = "Chỉ hiển thị những phần mềm hỗ trợ"; } else { lnkValidModel.Text = "Hiển thị tất cả các phần mềm"; } } else if (hotro == 0) { lnkValidModel.Text = "Chi hien thi nhung phan mem ho tro"; } else { lnkValidModel.Text = "Hien thi tat ca cac phan mem"; } lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>"; }