Beispiel #1
0
        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)
        {
            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();
            }
        }
Beispiel #3
0
        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=";
        }
Beispiel #4
0
        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>";
        }
Beispiel #5
0
        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);
                }
            }
        }