Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]).ToString();
            width = ConvertUtility.ToInt32(Request.QueryString["w"]).ToString();
            if (!IsPostBack)
            {
                display         = ConvertUtility.ToString(Request.QueryString["display"]).ToLower();
                txtKeyword.Text = Server.HtmlDecode(Request.QueryString["key"]);
                string msisdn = ConvertUtility.ToString(Session["msisdn"]);
                if (lang == "1")
                {
                    if (string.IsNullOrEmpty(msisdn))
                    {
                        ltrXinChao.Text = "Xin chào <span class=\"pink bold\">khách</span>";
                    }
                    else
                    {
                        ltrXinChao.Text = "Xin chào thuê bao <span class=\"pink bold\">" + msisdn + "</span>";
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(msisdn))
                    {
                        ltrXinChao.Text = "Xin chao <span class=\"pink bold\">khach</span>";
                    }
                    else
                    {
                        ltrXinChao.Text = "Xin chao thue bao <span class=\"pink bold\">" + msisdn + "</span>";
                    }
                    lnkTrangChu.Text = "Trang chu";
                    lnkAmNhac.Text   = "Am nhac";
                }

                lnkTrangChu.NavigateUrl = UrlProcess.GetWapHomeUrl(lang, width);
                lnkAmNhac.NavigateUrl   = UrlProcess.GetMusicHomeUrl(lang, width);
                switch (display)
                {
                case "news":
                    ltrLienKet.Text = " » <span>Tin Showbiz</span>";
                    break;

                case "ndt":
                    ltrLienKet.Text = " » <a href=\"" + UrlProcess.GetMusicNewsListUrl(lang, width) + "\" >Tin Showbiz</a>";
                    break;

                case "album":
                    ltrLienKet.Text = " » <span>Album</span>";
                    break;

                case "byalb":
                    ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicAlbumUrl(lang, width) + "\" >Album</a>";
                    break;

                case "artist":
                    ltrLienKet.Text = " » <span>" + (lang == "1" ? "Theo ca sỹ" : "Theo ca sy") + "</span>";
                    break;

                case "byart":
                    ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicArtistUrl(lang, width) + "\" >" + (lang == "1" ? "Theo ca sỹ" : "Theo ca sy") + "</a>";
                    break;

                case "style":
                    ltrLienKet.Text = " » <span>" + (lang == "1" ? "Theo thể loại" : "Theo the loai") + "</span>";
                    break;

                case "bysty":
                    ltrLienKet.Text = " » <a href=\"" + UrlProcess.GeMusicStyleUrl(lang, width) + "\" >" + (lang == "1" ? "Theo thể loại" : "Theo the loai") + "</a>";    // » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                    break;

                case "mdt":
                    ltrLienKet.Text = " » <span>" + (lang == "1" ? "Chi tiết" : "Chi tiet") + "</span>";
                    break;

                case "newest":
                    ltrLienKet.Text = " » <span>" + (lang == "1" ? "Theo thứ tự" : "Theo thu tu") + "</span>";
                    break;
                }

                string type = ConvertUtility.ToInt32(Request.QueryString["type"]).ToString();
                switch (type)
                {
                case "0":
                    ddlDataType.SelectedIndex = 0;
                    break;

                case "1":
                    ddlDataType.SelectedIndex = 1;
                    break;

                case "2":
                    ddlDataType.SelectedIndex = 2;
                    break;
                }
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            width    = Request.QueryString["w"];
            preurl   = ConfigurationSettings.AppSettings.Get("urldata");
            tvprice  = ConfigurationSettings.AppSettings.Get("tipprice");
            tkprice  = ConfigurationSettings.AppSettings.Get("ykcgprice");
            kqcprice = ConfigurationSettings.AppSettings.Get("kqchoprice");
            if (!IsPostBack)
            {
                lang = ConvertUtility.ToInt32(Request.QueryString["lang"]);
                if (lang == 1)
                {
                    ltrTitle.Text      = "TIÊU ĐIỂM THỂ THAO";
                    lnkCacTinKhac.Text = " » Các tin khác";
                    //ltrGia.Text = "(" + Resources.Resource.wThongBaoGia + "Tư vấn " + ConfigurationSettings.AppSettings.Get("tipprice") + Resources.Resource.wDonViTien + ", Thống kê " + ConfigurationSettings.AppSettings.Get("ykcgprice") + Resources.Resource.wDonViTien + ", KQ chờ " + ConfigurationSettings.AppSettings.Get("kqchoprice") + Resources.Resource.wDonViTien + ")";
                }
                //else
                //{
                //    ltrGia.Text = "(" + Resources.Resource.wThongBaoGia_KD + "Tu van " + ConfigurationSettings.AppSettings.Get("tipprice") + Resources.Resource.wDonViTien_KD + ", Thong ke " + ConfigurationSettings.AppSettings.Get("ykcgprice") + Resources.Resource.wDonViTien_KD + ", KQ cho " + ConfigurationSettings.AppSettings.Get("kqchoprice") + Resources.Resource.wDonViTien_KD + ")";
                //}
                DataTable tbThueBao = WapController.W4A_Subscriber_GetInfo(ConvertUtility.ToString(Session["msisdn"]), 2);
                if (tbThueBao.Rows.Count > 0)
                {
                    if (lang == 1)
                    {
                        ltrDangKy.Text = "Thuê bao ngày";
                        lnkDangKy.Text = "Hạn sử dụng tới " + ConvertUtility.ToDateTime(tbThueBao.Rows[0]["ExpiredDate"]).ToString("dd/MM/yyyy HH:mm");
                    }
                    else
                    {
                        ltrDangKy.Text = "Thue bao ngay";
                        lnkDangKy.Text = "Han su dung toi " + ConvertUtility.ToDateTime(tbThueBao.Rows[0]["ExpiredDate"]).ToString("dd/MM/yyyy HH:mm");
                    }
                    lnkDangKy.NavigateUrl = string.Empty;
                }
                else
                {
                    if (lang == 1)
                    {
                        ltrDangKy.Text = "Đăng ký sử dụng trọn gói dịch vụ bóng đá. Giá: " + ConfigurationSettings.AppSettings.Get("bongdathangprice") + Resources.Resource.wDonViTien + "/ngày.";
                        lnkDangKy.Text = "» Đăng ký «";
                    }
                    else
                    {
                        ltrDangKy.Text = "Dang ky su dung tron goi dich vu bong da. Gia: " + ConfigurationSettings.AppSettings.Get("bongdathangprice") + Resources.Resource.wDonViTien_KD + "/ngay.";
                        lnkDangKy.Text = "» Dang ky «";
                    }
                    lnkDangKy.NavigateUrl = "../DangKyNew.aspx?lang=" + lang.ToString() + "&w" + width;
                }

                lnkCacTinKhac.NavigateUrl   = UrlProcess.GetNewsCategoryUrlNew(lang.ToString(), width, "129");
                lnkTranCauVang.NavigateUrl  = "../TuVanDacBietNew.aspx?id=4&lang=" + lang.ToString() + "&w" + width;
                lnkTuVanDacBiet.NavigateUrl = UrlProcess.GetSportHomeUrlNew(lang.ToString(), "tvdb", width);
                if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
                {
                    curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
                }

                DataTable dtlatest = TintucController.GetTopNewsHasCache(ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thethao_zoneiddefaut")), 3);
                rptNewLastest.DataSource     = dtlatest;
                rptNewLastest.ItemDataBound += rptNewLastest_ItemDataBound;
                rptNewLastest.DataBind();

                int totalrecord = 0;

                //DataTable dtlstTip = ThethaoController.GetAllGameByTip(pagesize, curpage, out totalrecord);
                //rptTrancaudinh.DataSource = dtlstTip;
                //rptTrancaudinh.ItemDataBound += new RepeaterItemEventHandler(rptTrancaudinh_ItemDataBound);
                //rptTrancaudinh.DataBind();
                //Pagging1.totalrecord = totalrecord;
                //Pagging1.pagesize = pagesize;
                //Pagging1.numberpage = pagenumber;
                //Pagging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"];
                //Pagging1.queryparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&tpage=" + Request.QueryString["tpage"] + "&cpage=";
            }
        }
Example #3
0
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;

            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = PhanmemController.GetAPPDetailByID(AppEnv.CheckSessionTelco(), id);

            //chitietGiaodich = "Phần mềm: " + dtDetail.Rows[0]["AppNameUnicode"] + " -- id:" + id + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            chitietGiaodich = "Phần mềm: " + dtDetail.Rows[0]["AppNameUnicode"] + " -- id:" + id;
            if (thuchien)
            {
                //if (lang == "1")
                //{
                ltrTieuDe.Text   = linkStr;
                lblTen.Text      = dtDetail.Rows[0]["AppNameUnicode"].ToString();
                lnkDownload.Text = Resources.Resource.wBamDeTai;
                ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong + " phần mềm " + dtDetail.Rows[0]["AppNameUnicode"].ToString();
                //}
                //else
                //{
                //    ltrTieuDe.Text = linkStr_KD;
                //    lblTen.Text = dtDetail.Rows[0]["AppName"].ToString();
                //    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                //    ltrNoiDung.Text = Resources.Resource.wMuaThanhCong_KD + " phan mem " + dtDetail.Rows[0]["AppName"].ToString();
                //}
                string url;
                try
                {
                    string appId     = ConvertUtility.ToString(dtDetail.Rows[0]["AppID"]);
                    string msisdn    = ConvertUtility.ToString(AppEnv.CheckMsisdn());
                    int    partnerId = ConvertUtility.ToInt32(dtDetail.Rows[0]["Partner_ID"]);
                    string telco     = ConvertUtility.ToString(AppEnv.CheckSessionTelco());

                    var urlservice = new VMGGame.MOReceiver();
                    url = urlservice.VMG_ReturnUrlForApplication(
                        appId,
                        0,
                        msisdn,
                        partnerId,
                        "XZONE",
                        "WAP",
                        telco,
                        "WAP.XZONE.VN",
                        "",
                        "");

                    int indexofhttp = url.IndexOf("http://");
                    if (indexofhttp == -1)
                    {
                        url = "http://" + url;
                    }
                    else
                    {
                        url = url.Substring(indexofhttp);
                    }
                }
                catch { url = ""; }
                lnkDownload.NavigateUrl = url;

                if (isLog)
                {
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 4);
                }
                PhanmemController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
            }
            else
            {
                //Thông báo lỗi thanh toán
                //if (lang == "1")
                //{
                ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                //}
                //else
                //{
                //    ltrTieuDe.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                //    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                //}

                if (isLog)
                {
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 4, messageReturn);
                }

                //--Thông báo lỗi thanh toán
            }

            if (isLog)
            {
                //log charging
                ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug(string.Format("MSISDN:{0}", Session["msisdn"]));
                logger.Debug(string.Format("Dich vu: Phan mem - parameter: {0} - Ten: {1} - id: {2}", price, dtDetail.Rows[0]["AppName"], id));
                logger.Debug("Phan mem Url:" + lnkDownload.NavigateUrl);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            price   = ConfigurationSettings.AppSettings.Get("XemMacDinh");
            lang    = "1";// Request.QueryString["lang"];
            width   = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id      = ConvertUtility.ToInt32(Request.QueryString["id"]);
            telCo   = Session["telco"].ToString();
            linkStr = " <h4 class=\"otherVideo\"><a  class=\"link-non-white\" href=\"/VClip/Default.aspx" + "\" >VIDEO<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\" />";

                if (Session["transactionid_old"] != null)
                {// Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "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);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    DataTable dtDetail = VideoController.GetVideoDetailByID(telCo, id);
                    if (telCo == "Undefined")
                    {
                        pnlSMS.Visible = true;
                        if (lang == "1")
                        {
                            ltrHuongdan.Text = linkStr + Resources.Resource.wHuongDan + "</a></h4>";
                            ltrSMS.Text      = "Soạn tin <b style=\"font-weight:bold\">" + ConfigurationSettings.AppSettings.Get("videocode") + " " + dtDetail.Rows[0]["VID"].ToString() + "</b> gửi <b style=\"font-weight:bold\">" + ConfigurationSettings.AppSettings.Get("videocommandcode") + "</b> để tải video <b>" + dtDetail.Rows[0]["VTitle_Unicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr + Resources.Resource.wHuongDan_KD + "</a></h4>";
                            ltrSMS.Text      = "Soan tin <b style=\"font-weight:bold\">" + ConfigurationSettings.AppSettings.Get("videocode") + " " + dtDetail.Rows[0]["VID"].ToString() + "</b> gui <b style=\"font-weight:bold\">" + ConfigurationSettings.AppSettings.Get("videocommandcode") + "</b> de tai video <b>" + dtDetail.Rows[0]["VTitle"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                        }
                    }
                    else
                    {
                        if (ConvertUtility.ToInt32(WapXzone_VNM.VClip.Library.AppEnv.GetSetting("ViettelConfirm")) == 0)
                        {
                            btnCo_Click(btnCo, EventArgs.Empty);
                        }
                        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.Replace("tải", "xem") + "video " + dtDetail.Rows[0]["VTitle_Unicode"].ToString();
                                btnCo.Text       = Resources.Resource.btnCo;
                                btnKhong.Text    = Resources.Resource.btnKhong;
                            }
                            else
                            {
                                ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao_KD;
                                //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                                ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("tai", "xem") + "video " + dtDetail.Rows[0]["VTitle"].ToString();
                                btnCo.Text       = Resources.Resource.btnCo_KD;
                                btnKhong.Text    = Resources.Resource.btnKhong_KD;
                            }
                        }
                    }
                }
            }
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = AppEnv.GetSetting("ykcgprice");

            telCo = AppEnv.CheckSessionTelco();

            linkStr = "<a href=\"" + UrlProcess.TheThaoHome() + "\" >BÓNG ĐÁ</a>";
            //linkStr_KD = "<a href=\"../" + UrlProcess.GetSportHomeUrl(lang, "home", width.ToString()).Replace("~/", "") + "\" >BONG DA<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\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                gameid = Request.QueryString["id"];//ThethaoController.GetSport_GameDetailBySportID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game_ID"].ToString();
                DataTable ykcg = ThethaoController.GetDetail_YKCG_ByGameID(gameid);

                if (WapController.W4A_Subscriber_IsActive(ConvertUtility.ToString(Session["msisdn"]), 2))
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                if (Session["transactionid_old"] != null)
                {
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                    {// 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(false, true);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.thethao + "6" + Request.QueryString["id"] + "&" + 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("ykcgcode") + " " + ykcg.Rows[0]["Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("ykcgcommandcode") + "</b> để nhận thống kê tin về trận đấu" + Resources.Resource.wChon3G;
                        //}
                        //else
                        //{
                        //    ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        //    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("ykcgcode") + " " + ykcg.Rows[0]["Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("ykcgcommandcode") + "</b> de nhan thong ke ve tran dau" + Resources.Resource.wChon3G_KD;
                        //}
                    }
                    else
                    {
                        pnlThongBao.Visible = false;
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new Library.VNMCharging.VNMChargingGW();

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "VIDEOVIEW", "VIDEO_VIEW", price, "D", "YKCG", Request.QueryString["id"]);

                            if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                            {
                                messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "VIDEOVIEW", "VIDEO_VIEW", price, "D", "YKCG", Request.QueryString["id"], out logPrice);
                                price         = logPrice;
                            }

                            if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                            {
                                messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), "VIDEOVIEW", "VIDEO_VIEW", price, "D", "YKCG", Request.QueryString["id"]);
                            }

                            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(false, true);
                            }
                            break;
                        }
                    }
                }

                #endregion
            }
        }
