protected void btnCo_Click(object sender, EventArgs e)
        {
            pnlThongBao.Visible = false;
            try
            {
                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", "TT", Request.QueryString["id"].ToString());

                    messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "MUSICDOWNLOAD", "MUSIC_DOWN");

                    if (!string.IsNullOrEmpty(messageReturn) && 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;
                }
            }
            catch (Exception ex)
            {
                ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("----------Lỗi charging----------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug(ex.ToString());
                logger.Debug("----------Lỗi charging----------------------");
            }
        }
示例#2
0
        protected void btnCo_Click(object sender, EventArgs e)
        {
            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", "TT", Request.QueryString["id"].ToString());
                if (!string.IsNullOrEmpty(messageReturn) && 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;

            case "Vinaphone":
                messageReturn = Vinaphone_Charging.ReturnChargingResult(Session["msisdn"].ToString(), price);
                if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "0")
                {    // 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;
            }
        }
示例#3
0
        protected void btnThucHien_Click(object sender, ImageClickEventArgs e)
        {
            if (telCo == "Undefined")
            {
                pnlYeuCau.Visible = false;
                pnlSMS.Visible    = true;
                if (lang == "1")
                {
                    ltrSMS.Text = "Soạn tin <b>DAN " + (txtMaKhoi.Text.Trim().Length > 0 ? txtMaKhoi.Text.Trim() : "&lt;Mã khối&gt;") + " " + (txtMaMon.Text.Trim().Length > 0 ? txtMaMon.Text.Trim() : "&lt;Mã môn&gt;") + " " + (txtMaDe.Text.Trim().Length > 0 ? txtMaDe.Text.Trim() : "&lt;Mã đề&gt;") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("diemthicommandcode") + "</b> để tra đáp án đề thi" + Resources.Resource.wChon3G;
                }
                else
                {
                    ltrSMS.Text = "Soan tin <b>DAN " + (txtMaKhoi.Text.Trim().Length > 0 ? txtMaKhoi.Text.Trim() : "&lt;Ma khoi&gt;") + " " + (txtMaMon.Text.Trim().Length > 0 ? txtMaMon.Text.Trim() : "&lt;Ma mon&gt;") + " " + (txtMaDe.Text.Trim().Length > 0 ? txtMaDe.Text.Trim() : "&lt;Ma de&gt;") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("diemthicommandcode") + "</b> de tra dap an de thi" + Resources.Resource.wChon3G_KD;
                }
            }
            else
            {
                DataTable tblData = WapXzone_VNM.Library.Component.DiemThi.DiemThiController.TSDH_Dapans_GetData(txtMaKhoi.Text.Trim(), txtMaMon.Text.Trim(), txtMaDe.Text.Trim());
                chitietGiaodich = "DT DapAn: ";
                if (tblData != null && tblData.Rows.Count > 0)
                {
                    if (tblData.Rows[0]["MT1"].ToString() != string.Empty)
                    {
                        noiDung  = "Khoi: " + tblData.Rows[0]["Khoi"].ToString() + ", Mon: " + tblData.Rows[0]["Mon"].ToString() + ", De: " + tblData.Rows[0]["De"].ToString() + "<br>";
                        noiDung += tblData.Rows[0]["MT1"].ToString().Trim() + " " + tblData.Rows[0]["MT2"].ToString().Trim() + " " + tblData.Rows[0]["MT3"].ToString().Trim() + " " + tblData.Rows[0]["MT4"].ToString().Trim() + " " + tblData.Rows[0]["MT5"].ToString().Trim() + " " + tblData.Rows[0]["MT6"].ToString().Trim() + " " + tblData.Rows[0]["MT7"].ToString().Trim();
                    }
                    else
                    {
                        noiDung = "Hiện chưa có đáp án đề thi. Hệ thống sẽ gửi đáp án cho ban ngay khi có.";
                    }

                    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", "DiemThi", txtMaKhoi.Text.Trim() + "_" + txtMaMon.Text.Trim() + "_" + txtMaDe.Text.Trim());
                        if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(true, false);
                        }
                        break;
                    }
                }
                else
                {
                    //Sai so bao danh
                    chitietGiaodich += "Sai cu phap " + txtMaKhoi.Text.Trim() + " " + txtMaMon.Text.Trim() + " " + txtMaDe.Text.Trim();
                    noiDung          = "Nội dung yêu cầu không đúng.<br>Bạn vui lòng kiểm tra, nhập đúng mã khối, mã môn, mã đề và thực hiện lại";
                    HienThiNoiDung(false, false);
                }
            }
        }
        protected void btnXacnhan_Click(object sender, EventArgs e)
        {
            try
            {
                switch (btnXacnhan.CommandName)
                {
                case "1":
                    price = ConfigurationSettings.AppSettings.Get("hoangdaoprice");
                    break;

                case "2":
                    price = ConfigurationSettings.AppSettings.Get("hoangdaoprice");
                    break;

                case "3":
                    price = ConfigurationSettings.AppSettings.Get("hoangdaothangprice");
                    break;
                }

                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", "Tu vi", Request.QueryString["id"].ToString());
                    messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "", "");

                    if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                    {    // Thanh toán thành công >> trả nội dung
                        HienthiHoangDao(ConvertUtility.ToInt32(btnXacnhan.CommandName), ConvertUtility.ToInt32(Session["hodaID"]), true);
                    }
                    else
                    {    // Thanh toán không thành công >> thông báo lỗi
                        HienthiHoangDao(ConvertUtility.ToInt32(Session["HodaType"]), ConvertUtility.ToInt32(btnXacnhan.CommandName), false);
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                log4net.ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("----------Lỗi charging----------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug(ex.ToString());
                logger.Debug("----------Lỗi charging----------------------");
            }
        }
示例#5
0
        protected void btnThucHien_Click(object sender, ImageClickEventArgs e)
        {
            if (telCo == "Undefined")
            {
                pnlYeuCau.Visible = false;
                pnlSMS.Visible    = true;
                if (lang == "1")
                {
                    ltrSMS.Text = "Soạn tin <b>DXC " + " " + (txtSoBaoDanh.Text.Trim().Length > 0 ? txtSoBaoDanh.Text.Trim() : "&lt;Số báo danh&gt;") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("diemthi15commandcode") + "</b> để nhận ngay điểm, xếp hạng và điểm chuẩn" + Resources.Resource.wChon3G;
                }
                else
                {
                    ltrSMS.Text = "Soan tin <b>DXC " + (txtSoBaoDanh.Text.Trim().Length > 0 ? txtSoBaoDanh.Text.Trim().ToUpper() : "&lt;So bao danh&gt;") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("diemthi15commandcode") + "</b> de nhan ngay diem, xep hang va diem chuan" + Resources.Resource.wChon3G_KD;
                }
            }
            else
            {
                DT_TSDHService.ServiceController objMbox       = new DT_TSDHService.ServiceController();
                DT_TSDHService.ResultData        objResulnInfo = new DT_TSDHService.ResultData();
                objResulnInfo = objMbox.QueryAll(Session["msisdn"].ToString(), txtSoBaoDanh.Text.Trim().ToUpper(), "1", "DXC", "8779", "1");

                chitietGiaodich = "Nhan 1 duoc 3: ";
                if (objResulnInfo.ErrorCode == 1 || objResulnInfo.ErrorCode == 2)
                {
                    //trường hợp đúng hết mã tỉnh và số báo danh - sẽ trả về cho khách hàng Message do đối tác trả lại
                    chitietGiaodich += string.Format("Gọi sang WS cua doi tac thanh cong voi gia tri tra ve la  {0}", objResulnInfo.ErrorCode);
                    noiDung          = objResulnInfo.Message;
                    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", "DiemThi", Request.QueryString["id"].ToString());
                        if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(true, false);
                        }
                        break;
                    }
                }
                else if (objResulnInfo.ErrorCode == 0)
                {
                    //Sai so bao danh
                    chitietGiaodich += string.Format("Sai cu phap (truong hop sai so bao danh) voi Message la  {0}", txtSoBaoDanh.Text.Trim());
                    noiDung          = "Số báo danh sai.<br>Bạn vui lòng kiểm tra, nhập đúng số báo danh và thực hiện lại";
                    HienThiNoiDung(false, false);
                }
                else if (objResulnInfo.ErrorCode == 3)
                {
                    //Sai mã tỉnh
                    chitietGiaodich += string.Format("Sai cu phap (truong hop sai ma tinh) voi Message la  {0}", txtSoBaoDanh.Text.Trim());
                    noiDung          = "Mã tỉnh sai.<br>Bạn vui lòng kiểm tra, nhập đúng mã tỉnh và thực hiện lại";
                    HienThiNoiDung(false, false);
                }
                else
                {
                    //trường hợp gọi sang ws đối tác giá trị trả về là -1
                    noiDung          = "Sai mã tỉnh và số báo danh. Vui lòng liên hệ với số 19001255 hỗ trợ";
                    chitietGiaodich += "Loi khi goi sang WS doi tac gia tri tra ve la -1";
                    HienThiNoiDung(false, false);
                }
            }
        }
