示例#1
0
        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();

                //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.GetAppCategoryUrlNew(lang.ToString(), width, dtDetail.Rows[0]["W_AppCategoryID"].ToString(), hotro);
                    lnkHomeChannel.NavigateUrl = UrlProcess.GetAppHomeUrlNew(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"];
                        ltrGiaTai.Text      = Resources.Resource.wGiaTai + price + Resources.Resource.wDonViTien;

                        ltrGioiThieu.Text = Resources.Resource.wGioiThieu + dtDetail.Rows[0]["DescriptionUnicode"];

                        lnkTai.Text         = Resources.Resource.wTaiVe;
                        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());
                        ltrGiaTai.Text      = Resources.Resource.wGiaTai_KD + price + Resources.Resource.wDonViTien_KD;


                        ltrGioiThieu.Text = Resources.Resource.wGioiThieu_KD + dtDetail.Rows[0]["Description"];

                        lnkTai.Text         = Resources.Resource.wTaiVe_KD;
                        ltrCungTheLoai.Text = Resources.Resource.pmPhanMemCungTheLoai_KD;
                    }

                    if (MobileUtils.CheckValidModel(dtDetail.Rows[0]["ModelSupport"].ToString(), _info))
                    {
                        lnkTai.NavigateUrl = UrlProcess.GetAppDownloadUrlNew(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("~", "");
                    //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 += 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=";
                }
            }
        }
示例#2
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>";
        }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            price      = ConfigurationSettings.AppSettings.Get("appprice");
            lang       = Request.QueryString["lang"];
            hotro      = Request.QueryString["hotro"];
            width      = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id         = ConvertUtility.ToInt32(Request.QueryString["id"]);
            telCo      = Session["telco"].ToString();
            linkStr    = "<a href=\"../" + UrlProcess.GetAppHomeUrlNew(lang, width.ToString(), hotro).Replace("~/", "") + "\" >PHẦN MỀM<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetAppHomeUrlNew(lang, width.ToString(), hotro).Replace("~/", "") + "\" >PHAN MEM<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 = PhanmemController.GetAPPDetailByID(Session["telco"].ToString(), id);
                if (dtDetail.Rows[0]["Web_Name"].ToString() == "Vmg_zone")
                {
                    price = "15000";
                }
                if (telCo == Constant.T_Mobifone)
                {
                    string content = Session["cpid"].ToString() + "&" + Constant.ungdungchung + id.ToString() + "&" + price + "&" + Session["transactionid"].ToString();
                    Response.Redirect(ConfigurationSettings.AppSettings.Get("vms3g") + "?link=" + Server.UrlEncode(EAS.EncryptData(content, ConfigurationSettings.AppSettings.Get("vmskey"))));
                }
                //
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("appcode") + " " + dtDetail.Rows[0]["AppID"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("appcommandcode") + "</b> để tải phần mềm <b>" + dtDetail.Rows[0]["AppNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("appcode") + " " + dtDetail.Rows[0]["AppID"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("appcommandcode") + "</b> de tai phan mem <b>" + dtDetail.Rows[0]["AppName"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                    }
                }
                else
                {
                    //pnlThongBao.Visible = true;
                    //if (lang == "1")
                    //{
                    //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu + "phần mềm " + dtDetail.Rows[0]["AppNameUnicode"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo;
                    //    btnKhong.Text = Resources.Resource.btnKhong;
                    //}
                    //else
                    //{
                    //    ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD + "phan mem " + dtDetail.Rows[0]["AppName"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo_KD;
                    //    btnKhong.Text = Resources.Resource.btnKhong_KD;
                    //}
                    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", "APP", Request.QueryString["id"].ToString());
                        //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "APPDOWN", "APP_DOWN");

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "APPDOWN", "APP_DOWN", price, "D", "APP", Request.QueryString["id"]);

                        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;
                    }
                }
            }
        }