Example #6
0
        private static ImageInfo CreateEntityFromReader(IDataReader reader)
        {
            var item = new ImageInfo();

            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_ID")))
                  {
                      item.Image_ID = ConvertUtility.ToInt32(reader["Image_ID"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_Name")))
                  {
                      item.Image_Name = ConvertUtility.ToString(reader["Image_Name"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_Description")))
                  {
                      item.Image_Description = ConvertUtility.ToString(reader["Image_Description"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_File")))
                  {
                      item.Image_File = ConvertUtility.ToString(reader["Image_File"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_CreateDate")))
                  {
                      item.Image_CreateDate = ConvertUtility.ToDateTime(reader["Image_CreateDate"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_FileSize")))
                  {
                      item.Image_FileSize = ConvertUtility.ToDouble(reader["Image_FileSize"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_Width")))
                  {
                      item.Image_Width = ConvertUtility.ToInt32(reader["Image_Width"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_Height")))
                  {
                      item.Image_Height = ConvertUtility.ToInt32(reader["Image_Height"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_View")))
                  {
                      item.Image_View = ConvertUtility.ToInt32(reader["Image_View"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("User_ID")))
                  {
                      item.User_ID = ConvertUtility.ToInt32(reader["User_ID"]);
                  }
            }
            catch { }
            try { if (!reader.IsDBNull(reader.GetOrdinal("Image_Visible")))
                  {
                      item.Image_Visible = ConvertUtility.ToBoolean(reader["Image_Visible"]);
                  }
            }
            catch { }
            return(item);
        }
Example #7
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            if (totalrecord > 0 && pagesize > 0 && numberpage > 0)
            {
                totalpage = (int)Math.Ceiling((double)totalrecord / pagesize);
                int c    = (int)Math.Ceiling((double)curpage / numberpage);
                int from = (c - 1) * numberpage + 1;
                int to   = c * numberpage;
                if (to > totalpage)
                {
                    to = totalpage;
                }
                ArrayList x = new ArrayList();
                for (int i = from; i <= to; i++)
                {
                    x.Add(i);
                }
                rptPage.DataSource     = x;
                rptPage.ItemDataBound += rptPage_ItemDataBound;
                rptPage.DataBind();

                string   url    = Request.RawUrl;
                string[] arrUrl = url.Split('/');

                string name = arrUrl[2];

                int ct = (int)curpage / 5;
                if (1 < curpage)
                {
                    if (name == "album")
                    {
                        lnkFirst.NavigateUrl = UrlProcess.AmNhacChuyenMucAlbum(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());
                        lnkPrev.NavigateUrl  = UrlProcess.AmNhacChuyenMucAlbum(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                    else if (name == "ca-sy")
                    {
                        lnkFirst.NavigateUrl = UrlProcess.AmNhacChuyenMucCaSy(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());
                        lnkPrev.NavigateUrl  = UrlProcess.AmNhacChuyenMucCaSy(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                    else if (name == "the-loai")
                    {
                        lnkFirst.NavigateUrl = UrlProcess.AmNhacChuyenMucTheLoai(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());
                        lnkPrev.NavigateUrl  = UrlProcess.AmNhacChuyenMucTheLoai(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                    else if (name == "ca-sy-list")
                    {
                        lnkFirst.NavigateUrl = UrlProcess.AmNhacChuyenMucCaSyList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());
                        lnkPrev.NavigateUrl  = UrlProcess.AmNhacChuyenMucCaSyList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                    else if (name == "the-loai-list")
                    {
                        lnkFirst.NavigateUrl = UrlProcess.AmNhacChuyenMucTheLoaiList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());
                        lnkPrev.NavigateUrl  = UrlProcess.AmNhacChuyenMucTheLoaiList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                    else
                    {
                        lnkFirst.NavigateUrl = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());
                        lnkPrev.NavigateUrl  = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                }
                if (curpage < totalpage)
                {
                    if (name == "album")
                    {
                        lnkLast.NavigateUrl = UrlProcess.AmNhacChuyenMucAlbum(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), totalpage.ToString());
                        lnkNext.NavigateUrl = UrlProcess.AmNhacChuyenMucAlbum(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage + 1).ToString());
                    }
                    else if (name == "ca-sy")
                    {
                        lnkLast.NavigateUrl = UrlProcess.AmNhacChuyenMucCaSy(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), totalpage.ToString());
                        lnkNext.NavigateUrl = UrlProcess.AmNhacChuyenMucCaSy(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage + 1).ToString());
                    }
                    else if (name == "the-loai")
                    {
                        lnkLast.NavigateUrl = UrlProcess.AmNhacChuyenMucTheLoai(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), totalpage.ToString());
                        lnkNext.NavigateUrl = UrlProcess.AmNhacChuyenMucTheLoai(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage + 1).ToString());
                    }
                    else if (name == "ca-sy-list")
                    {
                        lnkLast.NavigateUrl = UrlProcess.AmNhacChuyenMucCaSyList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), totalpage.ToString());
                        lnkNext.NavigateUrl = UrlProcess.AmNhacChuyenMucCaSyList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage + 1).ToString());
                    }
                    else if (name == "the-loai-list")
                    {
                        lnkLast.NavigateUrl = UrlProcess.AmNhacChuyenMucTheLoaiList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), totalpage.ToString());
                        lnkNext.NavigateUrl = UrlProcess.AmNhacChuyenMucTheLoaiList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage + 1).ToString());
                    }
                    else
                    {
                        lnkFirst.NavigateUrl = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), 1.ToString());
                        lnkPrev.NavigateUrl  = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), (curpage - 1).ToString());
                    }
                }
            }
            else
            {
                ltrNoData.Visible = true;
                lnkFirst.Visible  = lnkPrev.Visible = lnkLast.Visible = lnkNext.Visible = false;
                if (Request.QueryString["lang"] == "1")
                {
                    ltrNoData.Text = "Dữ liệu của mục này hiện đang được cập nhật.";
                }
            }
        }
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog, string price)
        {
            pnlNoiDung.Visible = true;
            id = ConvertUtility.ToInt32(Request.QueryString["id"]);

            DataTable dtDetail = GameController.GetGameDetailByID(AppEnv.CheckFreeContentTelco(), id);

            chitietGiaodich = "Game: " + dtDetail.Rows[0]["GameNameUnicode"].ToString() + " -- id:" + id.ToString();

            if (thuchien)
            {
                ltrTieuDe.Text = linkStr;
                if (lang == "1")
                {
                    lblTen.Text      = dtDetail.Rows[0]["GameNameUnicode"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeTai;
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong + " game " + dtDetail.Rows[0]["GameNameUnicode"].ToString() + " (" + dtDetail.Rows[0]["Game_Code"].ToString() + ")";
                }
                else
                {
                    lblTen.Text      = dtDetail.Rows[0]["GameName"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong_KD + " game " + dtDetail.Rows[0]["GameName"].ToString() + " (" + dtDetail.Rows[0]["Game_Code"].ToString() + ")";
                }
                string url;
                try
                {
                    //var urlservice = new VMGGame.MOReceiver();
                    //url = urlservice.VMG_ReturnUrlForGame(ConvertUtility.ToString(dtDetail.Rows[0]["GID"]),
                    //                                        0,
                    //                                        AppEnv.CheckFreeContentMsisdn(),
                    //                                        ConvertUtility.ToInt32(dtDetail.Rows[0]["Partner_ID"]),
                    //                                        "VNM",
                    //                                        "WAP",
                    //                                        AppEnv.CheckFreeContentTelco(),
                    //                                        Constant.T_VietnamobileWap,
                    //                                        "", "");

                    var gameUrl = new GameHandler();
                    url = gameUrl.VMG_ReturnUrlForGame(ConvertUtility.ToString(dtDetail.Rows[0]["GID"]),
                                                       0,
                                                       AppEnv.CheckFreeContentMsisdn(),
                                                       ConvertUtility.ToInt32(dtDetail.Rows[0]["Partner_ID"]),
                                                       "VNM",
                                                       "WAP",
                                                       AppEnv.CheckFreeContentTelco(),
                                                       Constant.T_VietnamobileWap,
                                                       "", "", 112, ConvertUtility.ToInt32(price));


                    if (url.StartsWith("-1")) // if Non-Success : FIX TRA VE 1 LINK GAME VMG
                    {
                        url = gameUrl.VMG_ReturnUrlForGame("8629",
                                                           0,
                                                           AppEnv.CheckFreeContentMsisdn(),
                                                           ConvertUtility.ToInt32(dtDetail.Rows[0]["Partner_ID"]),
                                                           "VNM",
                                                           "WAP",
                                                           AppEnv.CheckFreeContentTelco(),
                                                           Constant.T_VietnamobileWap,
                                                           "", "", 112, ConvertUtility.ToInt32(price));
                    }


                    int indexofhttp = url.IndexOf("http://");
                    if (indexofhttp == -1)
                    {
                        url = "http://" + url;
                    }
                    else
                    {
                        url = url.Substring(indexofhttp);
                    }
                }
                catch (Exception ex) { url = ""; }

                lnkDownload.NavigateUrl = url;
                if (freecate == false)
                {
                    if (isLog)
                    {
                        Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, url, id.ToString(), chitietGiaodich, 3);
                        GameController.SetGamePrice(Session["msisdn"].ToString(), url, Constant.T_VietnamobileWap, ConvertUtility.ToInt32(price));
                    }
                }

                GameController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
            }
            else
            {
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 3, messageReturn);
                //--Thông báo lỗi thanh toán
            }
            if (freecate == false)
            {
                //log charging
                ILog logger = log4net.LogManager.GetLogger(AppEnv.CheckFreeContentTelco());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + AppEnv.CheckFreeContentMsisdn());
                logger.Debug("Dich vu: Game - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["GameName"].ToString() + " - id: " + id);
                logger.Debug("Game Url:" + lnkDownload.NavigateUrl);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            dropDotDanhGia.SelectedValue = idDotDanhGia.ToString();

            DataTable dtUsers = UserController.GetLanhDaoBP(txtKeyword.Text, dropSearchBy.SelectedValue, ConvertUtility.ToString(ViewState["Alphabet"]), idDotDanhGia, 1);

            //-------sort----------
            DataView dv = new DataView(dtUsers);

            if (ViewState["sortExpression"] != null && ViewState["sortExpression"].ToString() != string.Empty)
            {
                dv.Sort = ViewState["sortExpression"].ToString();
            }


            if (ViewState["sortDirection"] != null && ViewState["sortDirection"].ToString() == "Desc")
            {
                dv.Sort = ViewState["sortExpression"].ToString() + " " + ViewState["sortDirection"].ToString();
            }
            //--------sort-------------

            dtgUsers.DataSource    = dv;
            dtgUsers.RowDataBound += new GridViewRowEventHandler(dtgUsers_RowDataBound);
            dtgUsers.DataBind();

            if (dtUsers != null)
            {
                lblTotalBottom.Text = dtUsers.Rows.Count.ToString();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lang       = Request.QueryString["lang"];
            width      = ConvertUtility.ToInt32(Request.QueryString["w"]);
            telCo      = Session["telco"].ToString();
            price      = ConfigurationSettings.AppSettings.Get("bongdathangprice");
            linkStr    = "<a href=\"../" + UrlProcess.GetSportHomeUrlNew(lang, "home", width.ToString()).Replace("~/", "") + "\" >BÓNG ĐÁ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetSportHomeUrlNew(lang, "home", width.ToString()).Replace("~/", "") + "\" >BONG DA<a>";

            chitietGiaodich = "Bong da: thue bao ngay -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);

            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\" />";

                //
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                        ltrSMS.Text      = "Bạn vui lòng" + Resources.Resource.wChon3G.Remove(0, 10);
                    }
                    else
                    {
                        ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                        ltrSMS.Text      = "Ban vui long" + Resources.Resource.wChon3G_KD.Remove(0, 10);
                    }
                }
                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.wXacNhanDangKyDichVu + "dịch vụ bóng đá trọn gói.";
                    //    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.wXacNhanDangKyDichVu_KD + "dich vu bong da tron goi.";
                    //    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", "GAME87", "dangkythethao");
                        //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN");

                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "GAMEDOWN", "GAME_DOWN", price, "D", "GAME87", "dangkythethao");


                        if (!string.IsNullOrEmpty(messageReturn) && messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            WapController.W4A_Subscriber_Insert(Session["msisdn"].ToString(), 2, 1, "wap4a");
                            HienThiNoiDung(true);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false);
                        }
                        break;
                    }
                }
            }
        }
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            dropDotDanhGia.SelectedValue = idDotDanhGia.ToString();

            DataTable dtUsers = null;

            //if (CurrentUser.RoleID == (int)Constants.Role.CEO || CurrentUser.IsAdmin || CurrentUser.IsSuperAdmin)
            //{
            dtUsers = UserController.GetTPvaPP(txtKeyword.Text, dropSearchBy.SelectedValue, ConvertUtility.ToString(ViewState["Alphabet"]), idDotDanhGia, 0);
            //}
            //else
            //{
            //    dtUsers = UserController.GetTPvaPPByUserManager(txtKeyword.Text, dropSearchBy.SelectedValue, ConvertUtility.ToString(ViewState["Alphabet"]), idDotDanhGia, 0, CurrentUser.UserID);
            //}
            //-------sort----------
            DataView dv = new DataView(dtUsers);

            if (ViewState["sortExpression"] != null && ViewState["sortExpression"].ToString() != string.Empty)
            {
                dv.Sort = ViewState["sortExpression"].ToString();
            }


            if (ViewState["sortDirection"] != null && ViewState["sortDirection"].ToString() == "Desc")
            {
                dv.Sort = ViewState["sortExpression"].ToString() + " " + ViewState["sortDirection"].ToString();
            }
            //--------sort-------------

            dtgUsers.DataSource    = dv;
            dtgUsers.RowDataBound += new GridViewRowEventHandler(dtgUsers_RowDataBound);
            dtgUsers.DataBind();

            if (dtUsers != null)
            {
                lblTotalBottom.Text = dtUsers.Rows.Count.ToString();
            }
        }
        protected void HienThiNoiDung(Boolean thuchien)
        {
            pnlNoiDung.Visible = true;

            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = RTController.GetRingToneDetailByID(Session["telco"].ToString(), id);

            chitietGiaodich = "Nhạc: " + dtDetail.Rows[0]["SongNameUnicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            SoDT            = MobileUtils.ToSTDMobileNumber(SoDT);
            if (thuchien)
            {
                DataTable dtKhuyenMai = RTController.GetRingToneDetailRandom(Session["telco"].ToString(), id);
                string    khuyenmaiID = ConvertUtility.ToString(dtKhuyenMai.Rows[0]["W_RTItemID"]);
                lnkKhuyenMai.NavigateUrl = UrlProcess.GetGameDownloadItem(Session["telco"].ToString(), "2", khuyenmaiID, SecurityMethod.MD5Encrypt(khuyenmaiID));
                if (lang == "1")
                {
                    ltrTieuDe.Text = linkStr;
                    lblTen.Text    = dtDetail.Rows[0]["SongNameUnicode"].ToString();
                    //lnkDownload.Text = Resources.Resource.wBamDeTai;
                    ltrNoiDung.Text   = Resources.Resource.wTangThanhCong + " bản nhạc " + dtDetail.Rows[0]["SongNameUnicode"].ToString();
                    lnkKhuyenMai.Text = "Nhạc tặng: " + dtKhuyenMai.Rows[0]["SongNameUnicode"].ToString();
                }
                else
                {
                    ltrTieuDe.Text = linkStr_KD;
                    lblTen.Text    = dtDetail.Rows[0]["SongName"].ToString();
                    //lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                    ltrNoiDung.Text   = Resources.Resource.wTangThanhCong_KD + " ban nhac " + dtDetail.Rows[0]["SongName"].ToString();
                    lnkKhuyenMai.Text = "Nhac tang: " + dtKhuyenMai.Rows[0]["SongName"].ToString();
                };
                string url    = UrlProcess.GetGameDownloadItem(Session["telco"].ToString(), "2", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                MTInfo mtInfo = new MTInfo();
                Random random = new Random();
                //Thông báo cho người được tặng
                mtInfo.User_ID       = SoDT;
                mtInfo.Service_ID    = ConfigurationSettings.AppSettings.Get("ringtonecommandcode");
                mtInfo.Command_Code  = ConfigurationSettings.AppSettings.Get("ringtonecode");
                mtInfo.Message_Type  = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID    = random.Next(100000000, 999999999).ToString();
                mtInfo.Total_Message = 1;
                mtInfo.Message_Index = 0;
                mtInfo.IsMore        = 0;
                mtInfo.Content_Type  = 0;
                mtInfo.Message_Type  = (int)Constant.MessageType.FREE;
                mtInfo.Message       = "Ban nhan duoc qua tang nhac chuong " + dtDetail.Rows[0]["Code"].ToString() + " tu so dien thoai " + "0" + Session["msisdn"].ToString().Remove(0, 2);
                MTController.SMS_MTInsert(mtInfo);

                //MT thong bao cho nguoi gui tang biet
                mtInfo.Content_Type = 0;
                mtInfo.User_ID      = Session["msisdn"].ToString();
                mtInfo.Message      = "Ban da gui tang thanh cong nhac chuong " + dtDetail.Rows[0]["Code"].ToString() + " toi so dt " + SoDT;
                mtInfo.Message_Type = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID   = random.Next(100000000, 999999999).ToString();
                MTController.SMS_MTInsert(mtInfo);

                //Build waplink send to customer and insert to MT table
                mtInfo.User_ID      = SoDT;
                mtInfo.Message      = "Tai nhac chuong duoc tang theo dia chi: " + url;
                mtInfo.Content_Type = 8;
                mtInfo.Message_Type = (int)Constant.MessageType.FREE;
                mtInfo.Request_ID   = random.Next(100000000, 999999999).ToString();
                MTController.SMS_MTInsert(mtInfo);

                Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, url, id.ToString(), chitietGiaodich, 2);
                RTController.SetDownloadCounter(Session["telco"].ToString(), id);
            }
            else
            {
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    ltrTieuDe.Text  = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 2, messageReturn);
                //--Thông báo lỗi thanh toán
            }
            //log charging
            ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());

            logger.Debug("--------------------------------------------------");
            logger.Debug("MSISDN: " + Session["msisdn"].ToString());
            logger.Debug("So gui tang: " + SoDT);
            logger.Debug("Dich vu: Nhac chuong - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["SongName"].ToString() + " - id: " + id);
            logger.Debug("Nhac chuong Url:" + lnkDownload.NavigateUrl);
            logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
            logger.Debug("Error:" + messageReturn);
            logger.Debug("Current Url:" + Request.RawUrl);
            //end log
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lang       = Request.QueryString["lang"];
            width      = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price      = ConfigurationSettings.AppSettings.Get("kqxsprice");
            id         = ConvertUtility.ToInt32(Request.QueryString["id"]);
            telCo      = Session["telco"].ToString();
            linkStr    = "<a href=\"../" + UrlProcess.GetXosoHomeUrlNew(lang, width.ToString()).Replace("~/", "") + "\" >XỔ SỐ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetXosoHomeUrlNew(lang, width.ToString()).Replace("~/", "") + "\" >XO SO<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\" />";

                DataSet ds = XosoController.GetDetail_LotAndOtherLotByIdAndTop(id, 6);

                // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                if (Session["transactionid_old"] != null)
                {
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "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);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.xoso + 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("kqxscode") + " " + ds.Tables[0].Rows[0]["company_comment"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("kqxscommandcode") + "</b> để nhận kết quả xổ số mới nhất" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("kqxscode") + " " + ds.Tables[0].Rows[0]["company_comment"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("kqxscommandcode") + "</b> de nhan ket qua xo so moi nhat" + 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 + "kết quả " + ds.Tables[0].Rows[0]["company_name"].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 + "ket qua " + UnicodeUtility.UnicodeToKoDau(ds.Tables[0].Rows[0]["company_name"].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", "KQXS", Request.QueryString["id"].ToString());

                            //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "LOTOLASTRESULT", "LAST_RESULT");

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "LOTOLASTRESULT", "LAST_RESULT", price, "D", "KQXS", Request.QueryString["id"]);

                            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;
                        }
                    }
                }
            }
        }
        protected void HienThiNoiDung(Boolean thuchien)
        {
            pnlNoiDung.Visible = true;

            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataSet ds = XosoController.GetDetail_LotAndOtherLotByIdAndTop(id, 6);

            string chitietGiaodich = "KQXS: " + ds.Tables[0].Rows[0]["company_name"].ToString() + " ngày " + ConvertUtility.ToDateTime(ds.Tables[0].Rows[0]["lot_time"]).ToString("dd/MM/yyyy") + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);

            if (thuchien)
            {
                //
                if (lang == "1")
                {
                    ltrTieuDe.Text = "XỔ SỐ";
                    lblTen.Text    = ds.Tables[0].Rows[0]["company_name"].ToString() + " ngày " + ConvertUtility.ToDateTime(ds.Tables[0].Rows[0]["lot_time"]).ToString("dd/MM/yyyy");
                    //ltrNoiDung.Text = "Bạn đã đăng ký thành công dịch vụ lấy kết quả trực tiếp từ trường quay xổ số.<br />Cảm ơn bạn đã sử dụng dịch vụ!";
                    lbldb6.Text = "Đặc Biệt DB6";
                    lbldb.Text  = "Đặc Biệt";
                    lblg1.Text  = "Nhất";
                    lblg2.Text  = "Nhì";
                    lblg3.Text  = "Ba";
                    lblg4.Text  = "Tư";
                    lblg5.Text  = "Năm";
                    lblg6.Text  = "Sáu";
                    lblg7.Text  = "Bảy";
                    lblg8.Text  = "Tám";
                    //lblOther.Text = "XEM TIẾP";
                }
                else
                {
                    ltrTieuDe.Text = "XO SO";
                    lblTen.Text    = UnicodeUtility.UnicodeToKoDau(ds.Tables[0].Rows[0]["company_name"].ToString()) + " ngay " + ConvertUtility.ToDateTime(ds.Tables[0].Rows[0]["lot_time"]).ToString("dd/MM/yyyy");;
                    //ltrNoiDung.Text = "Ban da dang ky thanh cong dich vu lay ket qua truc tiep tu truong quay xo so.<br />Cam on ban da su dung dich vu!";
                };
                // Nội dung KQXS
                if (string.IsNullOrEmpty(ds.Tables[0].Rows[0]["lot_prize16"].ToString()))
                {
                    g1.Visible = false;
                }
                else
                {
                    g1.Visible   = true;
                    ltrgdb6.Text = ds.Tables[0].Rows[0]["lot_prize16"].ToString();
                }
                if (string.IsNullOrEmpty(ds.Tables[0].Rows[0]["lot_prize08"].ToString()))
                {
                    g8.Visible = false;
                }
                else
                {
                    g8.Visible = true;
                    ltrg8.Text = ds.Tables[0].Rows[0]["lot_prize08"].ToString();
                }
                ltrg1.Text = ds.Tables[0].Rows[0]["lot_prize01"].ToString();
                ltrg2.Text = ds.Tables[0].Rows[0]["lot_prize02"].ToString();
                ltrg3.Text = ds.Tables[0].Rows[0]["lot_prize03"].ToString();
                ltrg4.Text = ds.Tables[0].Rows[0]["lot_prize04"].ToString();
                ltrg5.Text = ds.Tables[0].Rows[0]["lot_prize05"].ToString();
                ltrg6.Text = ds.Tables[0].Rows[0]["lot_prize06"].ToString();
                ltrg7.Text = ds.Tables[0].Rows[0]["lot_prize07"].ToString();
                ltrdb.Text = ds.Tables[0].Rows[0]["lot_prize15"].ToString();
                //
                Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 9);
                //
                //rptOther.DataSource = ds.Tables[1];
                //rptOther.ItemDataBound += new RepeaterItemEventHandler(rptOther_ItemDataBound); ;
                //rptOther.DataBind();
            }
            else
            {
                detail.Visible = false;
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    ltrTieuDe.Text  = Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    ltrTieuDe.Text  = Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 9, messageReturn);
                //--Thông báo lỗi thanh toán
            }
            //log charging
            ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());

            logger.Debug("--------------------------------------------------");
            logger.Debug("MSISDN:" + Session["msisdn"].ToString());
            logger.Debug("Dich vu: Xo so - Ket qua - parameter: " + price + " - id: " + id);
            logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
            logger.Debug("Error:" + messageReturn);
            logger.Debug("Current Url:" + Request.RawUrl);
            //end log
        }
        protected void HienThiNoiDung(Boolean thuchien, Boolean log)
        {
            pnlNoiDung.Visible = true;

            gameid = ThethaoController.GetAll_Sport87DetailByGame87ID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game87_ID"].ToString();
            DataSet ds87detail      = ThethaoController.GetAll_Sport87_DetailBy_PK_Game87ID(gameid);
            string  chitietGiaodich = string.Empty;

            if (thuchien)
            {
                if (ds87detail.Tables[0].Rows.Count > 0)
                {
                    if (lang == "1")
                    {
                        ltrTieuDe.Text  = linkStr;
                        lblTen.Text     = ds87detail.Tables[0].Rows[0]["Name"].ToString();
                        ltrNoiDung.Text = ds87detail.Tables[0].Rows[0]["ContentValue"].ToString().Replace("\r\n", "<div class=\"clearfix\"></div>");
                    }
                    else
                    {
                        ltrTieuDe.Text  = linkStr_KD;
                        lblTen.Text     = UnicodeUtility.UnicodeToKoDau(ds87detail.Tables[0].Rows[0]["Name"].ToString());
                        ltrNoiDung.Text = UnicodeUtility.UnicodeToKoDau(ds87detail.Tables[0].Rows[0]["ContentValue"].ToString().Replace("\r\n", "<div class=\"clearfix\"></div>"));
                    };
                    chitietGiaodich = "Tu van dac biet: " + ds87detail.Tables[0].Rows[0]["Name"].ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                    chitietGiaodich = chitietGiaodich + "\r\n" + ltrNoiDung.Text;
                    if (log)
                    {
                        Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), gameid, chitietGiaodich, 14);     //game 87
                    }
                }
            }
            else
            {
                chitietGiaodich = "Tu van dac biet: " + gameid + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    ltrTieuDe.Text  = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                if (log)
                {
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), gameid, chitietGiaodich, 14, messageReturn);
                }
                //--Thông báo lỗi thanh toán
            }
            if (log)
            {
                //log charging
                ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN: " + Session["msisdn"].ToString());
                logger.Debug("Dich vu: Tu van dac biet (Game87)" + gameid);
                logger.Debug("Chi tiet: " + chitietGiaodich);
                logger.Debug("IP: " + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error: " + messageReturn);
                logger.Debug("Current Url: " + Request.RawUrl);
                //end log
            }
        }