示例#6
0
        protected void btnDongY_Click(object sender, EventArgs e)
        {
            try
            {
                int    status       = 1;
                string debit_status = string.Empty;
                //string debit_status = Vinaphone_Charging.ReturnChargingResult(Session["_msisdn"].ToString(), Session["_price"].ToString());
                string strType = Constant.pmContentTypeVNM[ConvertUtility.ToInt32(Session["_itemtype"])];
                WapXzone_VNM.Library.VNMCharging.VNMChargingGW charging = new WapXzone_VNM.Library.VNMCharging.VNMChargingGW();

                string productId  = string.Empty;
                string productKey = string.Empty;

                string price = Session["_price"].ToString();

                if (strType == "TEXT")
                {
                    if (price == "1000")
                    {
                        productId  = "RELAXSTORYREAD";
                        productKey = "READ";
                    }
                    else if (price == "15000")
                    {
                        productId  = "RELAXSTORYMONTHLY";
                        productKey = "READ_MONTHLY";
                    }
                    else if (price == "2000")
                    {
                        productId  = "RELAXLOVER";
                        productKey = "LOVER";
                    }
                    else if (price == "3000")
                    {
                        productId  = "RELAXPLACE";
                        productKey = "PLACE";
                    }
                    else if (price == "5000")
                    {
                        productId  = "RELAXADVISESEX";
                        productKey = "ADVISE_SEX";
                    }
                }
                else if (strType == "WP")
                {
                    productId  = "PICDOWN";
                    productKey = "PIC_DOWN";
                }
                else if (strType == "TT")
                {
                    productId  = "FOOTBALLSUMARY";
                    productKey = "FOOTBALL_SUMARY";
                }
                else if (strType == "JG")
                {
                    productId  = "GAMEDOWN";
                    productKey = "GAME_DOWN";
                }
                else if (strType == "APP")
                {
                    productId  = "APPDOWN";
                    productKey = "APP_DOWN";
                }
                else if (strType == "VID")
                {
                    productId  = "VIDEODOWN";
                    productKey = "VIDEO_DOWN";
                }
                else if (strType == "YKCG")
                {
                    productId  = "FOOTBALLADVISE";
                    productKey = "FOOTBALL_ADVISE";
                }
                else if (strType == "TIP")
                {
                    productId  = "FOOTBALLADVISE";
                    productKey = "FOOTBALL_ADVISE";
                }
                else if (strType == "KQCHO")
                {
                    productId  = "FOOTBALLRESULT";
                    productKey = "FOOTBALL_RESULT";
                }
                else if (strType == "KQXS")
                {
                    productId  = "LOTOLASTRESULT";
                    productKey = "LAST_RESULT";
                }
                else if (strType == "SOICAU")
                {
                    productId  = "LOTOSOICAU";
                    productKey = "SOICAU";
                }
                else if (strType == "XSKQCHO")
                {
                    productId  = "LOTORESULT";
                    productKey = "RESULT";
                }
                else if (strType == "XOSO20")
                {
                    productId  = "LOTORESULTMONTHLY";
                    productKey = "RESULTMONTHLY";
                }
                else if (strType == "RELAX")
                {
                    productId  = "RELAXSTORYREAD";
                    productKey = "READ";
                }
                else if (strType == "GAME87")
                {
                    productId  = "FOOTBALLADVISE";
                    productKey = "FOOTBALL_RESULT";
                }
                else if (strType == "Tu vi")
                {
                    productId  = "HOROSCOPE";
                    productKey = "HOROSCOPE";
                }

                debit_status = charging.PaymentVNM(Session["_msisdn"].ToString(), productId, productKey);

                //debit_status = charging.PaymentVNM(Session["_msisdn"].ToString(), Session["_price"].ToString(), "D", strType, Session["_itemid"].ToString());


                if (!string.IsNullOrEmpty(debit_status) && debit_status == "1")
                {// Thanh toán thành công >> trả nội dung
                    status = 0;;
                }
                //Ghi Transaction, Transaction_Log, xoá Transaction_Online cũ
                int TransID = DBController.Transaction_Insert(Session["_itemid"].ToString(), "APP IT R&D", ConvertUtility.ToInt32(Session["_itemtype"]), Session["_msisdn"].ToString(),
                                                              4, 0, ConvertUtility.ToInt32(Session["_price"]), ConvertUtility.ToInt32(Session["_partnerid"]), 0, DateTime.Now, "debit_status: " + debit_status, status);
                //log
                logger.Debug("msisdn=" + Session["_msisdn"].ToString() + "; price=" + Session["_price"].ToString() + "; debit_status" + debit_status);

                //Hiển thị kết quả
                ltrMSISDN.Text = "<b>Thông báo</b>";
                if (status == 0)
                {
                    AppPaymentInfo.Service ws           = new AppPaymentInfo.Service();
                    string[][]             arrTopupList = ws.wapGetTopupListByID(Session["_itemdetail"].ToString(), Session["_itemid"].ToString(), ConfigurationSettings.AppSettings.Get("appkey"));
                    string[] arrResult = ws.wapTopupMoney(Session["_itemdetail"].ToString(), arrTopupList[0][2], ConvertUtility.ToInt32(arrTopupList[0][1]), ConvertUtility.ToInt32(arrTopupList[0][3]), TransID.ToString(), ConfigurationSettings.AppSettings.Get("appkey"));
                    if (ConvertUtility.ToInt32(arrResult[0]) > 0)
                    {
                        ltrTB1.Text = "Giao dịch nạp VKIM đã được thực hiện (" + arrResult[0] + "). <br />Cảm ơn bạn đã sử dụng dịch vụ!";
                    }
                    else
                    {
                        ltrTB1.Text = "<span style=\"color: #FF0000\">Giao dịch không thành công. Vui lòng kiểm tra lại tài khoản. <br />" + arrResult[1] + "</span>";
                    }
                }
                else
                {
                    ltrTB1.Text = "<span style=\"color: #FF0000\">Giao dịch không thành công. Vui lòng kiểm tra lại tài khoản.</span>";
                }

                Session["_price"]      = null;
                Session["_msisdn"]     = null;
                Session["_itemid"]     = null;
                Session["_itemtype"]   = null;
                Session["_itemdetail"] = null;
                Session["_partnerid"]  = null;
            }
            catch (Exception ex)
            {
                logger.Debug("Exception=" + ex.ToString());
                ltrTB1.Text = "Giao dịch không thành công. Vui lòng kiểm tra lại tài khoản.<br />" + ex.ToString();
            }
            pnlXacnhan.Visible  = false;
            pnlThongbao.Visible = true;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("ringtoneprice");
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            telCo = Session["telco"].ToString();
            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 = MusicController.GetItemDetailHasCache(Session["telco"].ToString(), id);
                //Miễn phí
                if (id == 2843)
                {
                    free = true;
                    HienThiNoiDung(true);
                    return;
                }
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("ringtonecode") + " " + dtDetail.Rows[0]["Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("ringtonecommandcode") + "</b> để tải bản nhạc <b>" + dtDetail.Rows[0]["SongNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    }
                    else
                    {
                        ltrHuongdan.Text = Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("ringtonecode") + " " + dtDetail.Rows[0]["Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("ringtonecommandcode") + "</b> de tai ban nhac <b>" + dtDetail.Rows[0]["SongName"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                    }
                }
                else
                {
                    //pnlThongBao.Visible = true;
                    //if (lang == "1")
                    //{
                    //    ltrTitle.Text = Resources.Resource.wThongBao;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu + "nhạc chuông " + dtDetail.Rows[0]["SongNameUnicode"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo;
                    //    btnKhong.Text = Resources.Resource.btnKhong;
                    //}
                    //else
                    //{
                    //    ltrTitle.Text = Resources.Resource.wThongBao_KD;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD + "nhac chuong " + dtDetail.Rows[0]["SongName"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo_KD;
                    //    btnKhong.Text = Resources.Resource.btnKhong_KD;
                    //}

                    pnlThongBao.Visible = false;
                    try
                    {
                        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", "TT", Request.QueryString["id"].ToString());

                            messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "MUSICDOWNLOAD", "MUSIC_DOWN");

                            if (!string.IsNullOrEmpty(messageReturn) && 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;
                        }
                    }
                    catch (Exception ex)
                    {
                        ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                        logger.Debug("----------Lỗi charging----------------------");
                        logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                        logger.Debug(ex.ToString());
                        logger.Debug("----------Lỗi charging----------------------");
                    }
                }
            }
        }