Example #16
0
        private void LoadSidebar()
        {
            radmMenu.Text = "";
            //GetPath();
            try
            {
                cmd = ConvertUtility.ToString(Request.QueryString["cmd"]);
            }
            catch
            {
                cmd = "";
            }
            portalid = ConvertUtility.ToInt32(Request.QueryString["portalid"]);
            DataTable dtCommands = null;

            if (!CurrentUser.IsSuperAdmin)
            {
                dtCommands = CommandController.GetCommandsForUserByPortalID(CurrentUser.UserID, portalid);
            }
            else
            {
                dtCommands = CommandController.GetCommands();
            }


            if (cmd != "")
            {
                DataRow[] _lstCommands = dtCommands.Select("CommandKey = '" + cmd + "' AND CommandVisible = 1");
                foreach (DataRow row in _lstCommands)
                {
                    listCmd.Add(row["CommandID"].ToString());
                    if (row["CommandParentID"].ToString() != "0")
                    {
                        LoadParentCommand(ConvertUtility.ToInt32(row["CommandParentID"].ToString()), dtCommands, ref listCmd);
                    }
                    break;
                }
            }

            DataRow[] drRoots = dtCommands.Select("CommandParentID = 0");
            int       _count  = 0;

            if (ConvertUtility.ToString(Request.QueryString["cmd"]) == "")
            {
                sb.Append("<li class=\"start active\"><a href=\"/\"><i class=\"icon-home\"></i><span class=\"title\">Home</span><span class=\"selected\"></span></a></li>");
            }
            else
            {
                sb.Append("<li><a href=\"/\"><i class=\"icon-home\"></i><span class=\"title\">Home</span><span class=\"selected\"></span></a></li>");
            }

            foreach (DataRow row in drRoots)
            {
                string name = "";
                string url  = "";
                name = row["CommandName"].ToString();
                //_item.Value = row["CommandID"].ToString();

                int       curItem      = ConvertUtility.ToInt32(row["CommandID"].ToString());
                DataRow[] _lstCommands = dtCommands.Select("CommandParentID = " + curItem + " AND CommandVisible = 1");

                if (!string.IsNullOrEmpty(row["CommandUrl"].ToString().Trim()))
                {
                    url = row["CommandUrl"].ToString();
                }
                else if (!string.IsNullOrEmpty(row["CommandKey"].ToString().Trim()))
                {
                    url = AppEnv.AdminUrlParams(row["CommandKey"].ToString()) + row["CommandParams"].ToString();
                }
                if (ConvertUtility.ToBoolean(row["CommandVisible"]) == false || ConvertUtility.ToBoolean(row["CommandEnable"]) == false)
                {
                    continue;
                }
                if (listCmd.Contains(row["CommandID"].ToString()))
                {
                    if (_count == 0)
                    {
                        sb.Append("<li class=\"start active\">");
                    }
                    else
                    {
                        sb.Append("<li class=\"active\">");
                    }
                }
                else
                {
                    if (_count == 0)
                    {
                        sb.Append("<li class=\"\">");
                    }
                    else
                    {
                        sb.Append("<li>");
                    }
                }

                if (_lstCommands.Length > 0)
                {
                    if (_count == 0)
                    {
                        sb.Append(string.Format(fmAu, url, name, "icon-gift"));
                    }
                    else
                    {
                        sb.Append(string.Format(fmAu, url, name, "icon-gift"));
                    }
                    sb.Append("<ul class=\"sub-menu\">");
                    LoadSidebarItems(ConvertUtility.ToInt32(row["CommandID"].ToString()), dtCommands);
                    sb.Append("</ul>");
                }
                else
                {
                    if (_count == 0)
                    {
                        sb.Append(string.Format(fmAd, url, name, "icon-home"));
                    }
                    else
                    {
                        sb.Append(string.Format(fmAd, url, name, "icon-gift"));
                    }
                }
                sb.Append("</li>");
                _count++;
            }
            radmMenu.Text = sb.ToString();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lang       = Request.QueryString["lang"];
            width      = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price      = ConfigurationSettings.AppSettings.Get("goldprice");
            telCo      = Session["telco"].ToString();
            linkStr    = "<a href=\"../" + UrlProcess.GetSportHomeUrlNew(lang, "home", width.ToString()).Replace("~/", "") + "\" >BÓNG ĐÁ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetSportHomeUrlNew(lang, "home", width.ToString()).Replace("~/", "") + "\" >BONG DA<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\" />";

                gameid = ThethaoController.GetAll_Sport87DetailByGame87ID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game87_ID"].ToString();
                DataSet ds87detail = ThethaoController.GetAll_Sport87_DetailBy_PK_Game87ID(gameid);
                if (!ConvertUtility.ToBoolean(ds87detail.Tables[0].Rows[0]["IsFull"]))
                {
                    pnlThongBao.Visible = true;
                    if (lang == "1")
                    {
                        ltrTitle.Text = linkStr + " » " + Resources.Resource.wThongBao;
                        //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu.Replace("xxx", price);
                        ltrThongBao.Text = ds87detail.Tables[1].Rows[0]["ContentValue"].ToString();
                        btnCo.Visible    = false;
                        btnKhong.Visible = false;
                    }
                    else
                    {
                        ltrTitle.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                        //ltrThongBao.Text = Resources.Resource.wXacNhanDichVu_KD.Replace("xxx", price);
                        ltrThongBao.Text = UnicodeUtility.UnicodeToKoDau(ds87detail.Tables[1].Rows[0]["ContentValue"].ToString());
                        btnCo.Visible    = false;
                        btnKhong.Visible = false;
                    }
                }
                else
                {
                    if (WapController.W4A_Subscriber_IsActive(ConvertUtility.ToString(Session["msisdn"]), 2))
                    {
                        HienThiNoiDung(true, false);
                        return;
                    }

                    // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                    if (Session["transactionid_old"] != null)
                    {
                        messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                        if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                        {// 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(false, true);
                        }
                        Session["transactionid_old"] = null;
                    }
                    else
                    {
                        //gameid = ThethaoController.GetAll_Sport87DetailByGame87ID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game87_ID"].ToString();
                        if (telCo == Constant.T_Mobifone)
                        {
                            string content = Session["cpid"].ToString() + "&" + Constant.thethao + "9" + Request.QueryString["id"] + "&" + 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;
                                //Xiên
                                if (Request.QueryString["id"] == "2")
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("xiencode") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("xiencommandcode") + "</b> để nhận chuỗi kèo xiên sáng nhất" + Resources.Resource.wChon3G;
                                }
                                //Trận cầu vàng
                                if (Request.QueryString["id"] == "4")
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("goldcode") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("goldcommandcode") + "</b> để nhận thông tin về trận cầu ngon ăn nhất" + Resources.Resource.wChon3G;
                                }
                                //Tài Xỉu sáng nhất
                                if (Request.QueryString["id"] == "5")
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("tvtxcode") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("tvtxcommandcode") + "</b> để nhận thông tin Tài Xỉu sáng nhất" + Resources.Resource.wChon3G;
                                }
                                //Trên dưới sáng nhất
                                if (Request.QueryString["id"] == "6")
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("tvtdcode") + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("tvtdcommandcode") + "</b> để nhận thông tin Trên Dưới sáng nhất" + Resources.Resource.wChon3G;
                                }
                                //Sáng nhất giải
                                if (",1,3,7,8,9,10,11,12,".LastIndexOf("," + Request.QueryString["id"] + ",") >= 0)
                                {
                                    ltrSMS.Text = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("sangcode") + " &lt;ma tran&gt;</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("sangcommandcode") + "</b> để nhận thông tin Kèo sáng nhất giải" + Resources.Resource.wChon3G;
                                }
                            }
                            else
                            {
                                ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                                if (Request.QueryString["id"] == "2")
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("xiencode") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("xiencommandcode") + "</b> de nhan chuoi keo xien sang nhat" + Resources.Resource.wChon3G;
                                }
                                if (Request.QueryString["id"] == "4")
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("goldcode") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("goldcommandcode") + "</b> de nhan thong tin ve tran cau ngon an nhat" + Resources.Resource.wChon3G_KD;
                                }
                                if (Request.QueryString["id"] == "5")
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("tvtxcode") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("tvtxcommandcode") + "</b> de nhan thong tin Tai Xiu sang nhat" + Resources.Resource.wChon3G_KD;
                                }
                                if (Request.QueryString["id"] == "6")
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("tvtdcode") + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("tvtdcommandcode") + "</b> de nhan thong tin Tren Duoi sang nhat" + Resources.Resource.wChon3G_KD;
                                }
                                if (",1,3,7,8,9,10,11,12,".LastIndexOf("," + Request.QueryString["id"] + ",") >= 0)
                                {
                                    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("sangcode") + " &lt;ma tran&gt;</b> gui <b>" + ConfigurationSettings.AppSettings.Get("sangcommandcode") + "</b> de nhan thong tin Keo sang nhat giai" + 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 + "dịch vụ tư vấn đặc biệt " + ds87detail.Tables[0].Rows[0]["Name"].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 + "dich vu tu van dac biet " + ds87detail.Tables[0].Rows[0]["Name"].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", "GAME87", Request.QueryString["id"].ToString());

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

                                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(false, true);
                                }
                                break;
                            }
                        }
                    }
                }
            }
        }
Example #18
0
        protected void btnUpdateDiem1_Click(object sender, EventArgs e)
        {
            Session["Nav"] = "1";
            foreach (GridViewRow row in dgrKhoiLuongCV1.Rows)
            {
                Label   txtTenCongViec  = (Label)row.FindControl("txtTenCongViec");
                TextBox txtTyTrongCV    = (TextBox)row.FindControl("txtTyTrongCV");
                TextBox txtThoiGian     = (TextBox)row.FindControl("txtThoiGian");
                Label   txtSoLieuCamKet = (Label)row.FindControl("txtSoLieuCamKet");
                TextBox txtSoLieuThucHienThucTeTrongThang = (TextBox)row.FindControl("txtSoLieuThucHienThucTeTrongThang");
                TextBox txtNhanVienDanhGiaTyLeHoanThanh   = (TextBox)row.FindControl("txtNhanVienDanhGiaTyLeHoanThanh");
                TextBox txtTBPDanhGia       = (TextBox)row.FindControl("txtTBPDanhGia");
                Label   txtYeuCauHoTro      = (Label)row.FindControl("txtYeuCauHoTro");
                TextBox txtYKienCuaNhanVien = (TextBox)row.FindControl("txtYKienCuaNhanVien");
                TextBox txtYKienCuaTBP      = (TextBox)row.FindControl("txtYKienCuaTBP");
                ListBox dropBoPhanHoTro     = (ListBox)row.FindControl("dropBoPhanHoTro");

                Label txtID         = (Label)row.FindControl("txtID");
                Label lblIDCongViec = (Label)row.FindControl("lblIDCongViec");

                Label lblIDBoPhan      = (Label)row.FindControl("lblIDBoPhan");
                Label lblIDBoPhanHoTro = (Label)row.FindControl("lblIDBoPhanHoTro");
                Label lblIDPhongBan    = (Label)row.FindControl("lblIDPhongBan");
                Label txtIdCongViec    = (Label)row.FindControl("txtIdCongViec");

                DanhGiaThang_DGCBCNVDanhGiaTTCVInfo info = new DanhGiaThang_DGCBCNVDanhGiaTTCVInfo();

                info.ID           = ConvertUtility.ToInt32(txtID.Text);
                info.IDDotDanhGia = idDotDanhGia;
                info.IDNhanVien   = idNhanVien;
                info.TenCongViec  = txtTenCongViec.Text.Trim();
                info.SoGio        = ConvertUtility.ToDouble(txtThoiGian.Text);
                info.TyTrongCV    = ConvertUtility.ToDouble(info.SoGio * 100 / 176);
                info.SoLieuCamKet = ConvertUtility.ToString(txtSoLieuCamKet.Text);
                info.SoLieuThucHienThucTeTrongThang = txtSoLieuThucHienThucTeTrongThang.Text;
                info.NhanVienDanhGiaTyLeHoanThanh   = ConvertUtility.ToDouble(txtNhanVienDanhGiaTyLeHoanThanh.Text);

                if (info.NhanVienDanhGiaTyLeHoanThanh < 0)
                {
                    info.NhanVienDanhGiaTyLeHoanThanh = 0;
                }

                if (CurrentUser.RoleID != (int)Constants.Role.TruongBoPhanKhoiHoTro && CurrentUser.RoleID != (int)Constants.Role.TruongBoPhanKhoiKinhDoanh)
                {
                    if (CurrentUser.UserID == idNhanVien)
                    {
                        info.TBPDanhGia = info.NhanVienDanhGiaTyLeHoanThanh;
                    }
                    else
                    {
                        info.TBPDanhGia = ConvertUtility.ToDouble(txtTBPDanhGia.Text);
                    }
                }
                else
                {
                    info.TBPDanhGia = ConvertUtility.ToDouble(txtTBPDanhGia.Text);
                }

                if (info.TBPDanhGia < 0)
                {
                    info.TBPDanhGia = 0;
                }

                info.YeuCauHoTro      = ConvertUtility.ToString(txtYeuCauHoTro.Text);
                info.YKienCuaNhanVien = ConvertUtility.ToString(txtYKienCuaNhanVien.Text);
                info.YKienCuaTBP      = ConvertUtility.ToString(txtYKienCuaTBP.Text);
                info.Loai             = 1;

                info.IDCongViec    = ConvertUtility.ToInt32(lblIDCongViec.Text);
                info.IDBoPhan      = ConvertUtility.ToInt32(lblIDBoPhan.Text);
                info.IDBoPhanHoTro = ConvertUtility.ToInt32(dropBoPhanHoTro.SelectedValue);
                info.IDPhongBan    = ConvertUtility.ToInt32(lblIDPhongBan.Text);

                DanhGiaThang_DGCBCNVDanhGiaTTCVController.Update(info);

                foreach (ListItem item in dropBoPhanHoTro.Items)
                {
                    if (item.Selected)
                    {
                        DanhGiaThang_DGCBCNVDanhGiaTTCVController.UpdateKeHoachThangBoPhanHoTro(idDotDanhGia, ConvertUtility.ToInt32(txtIdCongViec.Text), ConvertUtility.ToInt32(item.Value));
                    }
                    else
                    {
                        DanhGiaThang_DGCBCNVDanhGiaTTCVController.DeleteKeHoachThangBoPhanHoTro(idDotDanhGia, ConvertUtility.ToInt32(txtIdCongViec.Text), ConvertUtility.ToInt32(item.Value));
                    }
                }
            }

            if (CurrentUser.RoleID != (int)Constants.Role.NhanVien && CurrentUser.RoleID != (int)Constants.Role.NhanVienKD)
            {
                DataTable dt = DotDanhGiaController.checkDanhGiaThang(idDotDanhGia, idNhanVien);

                if (dt != null && dt.Rows.Count > 0)
                {
                    if (ConvertUtility.ToInt32(dt.Rows[0]["TrangThai"]) == (int)Constants.TrangThaiDanhGiaNhanVien.ThongNhat)
                    {
                        UserInfo userInfo = UserController.GetUser(idNhanVien);

                        EmailUtility.DoSendMail(userInfo.EmailVNG, "", "Trưởng bộ phận/Trưởng Phòng đã thống nhất bảng đánh giá tháng", "TBP/TP (" + CurrentUser.EmailVNG + ")  đã cập nhật điểm công việc thường xuyên của bạn. Đề nghị bạn đăng nhập phần mềm để xem kết quả đánh giá.");
                    }
                }
            }

            //if (dgrKhoiLuongCV1.Rows.Count > 0)
            //{
            //    Response.Write("<script>javascript:alert('Bạn đã cập nhật thông tin thành công')</script>");
            //}
        }