示例#8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            SoDT  = Request.QueryString["sdt"];
            telCo = Session["telco"].ToString();
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            catID = ConvertUtility.ToInt32(Request.QueryString["catid"]);
            DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(telCo, id);

            if (catID == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
            {
                price = ConfigurationSettings.AppSettings.Get("thuphapprice");
            }
            else
            {
                price = ConfigurationSettings.AppSettings.Get("wallprice");
            }
            linkStr    = "<a href=\"../" + UrlProcess.GetWallpaperHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >HÌNH NỀN<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetWallpaperHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >HINH NEN<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\" />";

                //Nếu số điện thoại không hợp lệ thì hướng dẫn
                if (!MobileUtils.IsMobileNumber(SoDT))
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = Resources.Resource.wSoDienThoaiKhongHopLe;
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = Resources.Resource.wSoDienThoaiKhongHopLe_KD;
                    }
                    return;
                }


                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("wallcode") + " " + dtDetail.Rows[0]["WCode"].ToString() + " " + SoDT + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("wallcommandcode") + "</b> để gửi tặng hình nền <b>" + dtDetail.Rows[0]["WTitle_Unicode"].ToString() + "</b>" + Resources.Resource.wChon3G;
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("wallcode") + " " + dtDetail.Rows[0]["WCode"].ToString() + " " + SoDT + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("wallcommandcode") + "</b> de gui tang hinh nen <b>" + dtDetail.Rows[0]["WTitle"].ToString() + "</b>" + Resources.Resource.wChon3G_KD;
                    }
                }
                else
                {
                    //pnlThongBao.Visible = true;
                    //if (lang == "1")
                    //{
                    //    ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu + "hình nền " + dtDetail.Rows[0]["WTitle_Unicode"].ToString();
                    //    btnCo.Text = Resources.Resource.btnCo;
                    //    btnKhong.Text = Resources.Resource.btnKhong;
                    //}
                    //else
                    //{
                    //    ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    //    //ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu_KD.Replace("xxx", price);
                    //    ltrThongBao.Text = Resources.Resource.wXacNhanTangDichVu_KD + "hinh nen " + dtDetail.Rows[0]["WTitle"].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", "WP", Request.QueryString["id"].ToString());

                        messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "PICGIFT", "PIC_GIFT");

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "PICGIFT", "PIC_GIFT", price, "D", "WP", 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;
                    }
                }
            }
        }