Example #19
0
        public void rptPage_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            int curdata = ConvertUtility.ToInt32(e.Item.DataItem);

            if (curdata == pagesize || curdata == totalpage)
            {
                Literal ltrGach = (Literal)e.Item.FindControl("ltrGach");
                ltrGach.Visible = false;
            }
            Label ltrPage = (Label)e.Item.FindControl("ltrPage");

            string urlGet = Request.RawUrl;

            string[] arrUrl = urlGet.Split('/');

            string name = arrUrl[2];
            string url;

            if (name == "album")
            {
                url = UrlProcess.AmNhacChuyenMucAlbum(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), ConvertUtility.ToString(e.Item.DataItem));
            }
            else if (name == "ca-sy")
            {
                url = UrlProcess.AmNhacChuyenMucCaSy(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), ConvertUtility.ToString(e.Item.DataItem));
            }
            else if (name == "the-loai")
            {
                url = UrlProcess.AmNhacChuyenMucTheLoai(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), ConvertUtility.ToString(e.Item.DataItem));
            }
            else if (name == "ca-sy-list")
            {
                url = UrlProcess.AmNhacChuyenMucCaSyList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), ConvertUtility.ToString(e.Item.DataItem));
            }
            else if (name == "the-loai-list")
            {
                url = UrlProcess.AmNhacChuyenMucTheLoaiList(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), ConvertUtility.ToString(e.Item.DataItem));
            }
            else
            {
                url = UrlProcess.TheThaoLichThiDauChiTiet(ConvertUtility.ToString(arrUrl[3]), arrUrl[5].Replace(".aspx", ""), ConvertUtility.ToString(e.Item.DataItem));
            }


            if ((e.Item.ItemIndex + 1) == curpage)
            {
                ltrPage.Text = "<span class=\"orange bold\">" + ConvertUtility.ToString(e.Item.DataItem) + "</span>";
            }
            else
            {
                if (curpage > numberpage)
                {
                    if (ConvertUtility.ToInt32(e.Item.DataItem) == curpage)
                    {
                        ltrPage.Text = "<span class=\"orange bold\">" + ConvertUtility.ToString(e.Item.DataItem) + "</span>";
                    }
                    else
                    {
                        ltrPage.Text = "<a href=\"" + url + "\" >" + ConvertUtility.ToString(e.Item.DataItem) + " </a>";
                    }
                }
                else
                {
                    ltrPage.Text = "<a href=\"" + url + "\" >" + ConvertUtility.ToString(e.Item.DataItem) + " </a>";
                }
            }
        }
Example #20
0
        public void rptPage_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            int curdata = ConvertUtility.ToInt32(e.Item.DataItem);

            if (curdata == pagesize || curdata == totalpage)
            {
                Literal ltrGach = (Literal)e.Item.FindControl("ltrGach");
                ltrGach.Visible = false;
            }
            Label  ltrPage = (Label)e.Item.FindControl("ltrPage");
            string url     = Request.AppRelativeCurrentExecutionFilePath.Replace("~/Thethao/", "") + queryparam + e.Item.DataItem;


            if ((e.Item.ItemIndex + 1) == curpage)
            {
                ltrPage.Text = "<span class=\"link-non-orange\">" + ConvertUtility.ToString(e.Item.DataItem) + "</span>";
            }
            else
            {
                if (curpage > numberpage)
                {
                    if (ConvertUtility.ToInt32(e.Item.DataItem) == curpage)
                    {
                        ltrPage.Text = "<span class=\"link-non-orange\">" + ConvertUtility.ToString(e.Item.DataItem) + "</span>";
                    }
                    else
                    {
                        ltrPage.Text = "<a class=\"link-non-black\" href=\"" + url + "\" >" + ConvertUtility.ToString(e.Item.DataItem) + " </a>";
                    }
                }
                else
                {
                    ltrPage.Text = "<a class=\"link-non-black\" href=\"" + url + "\" >" + ConvertUtility.ToString(e.Item.DataItem) + " </a>";
                }
            }
        }
Example #21
0
        protected void HienThiNoiDung(Boolean thuchien)
        {
            pnlNoiDung.Visible = true;

            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = VideoController.GetVideoDetailByID(Session["telco"].ToString(), id);

            chitietGiaodich = "Video view: " + dtDetail.Rows[0]["VTitle_Unicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            if (thuchien)
            {
                if (lang == "1")
                {
                    ltrTieuDe.Text   = linkStr;
                    lblTen.Text      = dtDetail.Rows[0]["VTitle_Unicode"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeXem + "video";
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong + " video " + dtDetail.Rows[0]["VTitle_Unicode"].ToString();
                }
                else
                {
                    ltrTieuDe.Text   = linkStr;
                    lblTen.Text      = dtDetail.Rows[0]["VTitle"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeXem_KD + "video";
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong_KD + " video " + dtDetail.Rows[0]["VTitle"].ToString();
                }

                if (dtDetail.Rows.Count > 0)
                {
                    string viewLink;

                    if (!string.IsNullOrEmpty(dtDetail.Rows[0]["SmartPhonePath"].ToString()))
                    {
                        viewLink = dtDetail.Rows[0]["SmartPhonePath"].ToString();
                    }
                    else
                    {
                        viewLink = dtDetail.Rows[0]["VMobilePath"].ToString();
                    }

                    if (HttpContext.Current.Request.UserAgent != null)
                    {
                        if (HttpContext.Current.Request.UserAgent.ToLower().Contains("safari"))
                        {
                            lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmviewIphone") + viewLink.Replace("~/", "/");
                        }
                        else
                        {
                            lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmview") + viewLink.Replace("~/Upload/Video", "");
                        }
                    }
                    else
                    {
                        lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmview") + viewLink.Replace("~/Upload/Video", "");
                    }
                }

                //lnkDownload.NavigateUrl = ConfigurationSettings.AppSettings.Get("vnmview") + dtDetail.Rows[0]["VMobilePath"].ToString().Replace("~/Upload/Video", "");
                bool log = true;
                if (ConvertUtility.ToString(Session["transactionid_detail"]) == chitietGiaodich)
                {
                    log = false;
                }
                Session["transactionid_detail"] = chitietGiaodich;
                if (log)
                {
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 5);
                }
            }
            else
            {
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    ltrTieuDe.Text  = linkStr + " » " + Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 5, messageReturn);
                //--Thông báo lỗi thanh toán
            }


            //log charging
            ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());

            logger.Info("Dich vu: Video - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["VTitle"].ToString() + " - id: " + id);
            logger.Info("Video Url:" + lnkDownload.NavigateUrl);
            string clientIP = HttpContext.Current.Request.UserHostAddress;

            if (Session["telco"].ToString() == Constant.T_Viettel)
            {
                clientIP = ConvertUtility.ToString(HttpContext.Current.Request.Headers.Get("VX-Forwarded-For"));
            }
            logger.Debug("IP:" + clientIP);
            logger.Debug("Current Url:" + Request.RawUrl);
            logger.Info("Header: " + Request.Headers.ToString());
            logger.Info("Current TransactionID: " + ConvertUtility.ToString(Session["transactionid"]));
            //end log
        }
 public PartialViewResult AddRoleUser()
 {
     ViewData["UserId"] = ConvertUtility.ToString(Request.QueryString["userid"]);
     return(PartialView());
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            width    = Request.QueryString["w"];
            tab      = Request.QueryString["tab"];
            tvprice  = ConfigurationSettings.AppSettings.Get("tipprice");
            tkprice  = ConfigurationSettings.AppSettings.Get("ykcgprice");
            kqcprice = ConfigurationSettings.AppSettings.Get("kqchoprice");

            if (!IsPostBack)
            {
                catid = ConvertUtility.ToInt32(Request.QueryString["catid"]);
                lang  = ConvertUtility.ToInt32(Request.QueryString["lang"]);
                DataSet ds = ThethaoController.GetAll_CompetitionRelationInfo(catid);
                if (lang == 1)
                {
                    ltrGia.Text        = "(" + Resources.Resource.wThongBaoGia + "Tư vấn " + ConfigurationSettings.AppSettings.Get("tipprice") + Resources.Resource.wDonViTien + ", Thống kê " + ConfigurationSettings.AppSettings.Get("ykcgprice") + Resources.Resource.wDonViTien + ", KQ chờ " + ConfigurationSettings.AppSettings.Get("kqchoprice") + Resources.Resource.wDonViTien + ")";
                    ltrLichthidau.Text = "KẾT QUẢ THI ĐẤU";
                    lnkTheThao.Text    = "BÓNG ĐÁ";
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        lblCompetitonName.Text = ds.Tables[0].Rows[0]["NameUnicode"].ToString();
                    }
                    if (ConvertUtility.ToString(ds.Tables[3].Rows[0]["Name"].ToString()) != "")
                    {
                        ltrRoundName.Text = " - " + UnicodeUtility.UnicodeToKoDau(ds.Tables[3].Rows[0]["Name"].ToString());
                    }
                }
                else
                {
                    ltrGia.Text        = "(" + Resources.Resource.wThongBaoGia_KD + "Tu van " + ConfigurationSettings.AppSettings.Get("tipprice") + Resources.Resource.wDonViTien_KD + ", Thong ke " + ConfigurationSettings.AppSettings.Get("ykcgprice") + Resources.Resource.wDonViTien_KD + ", KQ cho " + ConfigurationSettings.AppSettings.Get("kqchoprice") + Resources.Resource.wDonViTien_KD + ")";
                    ltrLichthidau.Text = "KET QUA THI DAU";
                    lnkTheThao.Text    = "BONG DA";
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        lblCompetitonName.Text = ds.Tables[0].Rows[0]["Name"].ToString();
                    }

                    if (ConvertUtility.ToString(ds.Tables[3].Rows[0]["Name"].ToString()) != "")
                    {
                        ltrRoundName.Text = " - " + UnicodeUtility.UnicodeToKoDau(ds.Tables[3].Rows[0]["Name"].ToString());
                    }
                }
                lnkTheThao.NavigateUrl = UrlProcess.GetSportHomeUrlNew(lang.ToString(), "home", width);
                //Get ra danh sach tran dau
                if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
                {
                    curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
                }

                int       totalrecord = 0;
                DataTable dtlst       = ThethaoController.GetAllGameByCompetitionID_KQ(catid, pagesize, curpage, out totalrecord);
                rptLichThiDau.DataSource     = dtlst;
                rptLichThiDau.ItemDataBound += rptlist_ItemDataBound;;
                rptLichThiDau.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"];
                Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&cpage=";
            }
        }
Example #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = ConfigurationSettings.AppSettings.Get("xssoicauprice");
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetXosoHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >XỔ SỐ<a>";
            linkStr_KD = "<a href=\"../" + UrlProcess.GetXosoHomeUrl(lang, width.ToString()).Replace("~/", "") + "\" >XO SO<a>";

            if (Session["serviceList"] != null)
            {
                _arrService = Session["serviceList"] as string[];
            }

            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\" />";

                #region Free Content

                if (AppEnv.GetSetting("FreeContent") == "1")
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                #endregion

                #region OLD

                DataTable soicau = XosoController.GetSoicauInfoBycompanyID(id);

                if (_arrService != null)
                {
                    if (_arrService.Length > 0)
                    {
                        string dkXoSo = string.Format(AppEnv.GetSetting("S2DK_SC"), soicau.Rows[0]["MainCode"]);
                        foreach (var item in _arrService)
                        {
                            if (item == dkXoSo)
                            {
                                pnlS2DangKy.Visible = false;
                            }
                        }
                    }
                }

                // Nếu có transactionid_old >> thuê bao mobifone đã thực hiện thanh toán
                if (Session["transactionid_old"] != null)
                {
                    messageReturn = ConvertUtility.ToString(Session["debit_status"]);
                    if (ConvertUtility.ToString(Session["debit_status"]) == "0")
                    {// 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(false, true);
                    }
                    Session["transactionid_old"] = null;
                }
                else
                {
                    if (telCo == Constant.T_Mobifone)
                    {
                        string content = Session["cpid"].ToString() + "&" + Constant.xoso + "x10" + 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("xssoicode") + " " + soicau.Rows[0]["MainCode"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("xssoicaucommandcode") + "</b> để nhận dự đoán kết quả xổ số" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("xssoicode") + " " + soicau.Rows[0]["MainCode"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("xssoicaucommandcode") + "</b> de nhan du doan ket qua xo so" + 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 + "dịch vụ soi cầu " + soicau.Rows[0]["ProvinceName"].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 + "dich vu soi cau " + soicau.Rows[0]["ProvinceName"].ToString();
                        //    btnCo.Text = Resources.Resource.btnCo_KD;
                        //    btnKhong.Text = Resources.Resource.btnKhong_KD;
                        //}
                        pnlThongBao.Visible = false;
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new Library.VNMCharging.VNMChargingGW();

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

                            //messageReturn = charging.PaymentVNM(Session["msisdn"].ToString(), "LOTOSOICAU", "SOICAU");

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

                            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(false, true);
                            }
                            break;
                        }
                    }
                }

                #endregion
            }
        }
        protected void HienThiNoiDung(Boolean cuphapDung, Boolean thanhToan)
        {
            pnlYeuCau.Visible  = false;
            pnlNoiDung.Visible = true;
            chitietGiaodich   += " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            lblTen.Text        = txtMaTruong.Text.Trim();
            if (cuphapDung)
            {
                if (thanhToan)
                {
                    if (lang == "1")
                    {
                        ltrNoiDung.Text = noiDung;
                    }
                    else
                    {
                        ltrNoiDung.Text = noiDung;
                    }
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), "0", chitietGiaodich, 17);
                }
                else
                {
                    //Thông báo lỗi thanh toán
                    if (lang == "1")
                    {
                        ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                    }
                    else
                    {
                        ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                    }
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), "0", chitietGiaodich, 17, messageReturn);
                }
            }
            else
            {
                if (lang == "1")
                {
                    ltrNoiDung.Text = noiDung;
                }
                else
                {
                    ltrNoiDung.Text = UnicodeUtility.UnicodeToKoDau(noiDung);
                }
                Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), "0", chitietGiaodich, 17, messageReturn);
                //--Thông báo lỗi thanh toán
            }
            //log charging
            ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());

            logger.Debug("--------------------------------------------------");
            logger.Debug("MSISDN:" + Session["msisdn"].ToString());
            logger.Debug("Diem thi: TiLeChoi - parameter: " + price + " - " + txtMaTruong.Text.Trim());
            logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
            logger.Debug("Error:" + messageReturn);
            logger.Debug("Current Url:" + Request.RawUrl);
            //end log
        }
Example #26
0
        protected void HienThiNoiDung(Boolean thuchien, Boolean log)
        {
            pnlNoiDung.Visible = true;
            gameid             = Request.QueryString["id"];//ThethaoController.GetSport_GameDetailBySportID(ConvertUtility.ToInt32(Request.QueryString["id"])).Rows[0]["PK_Game_ID"].ToString();
            DataTable tip             = ThethaoController.GetDetail_Tip_ByGameID(gameid);
            string    chitietGiaodich = string.Empty;

            if (thuchien)
            {
                if (lang == "1")
                {
                    ltrTieuDe.Text = "BÓNG ĐÁ";
                    lblTen.Text    = "Tư vấn";
                }
                else
                {
                    ltrTieuDe.Text = "BONG DA";
                    lblTen.Text    = "Tu van";
                };
                if (tip.Rows.Count > 0)
                {
                    //chitietGiaodich = "Tư vấn trận đấu: " + tip.Rows[0]["Team_Name1"].ToString() + " - " + tip.Rows[0]["Team_Name2"].ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                    chitietGiaodich = "Tư vấn trận đấu: " + tip.Rows[0]["Team_Name1"] + " - " + tip.Rows[0]["Team_Name2"];

                    if (lang == "1")
                    {
                        ltrNoiDung.Text = tip.Rows[0]["Tip_Content"].ToString();
                    }
                    else
                    {
                        ltrNoiDung.Text = UnicodeUtility.UnicodeToKoDau(tip.Rows[0]["Tip_Content"].ToString());
                    }
                    chitietGiaodich = chitietGiaodich + "\r\n" + ltrNoiDung.Text;
                    if (log)
                    {
                        Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), gameid, chitietGiaodich, 7);
                    }
                }
            }
            else
            {
                chitietGiaodich = "Tư vấn trận đấu: " + gameid + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    ltrTieuDe.Text  = Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    ltrTieuDe.Text  = Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                if (log)
                {
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), gameid, chitietGiaodich, 7, messageReturn);
                }
                //--Thông báo lỗi thanh toán
            }
            if (log)
            {
                //log charging
                ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug("Dich vu: Tu van (TIP) " + gameid);
                logger.Debug("Chi tiet: " + chitietGiaodich);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
        protected void btnAddNew_Click(object sender, EventArgs e)
        {
            var          dirAvatarOriginal = AppEnv.UploadImagesOriginalDir;
            const string dirAvatarNormal   = AppEnv.UploadImagesNormalDir;
            const string dirAvatarThumb    = AppEnv.UploadImagesThumbDir;
            var          imgWidth          = 0;
            var          imgHeight         = 0;
            double       filesize          = 0;

            string fileAvatarPath = "", newfileAvatarName = "";
            var    info = new ImageInfo();

            var imageCount = ContentImageDB.GetQuantityImageOfContent(_contentId);

            if (txtFile.PostedFile.FileName.Length > 0)
            {
                //string fileAvatarName = Path.GetFileNameWithoutExtension(txtFile.PostedFile.FileName).Replace(" ", "_").Replace("#", "_");
                newfileAvatarName = "image_" + _contentId + "_" + imageCount + txtFile.PostedFile.FileName.Substring(txtFile.PostedFile.FileName.LastIndexOf('.'));

                var file4 = new FileInfo(Server.MapPath(AppEnv.UploadImagesNormalDir) + newfileAvatarName);
                if (file4.Exists)
                {
                    newfileAvatarName = "image_" + _contentId + "_" + imageCount + "_" + DateTime.Now.ToString("mmss") + txtFile.PostedFile.FileName.Substring(txtFile.PostedFile.FileName.LastIndexOf('.'));
                }
                txtFile.PostedFile.SaveAs(Server.MapPath(dirAvatarOriginal) + newfileAvatarName);
                double filesizeb = txtFile.PostedFile.ContentLength;
                filesize = filesizeb / 1024;

                //thumbnail creation starts
                //                try
                //                {
                // dinh dang width height mac dinh de scale
                int    smallWidth   = ConvertUtility.ToInt32(AppEnv.ThumbWidth);;
                int    smallHeight  = ConvertUtility.ToInt32(AppEnv.ThumbHeight);
                int    normalWidth  = ConvertUtility.ToInt32(AppEnv.NormalWidth);
                int    normalHeight = ConvertUtility.ToInt32(AppEnv.NormalHeight);
                double scalesmall   = 0;
                double scalenormal  = 0;

                string imageUrl = Server.MapPath(dirAvatarOriginal + newfileAvatarName); // xac dinh anh chuan bi thumbnail

                Bitmap InputBitmap = new Bitmap(imageUrl);                               // tao anh bitmap

                // xac dinh % de resize
                imgWidth  = InputBitmap.Width;
                imgHeight = InputBitmap.Height;
                if (smallHeight == 0)//InputBitmap.Height < InputBitmap.Width)
                {
                    scalesmall  = ((double)smallWidth) / InputBitmap.Width;
                    scalenormal = ((double)normalWidth) / InputBitmap.Width;
                }

                int newSmallWidth   = 0;
                int newSmallHeight  = 0;
                int newNormalWidth  = 0;
                int newNormalHeight = 0;
                if (smallHeight == 0)
                {
                    newSmallWidth  = (int)(scalesmall * InputBitmap.Width);
                    newSmallHeight = (int)(scalesmall * InputBitmap.Height);

                    if (normalWidth < imgWidth)
                    {
                        newNormalWidth  = (int)(scalenormal * InputBitmap.Width);
                        newNormalHeight = (int)(scalenormal * InputBitmap.Height);
                    }
                    else
                    {
                        newNormalWidth  = imgWidth;
                        newNormalHeight = imgHeight;
                    }
                }
                else
                {
                    newSmallWidth   = smallWidth;
                    newSmallHeight  = smallHeight;
                    newNormalWidth  = normalWidth;
                    newNormalHeight = normalHeight;
                }

                Bitmap OutputBitmapSmall  = new Bitmap(InputBitmap, newSmallWidth, newSmallHeight);   // tao anh bitmap voi size small moi
                Bitmap OutputBitmapNormal = new Bitmap(InputBitmap, newNormalWidth, newNormalHeight); // tao anh bitmap voi size normal moi

                // xac dinh mime type
                //Response.Clear();
                //Response.ContentType="image/Jpeg";

                //moi
                ImageCodecInfo[]  Info   = ImageCodecInfo.GetImageEncoders();
                EncoderParameters Params = new EncoderParameters(1);
                Params.Param[0] = new EncoderParameter(Encoder.Quality, 100L);
                //Response.ContentType = Info[1].MimeType;
                //thumbnail.Save(Response.OutputStream,Info[1],Params);
                InputBitmap.Dispose();

                OutputBitmapSmall.Save(Server.MapPath(dirAvatarThumb) + newfileAvatarName, Info[1], Params);
                OutputBitmapNormal.Save(Server.MapPath(dirAvatarNormal) + newfileAvatarName, Info[1], Params);

                // thuc hien
                OutputBitmapSmall.Dispose();
                OutputBitmapNormal.Dispose();

                //				}
                //				catch(Exception ex)
                //				{
                //					Response.Write("An error occurred - " + ex.ToString());
                //				}

                //MultimediaUtility.SetThumbnail(Server.MapPath(dirLarge + newfileoutsidename), Server.MapPath(dirThumb), ConvertUtility.ToInt32(Constants.ThumbWidth), ConvertUtility.ToInt32(Constants.ThumbHeight));
                //ImageDB.CreateThumbnail(dirThumb, dirLarge + newfileoutsidename);


                fileAvatarPath = dirAvatarThumb + newfileAvatarName;
                //fileAvatarPath = dirAvatarOriginal + newfileAvatarName;

                //MultimediaUtility.SetAvatarThumbnail(Server.MapPath(fileAvatarPath), 250, 0);
            }
            else
            {
                fileAvatarPath = "";
            }


            if (fileAvatarPath.Length > 0)
            {
                if (txtName.Text.Length > 0)
                {
                    info.Image_Name = ConvertUtility.ToString(txtName.Text);
                }
                else
                {
                    info.Image_Name = newfileAvatarName;
                }
                info.Image_Description = txtTeaser.Text;
                info.Image_File        = fileAvatarPath;
                info.Image_CreateDate  = DateTime.Now;
                info.Image_FileSize    = ConvertUtility.ToDouble(filesize.ToString("#0.00"));
                info.Image_Width       = imgWidth;
                info.Image_Height      = imgHeight;
                info.Image_View        = 0;
                info.User_ID           = ConvertUtility.ToInt32(ckid);
                info.Image_Visible     = chkVisible.Checked;

                try
                {
                    var imgId = ImageDB.Insert(info);

                    var contentImgInfo = new ContentImageInfo();
                    contentImgInfo.Content_ID = _contentId;
                    contentImgInfo.Image_ID   = imgId;
                    if (imageCount == 0)
                    {
                        contentImgInfo.IsCover = true;
                    }
                    else
                    {
                        contentImgInfo.IsCover = false;
                    }
                    contentImgInfo.Priority = imageCount;

                    ContentImageDB.Insert(contentImgInfo);

                    Response.Redirect(Request.RawUrl + "#idTab2");

                    lblStatusUpdate.Text = lblStatusUpdate2.Text = MiscUtility.UPDATE_SUCCESS;
                }
                catch
                {
                    lblStatusUpdate.Text = lblStatusUpdate2.Text = MiscUtility.UPDATE_ERROR;
                }
            }
        }
Example #28
0
        protected void HienThiNoiDung(Boolean cuphapDung, Boolean thanhToan)
        {
            pnlYeuCau.Visible  = false;
            pnlNoiDung.Visible = true;
            chitietGiaodich   += "Dap ap: -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            lblTen.Text        = txtMaKhoi.Text.Trim() + " " + txtMaMon.Text.Trim() + " " + txtMaDe.Text.Trim();
            if (cuphapDung)
            {
                if (thanhToan)
                {
                    ltrNoiDung.Text = noiDung;
                    Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), "0", chitietGiaodich, 17);
                    if (noiDung == "Hiện chưa có đáp án đề thi. Hệ thống sẽ gửi đáp án cho ban ngay khi có.")
                    {
                        //Luu MT waiting -
                        mtWaittingInfo              = new MTWaittingInfo();
                        mtWaittingInfo.User_ID      = Session["msisdn"].ToString();
                        mtWaittingInfo.Service_ID   = "8579";
                        mtWaittingInfo.Command_Code = "DAN";
                        mtWaittingInfo.Message      = "DAN " + lblTen.Text;
                        mtWaittingInfo.Request_ID   = DateTime.Now.ToString("ddHHmmss");
                        mtWaittingInfo.ServiceType  = 488;
                        //Not necessary
                        mtWaittingInfo.Message_Type  = 0;
                        mtWaittingInfo.Total_Message = 1;
                        mtWaittingInfo.Message_Index = 0;
                        mtWaittingInfo.IsMore        = 1;
                        mtWaittingInfo.Content_Type  = 0;
                        mtWaittingInfo.UniqueId      = string.Concat(txtMaKhoi.Text.Trim() + "_" + txtMaMon.Text.Trim() + "_" + txtMaDe.Text.Trim());
                        mtWaittingInfo.PartnerID     = "";
                        mtWaittingInfo.ExpiredDate   = DateTime.Now;
                        MTController.SMS_MTWaittingInsert(mtWaittingInfo);
                    }
                }
                else
                {
                    //Thông báo lỗi thanh toán
                    if (lang == "1")
                    {
                        ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                    }
                    else
                    {
                        ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                    }
                    Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), "0", chitietGiaodich, 17, messageReturn);
                }
            }
            else
            {
                if (lang == "1")
                {
                    ltrNoiDung.Text = noiDung;
                }
                else
                {
                    ltrNoiDung.Text = UnicodeUtility.UnicodeToKoDau(noiDung);
                }
                Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), "0", chitietGiaodich, 17, messageReturn);
                //--Thông báo lỗi thanh toán
            }
            //log charging
            ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());

            logger.Debug("--------------------------------------------------");
            logger.Debug("MSISDN:" + Session["msisdn"].ToString());
            logger.Debug("Diem thi: DT_DapAn - parameter: " + price + " - " + " " + lblTen.Text);
            logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
            logger.Debug("Error:" + messageReturn);
            logger.Debug("Current Url:" + Request.RawUrl);
            //end log
        }
Example #29
0
 protected void btnKhong_Click(object sender, EventArgs e)
 {
     Response.Redirect(ConvertUtility.ToString(Session["LastPage"]));
 }
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;
            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(AppEnv.CheckSessionTelco(), id);

            if (thuchien)
            {
                if (lang == "1")
                {
                    //ltrTieuDe.Text = linkStr;
                    lblTen.Text      = dtDetail.Rows[0]["WTitle_Unicode"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeTai;
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong + " hình nền " + dtDetail.Rows[0]["WTitle_Unicode"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ")";
                }
                else
                {
                    //ltrTieuDe.Text = linkStr_KD;
                    lblTen.Text      = dtDetail.Rows[0]["WTitle"].ToString();
                    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                    ltrNoiDung.Text  = Resources.Resource.wMuaThanhCong_KD + " hình nền " + dtDetail.Rows[0]["WTitle"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ")";
                }
                lnkDownload.NavigateUrl = UrlProcess.GetDownloadItem(AppEnv.CheckSessionTelco(), "1", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));
                if (ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]) == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
                {
                    if (isLog)
                    {
                        chitietGiaodich = "Thu phap: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                        Transaction.Success(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 15);
                    }
                }
                else
                {
                    if (isLog)
                    {
                        chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                        Transaction.Success(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 1);
                    }
                }
                //if(isLog)
                //{
                HinhNenController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
                //}
            }
            else
            {
                //Thông báo lỗi thanh toán
                if (lang == "1")
                {
                    //ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan;
                }
                else
                {
                    //ltrTieuDe.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                }
                if (ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]) == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid")))
                {
                    chitietGiaodich = "Thu phap: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                    if (isLog)
                    {
                        Transaction.Failure(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 15, messageReturn);
                    }
                }
                else
                {
                    chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
                    if (isLog)
                    {
                        Transaction.Failure(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 1, messageReturn);
                    }
                }
                //--Thông báo lỗi thanh toán
            }

            if (isLog)
            {
                //log charging
                ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug("Dich vu: Hinh nen - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["WTitle"].ToString() + " - id: " + id);
                logger.Debug("Wallpaper Url:" + lnkDownload.NavigateUrl);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }