Exemple #1
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     Response.Redirect(AppEnv.AdminUrlParams("usermanager"));
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("ringtoneprice");
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            telCo = AppEnv.CheckSessionTelco();
            if (!IsPostBack)
            {
                //if (width == 0)
                //    width = (int)Constant.DefaultScreen.Standard;
                //ltrWidth.Text = "<meta content=\"width=" + width + "; 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 dtDetail = MusicController.GetItemDetailHasCache(telCo, id);
                if (dtDetail != null && dtDetail.Rows.Count > 0)
                {
                    chitietGiaodich = "Nhac: " + dtDetail.Rows[0]["SongName"] + " -- id:" + id;
                }
                //Miễn phí
                if (id == 2843)
                {
                    free = true;
                    HienThiNoiDung(true, false);
                    return;
                }
                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    //if (lang == "1")
                    //{
                    ltrHuongdan.Text = Resources.Resource.wHuongDan;
                    ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("ringtonecode") + " " + dtDetail.Rows[0]["Code"] + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("ringtonecommandcode") + "</b> để tải bản nhạc <b>" + dtDetail.Rows[0]["SongNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    //}
                    //else
                    //{
                    //    ltrHuongdan.Text = Resources.Resource.wHuongDan_KD;
                    //    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("ringtonecode") + " " + dtDetail.Rows[0]["Code"] + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("ringtonecommandcode") + "</b> de tai ban nhac <b>" + dtDetail.Rows[0]["SongName"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                    //}
                }
                else
                {
                    pnlThongBao.Visible = false;
                    try
                    {
                        switch (Session["telco"].ToString())
                        {
                        case "Vietnamobile":
                            var charging = new Library.VNMCharging.VNMChargingGW();

                            messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "MUSICDOWNLOAD", "MUSIC_DOWN", price, "D", "TT", chitietGiaodich);

                            if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))    //Not Enough Money
                            {
                                messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "MUSICDOWNLOAD", "MUSIC_DOWN", price, "D", "TT", chitietGiaodich, out logPrice);
                                price         = logPrice;
                            }

                            if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                            {
                                messageReturn = AppEnv.VnmChargingSystemOverload(Session["msisdn"].ToString(), "MUSICDOWNLOAD", "MUSIC_DOWN", price, "D", "TT", chitietGiaodich);
                            }

                            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;
                        }
                    }
                    catch (Exception ex)
                    {
                        ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                        logger.Debug("----------Lỗi charging----------------------");
                        logger.Debug(string.Format("MSISDN:{0}", Session["msisdn"]));
                        logger.Debug(ex.ToString());
                        logger.Debug("----------Lỗi charging----------------------");
                    }
                }

                #endregion
            }
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            zoneCurrent = ZoneUtility.GetZoneCurrent();

            zoneHome = ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneHome + AppEnv.GetLanguageFrontEnd()));

            rptData.DataSource = ZoneDB.GetZoneVisbleInMainNav();
            rptData.DataBind();
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session["msisdn"] == null)
                {
                    int    is3g   = 0;
                    string msisdn = MobileUtils.GetMSISDN(out is3g);
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["telco"]  = Constant.T_Vietnamobile;
                        Session["msisdn"] = msisdn;
                        ltrXinChao.Text   = "Xin chào <b>" + msisdn + "</b>";
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                        ltrXinChao.Text   = "Xin chào <b>khách</b>";
                    }
                }
                else
                {
                    ltrXinChao.Text = "Xin chào <b>" + Session["msisdn"] + "</b>";
                }

                #region Xử lý ĐẶT GẠCH

                string message   = string.Empty;
                string serviceId = "8379";
                madichvu = Request.QueryString["t"];
                madichvu = madichvu.ToUpper();

                string regisChannel = "WAP";
                if (madichvu == "GACH1")
                {
                    regisChannel = "VMG1";
                }
                else if (madichvu == "GACH2")
                {
                    regisChannel = "VMG2";
                }
                else if (madichvu == "GACH3")
                {
                    regisChannel = "VMG3";
                }

                madichvu = madichvu.Replace("1", "").Replace("2", "").Replace("3", "");

                if (!string.IsNullOrEmpty(madichvu))
                {
                    madichvu = madichvu.ToUpper().Trim();

                    if (Session["msisdn"] != null)
                    {
                        price = "5000";
                        string messageReturn;

                        var charging = new Library.VNMCharging.VNMChargingGW();
                        messageReturn = charging.NavigatePaymentVnm(Session["msisdn"].ToString(), "VIDEOGIFT", "VIDEO_GIFT", price, "D", "VID", "Vote " + madichvu);

                        if (messageReturn == AppEnv.GetSetting("NotEnoughMoney"))//Not Enough Money
                        {
                            messageReturn = AppEnv.VnmChargingOptimizeNotEnoughMoney(Session["msisdn"].ToString(), "VIDEOGIFT", "VIDEO_GIFT", price, "D", "VID", "Vote " + madichvu, out logPrice);
                            price         = logPrice;
                        }

                        if (messageReturn == "1")//Charged Thanh Cong
                        {
                            #region DK USER

                            var entity = new VoteRegisteredInfo();
                            entity.User_ID              = Session["msisdn"].ToString();
                            entity.Request_ID           = "0";
                            entity.Service_ID           = serviceId;
                            entity.Command_Code         = madichvu;
                            entity.Service_Type         = 1;
                            entity.Charging_Count       = 0;
                            entity.FailedChargingTime   = 0;
                            entity.RegisteredTime       = DateTime.Now;
                            entity.ExpiredTime          = DateTime.Now.AddDays(1);
                            entity.Registration_Channel = regisChannel;
                            entity.Status     = 1;
                            entity.Operator   = "vnmobile";
                            entity.Vote_Count = 1;

                            entity.Vote_PersonId    = 1;
                            entity.IsDislike        = 0;
                            entity.Dislike_Count    = 1;
                            entity.Dislike_PersonId = 0;
                            DataTable dt = WapController.SecretRegisterInsert(entity);

                            if (dt.Rows[0]["RETURN_ID"].ToString() == "0")//DK DICH VU LAN DAU
                            {
                                litThongBao.Text = "Chúc mừng bạn đã đăng ký thành công Gameshow 'BÍ MẬT ĐỘNG TRỜI CỦA MAI THỎ'.<br /> Hãy đặt gạch càng nhiều để có cơ hội hẹn hò và biết bí mật đằng sau của Mai Thỏ là gì.<br /> Chi tiết truy cập http://wap.vietnamobile.com.vn. HT: 19001255";
                            }
                            else if (dt.Rows[0]["RETURN_ID"].ToString() == "1")
                            {
                                DataTable dtVoteInfo = WapController.SecretGetCountByPersonId(Session["msisdn"].ToString(), 1);
                                litThongBao.Text = "Bạn đã ĐẶT GẠCH thành công cho : " + dtVoteInfo.Rows[0]["Name"] + ".<br /> Số lượt GẠCH của bạn : " + dtVoteInfo.Rows[0]["Count"] + "<br /> Bạn đang thuộc top : " + dtVoteInfo.Rows[0]["Top"] + " những người ĐẶT GẠCH nhiều nhất <br /> ĐẶT GẠCH càng nhiều bạn càng có cơ hội hẹn hò và biết bí mật đằng sau của Mai Thỏ là gì.<br /> Chi tiết truy cập: http://wap.vietnamobile.com.vn. HT: 19001255";
                            }

                            #endregion
                        }
                        else
                        {
                            litThongBao.Text = lang == "1" ? "Đăng ký không thành công. Vui lòng thử loại hoặc tài khoản không đủ tiền" : "Dang ky khong thanh cong. Vui long thu lai hoac tai khoan khong du tien";
                        }

                        #region Log Doanh Thu

                        var eLog = new VoteChargedUserLogInfo();

                        eLog.User_ID              = Session["msisdn"].ToString();
                        eLog.Request_ID           = "0";
                        eLog.Service_ID           = serviceId;
                        eLog.Command_Code         = madichvu;
                        eLog.Service_Type         = 1;
                        eLog.Charging_Count       = 0;
                        eLog.FailedChargingTime   = 0;
                        eLog.RegisteredTime       = DateTime.Now;
                        eLog.ExpiredTime          = DateTime.Now.AddDays(1);
                        eLog.Registration_Channel = regisChannel;
                        eLog.Status   = 1;
                        eLog.Operator = "vnmobile";

                        if (messageReturn == "1")
                        {
                            eLog.Reason = "Succ";
                        }
                        else
                        {
                            eLog.Reason = messageReturn;
                        }

                        eLog.Price         = ConvertUtility.ToInt32(price);
                        eLog.Vote_PersonId = 1;

                        WapController.SecretChargedUserLogInsert(eLog);

                        #endregion
                    }
                    else
                    {
                        if (madichvu == "GACH")
                        {
                            message          = "Hệ thống không xác định được số điện thoại của bạn.<br /> Vui lòng truy cập bằng 3G/GPRS<br /> Hoặc soạn tin: " + madichvu + " gửi " + serviceId;
                            litThongBao.Text = message;
                        }
                        else
                        {
                            message =
                                "Hệ thống không xác định được số điện thoại của bạn.<br /> Vui lòng truy cập bằng 3G/GPRS";
                            litThongBao.Text = message;
                        }
                    }
                }


                #endregion

                DataSet dsMt = WapController.SecretGetTopUserVote(1);

                if (dsMt != null && dsMt.Tables[0].Rows.Count > 0)
                {
                    rptMaiTho.DataSource = dsMt.Tables[0];
                    rptMaiTho.DataBind();
                    lblMtUnLike.Text = dsMt.Tables[1].Rows[0]["Like"].ToString();

                    rptLinhMiu.DataSource = dsMt.Tables[0];
                    rptLinhMiu.DataBind();
                    lblLmUnLike.Text = dsMt.Tables[1].Rows[0]["Like"].ToString();
                }

                #region FACEBOOK Comment

                string url = AppEnv.GetSetting("WapDefault") + Request.RawUrl;

                ltCommentFB.Text = "<div class=\"fb-comments\" data-mobile=\"false\" data-href='" + url + "' data-width=\"320\" data-num-posts=\"5\"></div>";

                string Facebook_raw_data = get_web_content("http://api.facebook.com/restserver.php?method=links.getStats&urls=" + url);

                XmlDocument dom = new XmlDocument();
                dom.LoadXml(Facebook_raw_data);

                #endregion
            }
        }
Exemple #5
0
        protected void btnLich_Click(object sender, EventArgs e)
        {
            string idDotDanhGia = Request.QueryString["idDotDanhGia"];

            Response.Redirect(AppEnv.AdminUrlParams("kehoachthang_nhanvien") + "&idDotDanhGia=" + idDotDanhGia + "&idNhanVien=" + CurrentUser.UserID);
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //if (AppEnv.GetSetting("TestFlag") == "1")
                //{
                //    Session["telco"] = Constant.T_Vietnamobile;
                //    Session["msisdn"] = "84929004805";
                //    Msisdn = Session["msisdn"].ToString();
                //}

                if (Session["msisdn"] == null)
                {
                    int    is3g   = 0;
                    string msisdn = MobileUtils.GetMSISDN(out is3g);
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["telco"]  = Constant.T_Vietnamobile;
                        Session["msisdn"] = msisdn;
                        ltrXinChao.Text   = "Xin chào <b>" + msisdn + "</b>";
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                        ltrXinChao.Text   = "Xin chào <b>khách</b>";
                    }
                }

                DataSet dsMt = WapController.GetTopUserVote(1);
                DataSet dsLm = WapController.GetTopUserVote(2);

                //DataTable dtMt = WapController.GetTopUserVote(1);
                //DataTable dtLm = WapController.GetTopUserVote(2);

                if (dsMt != null && dsMt.Tables[0].Rows.Count > 0)
                {
                    rptMaiTho.DataSource = dsMt.Tables[0];
                    rptMaiTho.DataBind();

                    lblMtLike.Text   = dsMt.Tables[1].Rows[0]["Like"].ToString();
                    lblMtUnLike.Text = dsMt.Tables[2].Rows[0]["UnLike"].ToString();
                }

                if (dsLm != null && dsLm.Tables[0].Rows.Count > 0)
                {
                    rptLinhMiu.DataSource = dsLm.Tables[0];
                    rptLinhMiu.DataBind();

                    lblLmLike.Text   = dsLm.Tables[1].Rows[0]["Like"].ToString();
                    lblLmUnLike.Text = dsLm.Tables[2].Rows[0]["UnLike"].ToString();
                }

                #region FACEBOOK Comment

                string url = AppEnv.GetSetting("WapDefault") + Request.RawUrl;

                ltCommentFB.Text = "<div class=\"fb-comments\" data-mobile=\"false\" data-href='" + url + "' data-width=\"320\" data-num-posts=\"5\"></div>";

                string Facebook_raw_data = get_web_content("http://api.facebook.com/restserver.php?method=links.getStats&urls=" + url);

                XmlDocument dom = new XmlDocument();
                dom.LoadXml(Facebook_raw_data);

                #endregion
            }
        }
Exemple #7
0
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog, string gamePrice)
        {
            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() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            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
                {
                    //VMGGame.MOReceiver urlservice = new VMGGame.MOReceiver();

                    //url = urlservice.VMG_ReturnUrlForGame(ConvertUtility.ToString(dtDetail.Rows[0]["GID"]),
                    //                                        0,
                    //                                        ConvertUtility.ToString(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,
                                                       ConvertUtility.ToString(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);
                }
                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;
                //}
                if (isLog)
                {
                    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)
            {
                if (isLog)
                {
                    //log charging
                    ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                    logger.Debug("--------------------------------------------------");
                    logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                    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
                }
            }
        }
Exemple #8
0
        protected override void OnPreRender(EventArgs e)
        {
            if (CurrentUser.IsSuperAdmin || CurrentUser.IsAdmin)
            {
                this.Visible = true;
            }
            else
            {
                DataTable dt = CommandController.GetRoleForUserByPortalID(CurrentUser.UserID, ConvertUtility.ToInt32(AppEnv.PortalId()));

                if (dt.Rows.Count > 0)
                {
                    if (dt.Rows.Count > 1)
                    {
                        pmsRoleWap  = ConvertUtility.ToBoolean(dt.Rows[0]["UseForWap"]);
                        pmsRoleWap1 = ConvertUtility.ToBoolean(dt.Rows[1]["UseForWap"]);

                        if (!pmsRoleWap && !pmsRoleWap1)
                        {
                            this.Visible = false;
                        }
                        else
                        {
                            this.Visible = true;
                        }
                    }
                    else
                    {
                        pmsRoleWap = ConvertUtility.ToBoolean(dt.Rows[0]["UseForWap"]);
                        if (!pmsRoleWap)
                        {
                            this.Visible = false;
                        }
                        else
                        {
                            this.Visible = true;
                        }
                    }
                }
                else
                {
                    this.Visible = false;
                }
            }
        }
    public int Execute(int jobID)
    {
        WebServiceCharging3g webServiceCharging3G = new WebServiceCharging3g();
        string userName = "******";
        string userPass = "******";
        string cpId     = "1930";
        string price;

        try
        {
            DataTable dtUsers = ViSport_S2_Registered_UsersController.GetSportGameUserByTypeTp(false);
            if (dtUsers != null && dtUsers.Rows.Count > 0)
            {
                string message        = string.Empty;
                string returnValue    = string.Empty;
                string notEnoughMoney = AppEnv.GetSetting("NotEnoughMoney");

                string serviceType = "Charge Hero";
                string serviceName = "ViSport_Hero";
                string reasonLog   = string.Empty;

                int count = 0;

                for (int i = 0; i < dtUsers.Rows.Count; i++)
                {
                    if (count >= 3)
                    {
                        Thread.Sleep(1000);
                        count = 0;
                    }

                    try
                    {
                        string msisdn = dtUsers.Rows[i]["User_ID"].ToString();

                        #region TIEN HANH CHARGED

                        price       = "5000";
                        returnValue = webServiceCharging3G.PaymentVnmWithAccount(dtUsers.Rows[i]["User_ID"].ToString(), price, "Charged Sub Trieu phu bong da ", "Trieuphu_Sub", userName, userPass, cpId);
                        if (returnValue.Trim() == notEnoughMoney)
                        {
                            price       = "3000";
                            returnValue = webServiceCharging3G.PaymentVnmWithAccount(dtUsers.Rows[i]["User_ID"].ToString(), price, "Charged Sub Trieu phu bong da", "Trieuphu_Sub", userName, userPass, cpId);
                            if (returnValue.Trim() == notEnoughMoney)
                            {
                                price       = "2000";
                                returnValue = webServiceCharging3G.PaymentVnmWithAccount(dtUsers.Rows[i]["User_ID"].ToString(), price, "Charged Sub Trieu phu bong da", "Trieuphu_Sub", userName, userPass, cpId);
                                if (returnValue.Trim() == notEnoughMoney)
                                {
                                    price       = "1000";
                                    returnValue = webServiceCharging3G.PaymentVnmWithAccount(dtUsers.Rows[i]["User_ID"].ToString(), price, "Charged Sub Trieu phu bong da", "Trieuphu_Sub", userName, userPass, cpId);
                                }
                            }
                        }

                        if (returnValue == "1")
                        {
                            #region Sinh MDT

                            string code1 = RandomActiveCode.Generate(8);
                            string code2 = RandomActiveCode.Generate(8);
                            ViSport_S2_Registered_UsersController.SportGameHeroLotteryCodeInsert(msisdn, code1);
                            ViSport_S2_Registered_UsersController.SportGameHeroLotteryCodeInsert(msisdn, code2);

                            #endregion

                            #region LOG DOANH THU

                            var logInfo = new SportGameHeroChargedUserLogInfo();

                            logInfo.ID           = ConvertUtility.ToInt32(dtUsers.Rows[i]["ID"].ToString());
                            logInfo.User_ID      = dtUsers.Rows[i]["User_ID"].ToString();
                            logInfo.Request_ID   = dtUsers.Rows[i]["Request_ID"].ToString();
                            logInfo.Service_ID   = dtUsers.Rows[i]["Service_ID"].ToString();
                            logInfo.Command_Code = dtUsers.Rows[i]["Command_Code"].ToString();

                            logInfo.Service_Type       = ConvertUtility.ToInt32(dtUsers.Rows[i]["Service_Type"].ToString());
                            logInfo.Charging_Count     = ConvertUtility.ToInt32(dtUsers.Rows[i]["Charging_Count"].ToString());
                            logInfo.FailedChargingTime = ConvertUtility.ToInt32(dtUsers.Rows[i]["FailedChargingTimes"].ToString());

                            logInfo.RegisteredTime = ConvertUtility.ToDateTime(dtUsers.Rows[i]["RegisteredTime"].ToString());
                            logInfo.ExpiredTime    = DateTime.Now.AddDays(1);

                            logInfo.Registration_Channel = dtUsers.Rows[i]["Registration_Channel"].ToString();
                            logInfo.Status   = ConvertUtility.ToInt32(dtUsers.Rows[i]["Status"].ToString());
                            logInfo.Operator = dtUsers.Rows[i]["Operator"].ToString();
                            logInfo.Price    = ConvertUtility.ToInt32(price);
                            logInfo.Reason   = "Succ";

                            ViSport_S2_Registered_UsersController.InsertSportGameHeroChargedUserLogForSub(logInfo);

                            #endregion
                        }
                        else
                        {
                            #region LOG DOANH THU

                            var logInfo = new SportGameHeroChargedUserLogInfo();

                            logInfo.ID           = ConvertUtility.ToInt32(dtUsers.Rows[i]["ID"].ToString());
                            logInfo.User_ID      = dtUsers.Rows[i]["User_ID"].ToString();
                            logInfo.Request_ID   = dtUsers.Rows[i]["Request_ID"].ToString();
                            logInfo.Service_ID   = dtUsers.Rows[i]["Service_ID"].ToString();
                            logInfo.Command_Code = dtUsers.Rows[i]["Command_Code"].ToString();

                            logInfo.Service_Type       = ConvertUtility.ToInt32(dtUsers.Rows[i]["Service_Type"].ToString());
                            logInfo.Charging_Count     = ConvertUtility.ToInt32(dtUsers.Rows[i]["Charging_Count"].ToString());
                            logInfo.FailedChargingTime = ConvertUtility.ToInt32(dtUsers.Rows[i]["FailedChargingTimes"].ToString());

                            logInfo.RegisteredTime = ConvertUtility.ToDateTime(dtUsers.Rows[i]["RegisteredTime"].ToString());
                            logInfo.ExpiredTime    = DateTime.Now.AddDays(1);

                            logInfo.Registration_Channel = dtUsers.Rows[i]["Registration_Channel"].ToString();
                            logInfo.Status   = ConvertUtility.ToInt32(dtUsers.Rows[i]["Status"].ToString());
                            logInfo.Operator = dtUsers.Rows[i]["Operator"].ToString();
                            logInfo.Price    = ConvertUtility.ToInt32(price);
                            logInfo.Reason   = returnValue;

                            ViSport_S2_Registered_UsersController.InsertSportGameHeroChargedUserLogForSub(logInfo);

                            #endregion
                        }

                        if (returnValue == "1")//CHARGED THANH CONG
                        {
                            string today = DateTime.Now.DayOfWeek.ToString();

                            string serviceId   = dtUsers.Rows[i]["Service_ID"].ToString();
                            string commandCode = dtUsers.Rows[i]["Command_Code"].ToString();
                            string requestId   = dtUsers.Rows[i]["Request_ID"].ToString();

                            if (CheckDayOfWeek(today)) //Tra MT vao cac ngay 3,5,7
                            {
                                #region SEND MT THONG_TIN_TRAN_DAU

                                DataTable dtMtFootball = ViSport_S2_Registered_UsersController.SportGameHeroMatchGetByDay();
                                if (dtMtFootball != null && dtMtFootball.Rows.Count > 0)
                                {
                                    string teamA = UnicodeUtility.UnicodeToKoDau(dtMtFootball.Rows[0]["Team_A_Name"].ToString());
                                    string teamB = UnicodeUtility.UnicodeToKoDau(dtMtFootball.Rows[0]["Team_B_Name"].ToString());

                                    string message1 = "Tran dau du doan ngay hom nay la: " + teamA + " va " + teamB + ". De du doan " + teamA + " thang soan KQ 1, du doan " + teamB + " thang soan KQ 3, du doan 2 doi hoa soan KQ 2 gui 979";
                                    SendMtSportGame(dtUsers.Rows[i]["User_ID"].ToString(), message1, serviceId, commandCode, requestId); //MT1

                                    string message2 = "De du doan tong so ban thang soan BT G gui 979 (voi G la tong so ban thang 2 doi ghi trong thoi gian thi dau chinh thuc)";
                                    SendMtSportGame(dtUsers.Rows[i]["User_ID"].ToString(), message2, serviceId, commandCode, requestId); //MT2

                                    string message3 = "De du doan ti so trong thoi gian chinh thuc soan TS A B gui 979 trong do A la so ban thang doi " + teamA + " ghi duoc, B la so ban thang doi " + teamB + " ghi duoc.";
                                    SendMtSportGame(dtUsers.Rows[i]["User_ID"].ToString(), message3, serviceId, commandCode, requestId); //MT3

                                    string message4 = "De du doan " + teamA + " co ti le giu bong nhieu hon soan GB 1, du doan " + teamB + " co ti le giu bong nhieu hon soan GB 3, hai doi co ti le giu bong ngang nhau soan GB 2 gui 979";
                                    SendMtSportGame(dtUsers.Rows[i]["User_ID"].ToString(), message4, serviceId, commandCode, requestId); //MT4

                                    string message5 = "De du doan tong so the vang soan TV C gui 979 trong do C la tong so the vang trong tai rut ra cho 2 doi trong thoi gian thi dau chinh thuc ";
                                    SendMtSportGame(dtUsers.Rows[i]["User_ID"].ToString(), message5, serviceId, commandCode, requestId); //MT5
                                }


                                #endregion
                            }
                            else //Tra Cau hoi vao cac ngay 2,4,6,CN
                            {
                                #region SEND MT CAU_HOI_BONG_DA

                                //SEND MT CHO KHACH HANG

                                DataTable dtQuestion = ViSport_S2_Registered_UsersController.GetQuestionInfoSportGameHero();
                                if (dtQuestion != null && dtQuestion.Rows.Count > 0)
                                {
                                    message = dtQuestion.Rows[0]["Question"].ToString();
                                    message = message.Replace("P1", "1").Replace("P2", "2");

                                    int    questionIdnew = ConvertUtility.ToInt32(dtQuestion.Rows[0]["Id"].ToString());
                                    string answer        = dtQuestion.Rows[0]["Answer"].ToString();
                                    answer = answer.Replace("P1", "1").Replace("P2", "2");

                                    ViSport_S2_Registered_UsersController.InsertSportGameHeroAnswerLog(dtUsers.Rows[i]["User_ID"].ToString(), questionIdnew, message, answer, DateTime.Now, 0); // LUU LOG Question
                                    SendMtSportGame(dtUsers.Rows[i]["User_ID"].ToString(), message, serviceId, commandCode, requestId);
                                }

                                //END SEND MT CHO KHACH HANG

                                #endregion
                            }
                        }

                        #endregion

                        count = count + 1;
                    }
                    catch (Exception ex)
                    {
                        log.Error("Trieu phu bong da Loi charged : " + ex);
                    }
                }
            }

            return(1);
        }
        catch (Exception ex)
        {
            log.Error("Trieu phu bong da Loi lay tap User : " + ex);
            return(0);
        }
    }
Exemple #10
0
        protected void butSearch_Click(object sender, EventArgs e)
        {
            var dotuoi = dropFilterDoTuoi.SelectedValue;
            var monhoc = dropFilterMonHoc.SelectedValue;
            var coso   = dropFilterCoso.SelectedValue;

            Response.Redirect(UrlFilter.BuildUrlByZoneID(ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneClassRegister + AppEnv.GetLanguageFrontEnd()))) + "&dt=" + dotuoi + "&mh=" + monhoc + "&cs=" + coso, true);
        }
Exemple #11
0
    public int Execute(int jobID)
    {
        WebServiceCharging3g webServiceCharging3G = new WebServiceCharging3g();
        string userName = "******";
        string userPass = "******";
        string cpId     = "1930";
        string price;

        try
        {
            DataTable dtUsers = ViSport_S2_Registered_UsersController.GetSportGameHeroUserInfo("841864925596");
            if (dtUsers != null && dtUsers.Rows.Count > 0)
            {
                string message        = string.Empty;
                string returnValue    = string.Empty;
                string notEnoughMoney = AppEnv.GetSetting("NotEnoughMoney");

                string serviceType = "Charge Hero";
                string serviceName = "ViSport_Hero";
                string reasonLog   = string.Empty;

                for (int i = 0; i < dtUsers.Rows.Count; i++)
                {
                    try
                    {
                        #region TIEN HANH CHARGED

                        price       = "5000";
                        returnValue = webServiceCharging3G.PaymentVnmWithAccount(dtUsers.Rows[i]["User_ID"].ToString(), price, "Charged Sub Anh Tai", "Anh_Tai_Sub", userName, userPass, cpId);
                        if (returnValue == "1")
                        {
                            #region LOG DOANH THU

                            var logInfo = new SportGameHeroChargedUserLogInfo();

                            logInfo.ID           = ConvertUtility.ToInt32(dtUsers.Rows[i]["ID"].ToString());
                            logInfo.User_ID      = dtUsers.Rows[i]["User_ID"].ToString();
                            logInfo.Request_ID   = dtUsers.Rows[i]["Request_ID"].ToString();
                            logInfo.Service_ID   = dtUsers.Rows[i]["Service_ID"].ToString();
                            logInfo.Command_Code = dtUsers.Rows[i]["Command_Code"].ToString();

                            logInfo.Service_Type       = ConvertUtility.ToInt32(dtUsers.Rows[i]["Service_Type"].ToString());
                            logInfo.Charging_Count     = ConvertUtility.ToInt32(dtUsers.Rows[i]["Charging_Count"].ToString());
                            logInfo.FailedChargingTime = ConvertUtility.ToInt32(dtUsers.Rows[i]["FailedChargingTimes"].ToString());

                            logInfo.RegisteredTime = ConvertUtility.ToDateTime(dtUsers.Rows[i]["RegisteredTime"].ToString());
                            logInfo.ExpiredTime    = DateTime.Now.AddDays(1);

                            logInfo.Registration_Channel = dtUsers.Rows[i]["Registration_Channel"].ToString();
                            logInfo.Status   = ConvertUtility.ToInt32(dtUsers.Rows[i]["Status"].ToString());
                            logInfo.Operator = dtUsers.Rows[i]["Operator"].ToString();
                            logInfo.Price    = ConvertUtility.ToInt32(price);
                            logInfo.Reason   = "Succ";

                            ViSport_S2_Registered_UsersController.InsertSportGameHeroChargedUserLogForSub(logInfo);

                            #endregion

                            returnValue = webServiceCharging3G.PaymentVnmWithAccount(dtUsers.Rows[i]["User_ID"].ToString(), price, "Charged Sub Anh Tai", "Anh_Tai_Sub", userName, userPass, cpId);

                            if (returnValue == "1")
                            {
                                #region LOG DOANH THU

                                var logInfo1 = new SportGameHeroChargedUserLogInfo();

                                logInfo1.ID           = ConvertUtility.ToInt32(dtUsers.Rows[i]["ID"].ToString());
                                logInfo1.User_ID      = dtUsers.Rows[i]["User_ID"].ToString();
                                logInfo1.Request_ID   = dtUsers.Rows[i]["Request_ID"].ToString();
                                logInfo1.Service_ID   = dtUsers.Rows[i]["Service_ID"].ToString();
                                logInfo1.Command_Code = dtUsers.Rows[i]["Command_Code"].ToString();

                                logInfo1.Service_Type       = ConvertUtility.ToInt32(dtUsers.Rows[i]["Service_Type"].ToString());
                                logInfo1.Charging_Count     = ConvertUtility.ToInt32(dtUsers.Rows[i]["Charging_Count"].ToString());
                                logInfo1.FailedChargingTime = ConvertUtility.ToInt32(dtUsers.Rows[i]["FailedChargingTimes"].ToString());

                                logInfo1.RegisteredTime = ConvertUtility.ToDateTime(dtUsers.Rows[i]["RegisteredTime"].ToString());
                                logInfo1.ExpiredTime    = DateTime.Now.AddDays(1);

                                logInfo1.Registration_Channel = dtUsers.Rows[i]["Registration_Channel"].ToString();
                                logInfo1.Status   = ConvertUtility.ToInt32(dtUsers.Rows[i]["Status"].ToString());
                                logInfo1.Operator = dtUsers.Rows[i]["Operator"].ToString();
                                logInfo1.Price    = ConvertUtility.ToInt32(price);
                                logInfo1.Reason   = "Succ";

                                ViSport_S2_Registered_UsersController.InsertSportGameHeroChargedUserLogForSub(logInfo1);

                                #endregion

                                returnValue = webServiceCharging3G.PaymentVnmWithAccount(dtUsers.Rows[i]["User_ID"].ToString(), price, "Charged Sub Anh Tai", "Anh_Tai_Sub", userName, userPass, cpId);

                                if (returnValue == "1")
                                {
                                    #region LOG DOANH THU

                                    var logInfo2 = new SportGameHeroChargedUserLogInfo();

                                    logInfo2.ID           = ConvertUtility.ToInt32(dtUsers.Rows[i]["ID"].ToString());
                                    logInfo2.User_ID      = dtUsers.Rows[i]["User_ID"].ToString();
                                    logInfo2.Request_ID   = dtUsers.Rows[i]["Request_ID"].ToString();
                                    logInfo2.Service_ID   = dtUsers.Rows[i]["Service_ID"].ToString();
                                    logInfo2.Command_Code = dtUsers.Rows[i]["Command_Code"].ToString();

                                    logInfo2.Service_Type       = ConvertUtility.ToInt32(dtUsers.Rows[i]["Service_Type"].ToString());
                                    logInfo2.Charging_Count     = ConvertUtility.ToInt32(dtUsers.Rows[i]["Charging_Count"].ToString());
                                    logInfo2.FailedChargingTime = ConvertUtility.ToInt32(dtUsers.Rows[i]["FailedChargingTimes"].ToString());

                                    logInfo2.RegisteredTime = ConvertUtility.ToDateTime(dtUsers.Rows[i]["RegisteredTime"].ToString());
                                    logInfo2.ExpiredTime    = DateTime.Now.AddDays(1);

                                    logInfo2.Registration_Channel = dtUsers.Rows[i]["Registration_Channel"].ToString();
                                    logInfo2.Status   = ConvertUtility.ToInt32(dtUsers.Rows[i]["Status"].ToString());
                                    logInfo2.Operator = dtUsers.Rows[i]["Operator"].ToString();
                                    logInfo2.Price    = ConvertUtility.ToInt32(price);
                                    logInfo2.Reason   = "Succ";

                                    ViSport_S2_Registered_UsersController.InsertSportGameHeroChargedUserLogForSub(logInfo2);

                                    #endregion
                                }
                            }
                        }


                        if (returnValue != "1")
                        {
                            #region LOG DOANH THU

                            var logInfo = new SportGameHeroChargedUserLogInfo();

                            logInfo.ID           = ConvertUtility.ToInt32(dtUsers.Rows[i]["ID"].ToString());
                            logInfo.User_ID      = dtUsers.Rows[i]["User_ID"].ToString();
                            logInfo.Request_ID   = dtUsers.Rows[i]["Request_ID"].ToString();
                            logInfo.Service_ID   = dtUsers.Rows[i]["Service_ID"].ToString();
                            logInfo.Command_Code = dtUsers.Rows[i]["Command_Code"].ToString();

                            logInfo.Service_Type       = ConvertUtility.ToInt32(dtUsers.Rows[i]["Service_Type"].ToString());
                            logInfo.Charging_Count     = ConvertUtility.ToInt32(dtUsers.Rows[i]["Charging_Count"].ToString());
                            logInfo.FailedChargingTime = ConvertUtility.ToInt32(dtUsers.Rows[i]["FailedChargingTimes"].ToString());

                            logInfo.RegisteredTime = ConvertUtility.ToDateTime(dtUsers.Rows[i]["RegisteredTime"].ToString());
                            logInfo.ExpiredTime    = DateTime.Now.AddDays(1);

                            logInfo.Registration_Channel = dtUsers.Rows[i]["Registration_Channel"].ToString();
                            logInfo.Status   = ConvertUtility.ToInt32(dtUsers.Rows[i]["Status"].ToString());
                            logInfo.Operator = dtUsers.Rows[i]["Operator"].ToString();
                            logInfo.Price    = ConvertUtility.ToInt32(price);
                            logInfo.Reason   = returnValue;

                            ViSport_S2_Registered_UsersController.InsertSportGameHeroChargedUserLogForSub(logInfo);

                            #endregion
                        }

                        if (returnValue == "1")//CHARGED THANH CONG
                        {
                            //reasonLog = "Succ";

                            //SEND MT CHO KHACH HANG

                            //DataTable dtQuestion = ViSport_S2_Registered_UsersController.GetQuestionInfoSportGameHero();
                            //if (dtQuestion != null && dtQuestion.Rows.Count > 0)
                            //{
                            message = "Ban da duoc cong 960 diem cho game show Anh tai bong da.Soan DIEM gui 979 de xem so diem hien tai.";



                            string serviceId   = dtUsers.Rows[i]["Service_ID"].ToString();
                            string commandCode = dtUsers.Rows[i]["Command_Code"].ToString();
                            string requestId   = dtUsers.Rows[i]["Request_ID"].ToString();


                            SendMtSportGame(dtUsers.Rows[i]["User_ID"].ToString(), message, serviceId, commandCode, requestId);

                            //}

                            //END SEND MT CHO KHACH HANG
                        }
                        //else
                        //{
                        //    reasonLog = returnValue;
                        //}


                        #endregion
                    }
                    catch (Exception ex)
                    {
                        log.Error("Anh tai bong da Loi charged : " + ex);
                        continue;
                    }
                    //DataTable dt = new DataTable();
                    //dt = ViSport_S2_Registered_UsersController.SportGameHeroCheckUserChargedByDay(dtUsers.Rows[i]["User_ID"].ToString());
                    //if (dt.Rows[0]["RETURN_ID"].ToString().Trim() == "0")
                    //{

                    //}
                }
            }

            return(1);
        }
        catch (Exception ex)
        {
            log.Error("Anh tai bong da Loi lay tap User : " + ex);
            return(0);
        }
    }
 protected void btnAddControl_Click(object sender, EventArgs e)
 {
     Response.Redirect(AppEnv.AdminUrlParams("modulecon") + "&mid=" + ConvertUtility.ToInt32(txtID.Text));
 }
        protected void HienThiNoiDung(Boolean thuchien, Boolean log)
        {
            //pnlNoiDung.Visible = true;

            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = TintucController.GetNewsDetail(id);

            catID = ConvertUtility.ToInt32(dtDetail.Rows[0]["Distribution_ZoneID"]);
            DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(catID);

            if (thuchien)
            {
                //if (lang == "1")
                //{
                //ltrTieuDe.Text = linkStr + " » " + "THƯ GIÃN";
                lblItemName.Text = dtDetail.Rows[0]["Content_Headline"].ToString();
                if (dtDetail.Rows.Count > 0)
                {
                    litContent.Text = dtDetail.Rows[0]["Content_Body"].ToString().Replace("href=\"Upload", "href=\"" + AppEnv.GetSetting("urldata") + "/Upload");
                }
                //}
                if (log)
                {
                    Transaction.Success(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 13);
                }
            }
            else
            {
                //Thông báo lỗi thanh toán
                //if (lang == "1")
                //{
                //ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao;
                litContent.Text = Resources.Resource.wThongBaoLoiThanhToan;
                //}
                //else
                //{
                //    ltrTieuDe.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD;
                //    ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD;
                //}
                //--Thông báo lỗi thanh toán
                if (log)
                {
                    Transaction.Failure(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 13, messageReturn);
                }
            }
            if (log)
            {
                //log charging
                ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString());
                logger.Debug("--------------------------------------------------");
                logger.Debug("MSISDN:" + Session["msisdn"].ToString());
                logger.Debug("Dich vu: Thu gian - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["Content_HeadlineKD"].ToString() + " - id: " + id);
                logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                logger.Debug("Error:" + messageReturn);
                logger.Debug("Current Url:" + Request.RawUrl);
                //end log
            }
        }
        protected void btnCo_Click(object sender, EventArgs e)
        {
            if (AppEnv.GetSetting("S2Test") == "1")
            {
                pnlSMS.Visible      = false;
                pnlThongBao.Visible = false;

                pnlNoiDung.Visible = true;

                ltrNoiDung.Text = lang == "1" ? "Bạn đã đăng ký thành công dịch vụ " + GetName(madichvu) + ". Kết quả sẽ được gửi đến điện thoại của bạn hàng tuần ngay sau khi trận đấu kết thúc. <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY KQ " + madichvu + " </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                            : "Ban da dang ky thanh cong dich vu " + UnicodeUtility.UnicodeToKoDau(GetName(madichvu)) + ". Ket qua se duoc gui den dien thoai cua ban hang tuan ngay sau khi tran dau ket thuc. <br/> De huy dich vu vui long soan: <b> HUY KQ " + madichvu + " </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
            }
            else
            {
                string shortCode   = AppEnv.GetSetting("S2ShortCode");   //223
                string requestId   = AppEnv.GetSetting("S2RequestID");
                string commandCode = AppEnv.GetSetting("S2Commandcode"); //DK
                string message     = "DK KQ " + madichvu;
                string msisdn      = Session["msisdn"].ToString();

                string   reResult  = AppEnv.RegisterService(shortCode, requestId, msisdn, commandCode, message);
                string[] arrResult = reResult.Split('|');

                if (arrResult.Length > 0)
                {
                    if (arrResult[0] == "1")
                    {
                        pnlSMS.Visible      = false;
                        pnlThongBao.Visible = false;

                        pnlNoiDung.Visible = true;

                        ltrNoiDung.Text = lang == "1" ? "Bạn đã đăng ký thành công dịch vụ " + GetName(madichvu) + ". Kết quả sẽ được gửi đến điện thoại của bạn hàng tuần ngay sau khi trận đấu kết thúc. <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY KQ " + madichvu + " </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                             : "Ban da dang ky thanh cong dich vu " + UnicodeUtility.UnicodeToKoDau(GetName(madichvu)) + ". Ket qua se duoc gui den dien thoai cua ban hang tuan ngay sau khi tran dau ket thuc. <br/> De huy dich vu vui long soan: <b> HUY KQ " + madichvu + " </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
                    }
                    else
                    {
                        pnlThongBao.Visible = false;
                        pnlSMS.Visible      = false;

                        pnlNoiDung.Visible = true;

                        ltrNoiDung.Text = lang == "1" ? "Đăng ký không thành công. Vui lòng thử lại" : "Dang ky khong thanh cong. Vui long thu lai";
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int       totalrecord = 0;
                DataTable dtVideo     = Library.Component.Video.VideoController.GetAllVideoByCategoryAndDisplayType(AppEnv.CheckSessionTelco(), 31, 0, (int)Constant.Video.Category, 10, 1, out totalrecord);
                if (dtVideo != null && dtVideo.Rows.Count > 0)
                {
                    IList <DataRow> contentTop  = dtVideo.Select().Skip(0).Take(1).ToList();
                    IList <DataRow> contentList = dtVideo.Select().Skip(2).Take(5).ToList();
                    if (contentTop.Count > 0)
                    {
                        rptVideoTop.DataSource = contentTop.CopyToDataTable();
                        rptVideoTop.DataBind();
                    }

                    if (contentList.Count > 0)
                    {
                        rptVideoList.DataSource = contentList.CopyToDataTable();
                        rptVideoList.DataBind();
                    }
                }

                DataTable dtAlbum = MusicController.GetAlbumHotHasCache(AppEnv.CheckSessionTelco());
                if (dtAlbum != null && dtAlbum.Rows.Count > 0)
                {
                    IList <DataRow> albumlbum = dtAlbum.Select().Skip(0).Take(6).ToList();
                    rptAlbum.DataSource = albumlbum.CopyToDataTable();
                    rptAlbum.DataBind();
                }
            }
        }
Exemple #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);

            if (!Page.IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                if (Session["msisdn"] != null)
                {
                    string value = AppEnv.GetRegisterService(Session["msisdn"].ToString(), AppEnv.GetSetting("S2DK_Game"));
                    if (value == "1")
                    {
                        pnlSMS.Visible = true;
                        if (lang == "1")
                        {
                            ltrHuongdan.Text = "GAME HOT";
                            ltrSMS.Text      =
                                "Bạn đã là thuê bao của dịch vụ Game HOT tuần. Xin cảm ơn <br/> Để hủy dịch vụ vui lòng SOẠN TIN : <b> HUY GAME </b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                        }
                        else
                        {
                            ltrHuongdan.Text = "GAME HOT";
                            ltrSMS.Text      =
                                "Ban da la thue bao cua dich vu GAME HOT tuan. Xin cam on <br/> De huy dich vu vui long SOAN TIN : <b> HUY GAME </b> gui <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                        }
                    }
                    else
                    {
                        if (AppEnv.GetSetting("94x_Confirm_Flag") == "1")
                        {
                            #region Confirm

                            pnlThongBao.Visible = true;
                            if (lang == "1")
                            {
                                ltrThongBao.Text        = "Xác Nhận";
                                ltrThongBaoNoiDung.Text =
                                    "Bạn có đồng ý đăng ký dịch vụ Game Hot của Vietnamobile hay không (miễn phí đăng ký) ?";
                            }
                            else
                            {
                                ltrThongBao.Text        = "Xac Nhan";
                                ltrThongBaoNoiDung.Text =
                                    "Ban co dong y dang ky dich vu Game Hot cua Vietnamobile hay khong (mien phi dang ky) ?";
                            }

                            #endregion
                        }
                        else
                        {
                            #region Non Confirm

                            if (AppEnv.GetSetting("S2Test") == "1")
                            {
                                pnlSMS.Visible      = false;
                                pnlThongBao.Visible = false;

                                pnlNoiDung.Visible = true;

                                ltrNoiDung.Text = lang == "1" ? "Bạn đã đăng ký thành công. Game HOT sẽ được gửi đến điện thoại của bạn vào 15h thứ 2 và thứ 4 hàng tuần. <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY GAME </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                                            : "Ban da dang ky thanh cong. Game HOT se duoc gui den dien thoai cua ban vao 15h thu 2 va thu 4 hang tuan. <br/> De huy dich vu vui long soan: <b> HUY GAME </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
                            }
                            else
                            {
                                string shortCode   = AppEnv.GetSetting("S2ShortCode");   //223
                                string requestId   = AppEnv.GetSetting("S2RequestID");
                                string commandCode = AppEnv.GetSetting("S2Commandcode"); //DK
                                string message     = AppEnv.GetSetting("S2DK_Game");
                                string msisdn      = Session["msisdn"].ToString();

                                string   reResult  = AppEnv.RegisterService(shortCode, requestId, msisdn, commandCode, message);
                                string[] arrResult = reResult.Split('|');

                                if (arrResult.Length > 0)
                                {
                                    if (arrResult[0] == "1")
                                    {
                                        pnlSMS.Visible      = false;
                                        pnlThongBao.Visible = false;

                                        pnlNoiDung.Visible = true;

                                        ltrNoiDung.Text = lang == "1" ? "Bạn đã đăng ký thành công. Game HOT sẽ được gửi đến điện thoại của bạn vào 15h thứ 2 và thứ 4 hàng tuần. <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY GAME </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                                                    : "Ban da dang ky thanh cong. Game HOT se duoc gui den dien thoai cua ban vao 15h thu 2 va thu 4 hang tuan. <br/> De huy dich vu vui long soan: <b> HUY GAME </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
                                    }
                                    else
                                    {
                                        pnlThongBao.Visible = false;
                                        pnlSMS.Visible      = false;

                                        pnlNoiDung.Visible = true;

                                        ltrNoiDung.Text = lang == "1" ? "Đăng ký không thành công. Vui lòng thử lại" : "Dang ky khong thanh cong. Vui long thu lai";
                                    }
                                }
                            }

                            #endregion
                        }
                    }
                }
                else
                {
                    pnlSMS.Visible = true;
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = "Thông Báo";
                        ltrSMS.Text      = "Hệ thống không xác định được số điện thoại của bạn. Vui lòng truy cập bằng 3G/GPRS hoặc soạn tin: DK GAME gửi " + AppEnv.GetSetting("S2ShortCode") + " (miễn phí đăng ký)";
                    }
                    else
                    {
                        ltrHuongdan.Text = "Thong Bao";
                        ltrSMS.Text      = "He thong khong xac dinh duoc so dien thoai cua ban. Vui long truy cap bang 3G/GPRS hoac soan tin DK GAME gui " + AppEnv.GetSetting("S2ShortCode") + " (mien phi dang ky)";
                    }
                }
            }
        }
Exemple #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            preurl = ConfigurationSettings.AppSettings.Get("urldata");
            width  = Request.QueryString["w"];
            lang   = ConvertUtility.ToInt32(Request.QueryString["lang"]);
            hotro  = ConvertUtility.ToInt32(Request.QueryString["hotro"]);
            catID  = ConvertUtility.ToInt32(Request.QueryString["catid"]);

            if (catID == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("freecate")))
            {
                freecate = true;
            }
            _info = Get_User_Agent_Info();
            if (!IsPostBack)
            {
                DataTable catInfo = PhanmemController.GetCategoryByCatIDHasCache(catID);

                string price = AppEnv.GetSetting("appprice");
                if (catID == 1)
                {
                    price = "1000";
                }

                if (lang == 1)
                {
                    litGia.Text         = "	(Giá: " + price + " đ/phần mềm) ";
                    lnkCateChannel.Text = catInfo.Rows[0]["Title_Unicode"].ToString().ToUpper();
                    lnkHomeChannel.Text = "PHẦN MỀM";
                }
                else
                {
                    litGia.Text         = "	(Gia: " + price + " d/phan mem) ";
                    lnkCateChannel.Text = catInfo.Rows[0]["Title"].ToString().ToUpper();
                }
                lnkCateChannel.NavigateUrl = UrlProcess.GetAppCategoryUrlNew(lang.ToString(), width, catID.ToString(), hotro.ToString());
                lnkHomeChannel.NavigateUrl = UrlProcess.GetAppHomeUrlNew(lang.ToString(), width, hotro.ToString());
            }
            if (!string.IsNullOrEmpty(Request.QueryString["cpage"]))
            {
                curpage = ConvertUtility.ToInt32(Request.QueryString["cpage"]);
            }
            //start category list
            int totalrecord = 0;

            if (hotro == 1)
            {
                lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=1", "hotro=0").Replace("cpage=" + curpage, "cpage=1");
                rptlstCategory.DataSource = PhanmemController.GetAllAppByCateTypeAndAgent(Session["telco"].ToString(), catID, (int)Constant.APP.Category, _info, pagesize, curpage, out totalrecord);
            }
            else
            {
                lnkValidModel.NavigateUrl = Request.RawUrl.Replace("hotro=0", "hotro=1").Replace("cpage=" + curpage, "cpage=1");;
                rptlstCategory.DataSource = PhanmemController.GetAllAppByCategoryAndDisplayTypeHasCache(Session["telco"].ToString(), catID, (int)Constant.APP.Category, pagesize, curpage, out totalrecord);
            }

            rptlstCategory.ItemDataBound += rptlstCategory_ItemDataBound;
            rptlstCategory.DataBind();
            Paging1.totalrecord  = totalrecord;
            Paging1.pagesize     = pagesize;
            Paging1.numberpage   = pagenumber;
            Paging1.defaultparam = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"];
            Paging1.queryparam   = "?lang=" + Request.QueryString["lang"] + "&display=" + Request.QueryString["display"] + "&w=" + Request.QueryString["w"] + "&catid=" + Request.QueryString["catid"] + "&hotro=" + Request.QueryString["hotro"] + "&cpage=";
            //end category list
            if (lang == 1)
            {
                if (hotro == 0)
                {
                    lnkValidModel.Text = "Chỉ hiển thị những phần mềm hỗ trợ";
                }
                else
                {
                    lnkValidModel.Text = "Hiển thị tất cả các phần mềm";
                }
            }
            else
            if (hotro == 0)
            {
                lnkValidModel.Text = "Chi hien thi nhung phan mem ho tro";
            }
            else
            {
                lnkValidModel.Text = "Hien thi tat ca cac phan mem";
            }
            lnkValidModel.Text = "<span class=\"orange\">" + lnkValidModel.Text + "</span>";
        }
Exemple #18
0
        protected void btnCo_Click(object sender, EventArgs e)
        {
            if (AppEnv.GetSetting("S2Test") == "1")
            {
                pnlSMS.Visible      = false;
                pnlThongBao.Visible = false;

                pnlNoiDung.Visible = true;

                ltrNoiDung.Text = lang == "1" ? "Bạn đã đăng ký thành công. Game HOT sẽ được gửi đến điện thoại của bạn vào 15h thứ 2 và thứ 4 hàng tuần. <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY GAME </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                            : "Ban da dang ky thanh cong. Game HOT se duoc gui den dien thoai cua ban vao 15h thu 2 va thu 4 hang tuan. <br/> De huy dich vu vui long soan: <b> HUY GAME </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
            }
            else
            {
                string shortCode   = AppEnv.GetSetting("S2ShortCode");   //223
                string requestId   = AppEnv.GetSetting("S2RequestID");
                string commandCode = AppEnv.GetSetting("S2Commandcode"); //DK
                string message     = AppEnv.GetSetting("S2DK_Game");
                string msisdn      = Session["msisdn"].ToString();

                string   reResult  = AppEnv.RegisterService(shortCode, requestId, msisdn, commandCode, message);
                string[] arrResult = reResult.Split('|');

                if (arrResult.Length > 0)
                {
                    if (arrResult[0] == "1")
                    {
                        pnlSMS.Visible      = false;
                        pnlThongBao.Visible = false;

                        pnlNoiDung.Visible = true;

                        ltrNoiDung.Text = lang == "1" ? "Bạn đã đăng ký thành công. Game HOT sẽ được gửi đến điện thoại của bạn vào 15h thứ 2 và thứ 4 hàng tuần. <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY GAME </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                                    : "Ban da dang ky thanh cong. Game HOT se duoc gui den dien thoai cua ban vao 15h thu 2 va thu 4 hang tuan. <br/> De huy dich vu vui long soan: <b> HUY GAME </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
                    }
                    else
                    {
                        pnlThongBao.Visible = false;
                        pnlSMS.Visible      = false;

                        pnlNoiDung.Visible = true;

                        ltrNoiDung.Text = lang == "1" ? "Đăng ký không thành công. Vui lòng thử lại" : "Dang ky khong thanh cong. Vui long thu lai";
                    }
                }
            }
        }
Exemple #19
0
        //private static string preurl;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int totalrecord = 0;

                //Tải nhiều nhất
                DataTable dtHottest = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 3, -1, (int)Constant.Video.Topdownload, pagesize, curpage, out totalrecord);
                if (dtHottest != null && dtHottest.Rows.Count > 0)
                {
                    rptTaiNhieuNhat.DataSource = dtHottest;
                    rptTaiNhieuNhat.DataBind();
                }

                //Mới nhất
                DataTable dtLatest = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 1, -1, (int)Constant.Video.Lastest, pagesize, tpage, out totalrecord);
                if (dtLatest != null && dtLatest.Rows.Count > 0)
                {
                    rptMoiCapNhat.DataSource = dtLatest;
                    rptMoiCapNhat.DataBind();
                }

                //Nong Trong ngay
                DataTable dtNong = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 4, -1, (int)Constant.Video.Category, pagesize, curpage, out totalrecord);
                if (dtNong != null && dtNong.Rows.Count > 0)
                {
                    rptNongTrongNgay.DataSource = dtNong;
                    rptNongTrongNgay.DataBind();
                }

                //Shock
                DataTable dtShock = VideoController.GetAllVideoByCategoryAndDisplayTypeHasCache(AppEnv.CheckSessionTelco(), 21, -1, (int)Constant.Video.Category, pagesize, curpage, out totalrecord);
                if (dtShock != null && dtShock.Rows.Count > 0)
                {
                    rptShock.DataSource = dtShock;
                    rptShock.DataBind();
                }
            }
        }
Exemple #20
0
        protected void rptZoneList_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemIndex < 0)
            {
                return;
            }
            string   curData         = (string)e.Item.DataItem;
            Label    lblCatetoryName = (Label)e.Item.FindControl("lblCatetoryName");
            Repeater rptCategory     = (Repeater)e.Item.FindControl("rptCategory");
            Panel    pnlDangKy       = (Panel)e.Item.FindControl("pnlDangKy");
            Literal  litContent      = (Literal)e.Item.FindControl("litContent");

            string url     = string.Empty;
            string display = string.Empty;
            ////Sửa bỏi Bình Trần - 25/11/2016
            //if (curData == "118") //TRUYEN CUOI
            //{
            //    pnlDangKy.Visible = true;
            //    url = "/ThuGian/Cuoi.aspx?lang=" + lang + "&w=" + width;
            //    display = "Trải nghiệm Truyện Cười cực HOT";
            //}
            //else if(curData == "268") //DIA DIEM AN CHOI
            //{
            //    pnlDangKy.Visible = true;
            //    url = "/ThuGian/AnChoi.aspx?lang=" + lang + "&w=" + width;
            //    display = "Trải nghiệm Địa điểm Ăn chơi cực HOT";
            //}
            //else if(curData == "258") //CAM NANG TU VAN
            //{
            //    pnlDangKy.Visible = true;
            //    url = "/ThuGian/Sex.aspx?lang=" + lang + "&w=" + width;
            //    display = "Trải nghiệm dịch vụ SEX và Cuộc Sống cực HOT";
            //}
            //else if(curData == "255") //DOC TRUYEN
            //{
            //    pnlDangKy.Visible = true;
            //    url = "/ThuGian/DocTruyen.aspx?lang=" + lang + "&w=" + width;
            //    display = "Trải nghiệm dịch vụ Đọc Truyện cực HOT";
            //}
            //else if(curData == "375")//CUNG HOANG DAO
            //{
            //    pnlDangKy.Visible = true;
            //    url = "/ThuGian/CungHoangDao.aspx?lang=" + lang + "&w=" + width;
            //    display = "Trải nghiệm dịch vụ Cung hoàng đạo cực HOT";
            //}

            string content = " <a class=\"link-non-orange\" href=\"" + url + "\"><span class=\"orange bold\"> " + AppEnv.CheckLang(display) + " </span></a>";

            litContent.Text = content;

            DataTable catInfo = TintucController.GetCategoryByCatIDHasCache(ConvertUtility.ToInt32(curData));

            if (lang == 1)
            {
                lblCatetoryName.Text = catInfo.Rows[0]["Zone_Name"].ToString().ToUpper();
            }
            else
            {
                lblCatetoryName.Text = catInfo.Rows[0]["Zone_Alias"].ToString().ToUpper();
            }

            DataTable dt = TintucController.GetAllCategoryExeptCatIDHasCache(ConvertUtility.ToInt32(curData), catid);

            rptCategory.DataSource     = dt;
            rptCategory.ItemDataBound += rptCategory_ItemDataBound;
            rptCategory.DataBind();
        }
Exemple #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            price = ConfigurationSettings.AppSettings.Get("gameprice");
            lang  = Request.QueryString["lang"];
            hotro = Request.QueryString["hotro"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            id    = ConvertUtility.ToInt32(Request.QueryString["id"]);
            if (id == 1402 || id == 1401)
            {
                price = "15000";
            }

            telCo = AppEnv.CheckSessionTelcoUndefine();

            linkStr = "<a href=\"" + UrlProcess.GameHome() + "\" >GAME</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

                DataTable dtDetail = GameController.GetGameDetailByID(AppEnv.CheckSessionTelco(), id);
                if (dtDetail != null && dtDetail.Rows.Count > 0)
                {
                    string webName = dtDetail.Rows[0]["Web_Name"].ToString();
                    bool   free    = (webName.ToLower().Contains("online") || webName.ToLower().Contains("free"));

                    if (ConfigurationSettings.AppSettings.Get("freecate").IndexOf("," + dtDetail.Rows[0]["W_GameCategoryID"] + ",") > -1 || (",1712,1713,").IndexOf("," + id.ToString() + ",") > -1 || free)
                    {
                        freecate = true;
                        HienThiNoiDung(true, false, "0");
                        return;
                    }
                }

                if (telCo == "Undefined")
                {
                    pnlSMS.Visible = true;
                    //if (lang == "1")
                    //{
                    ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan;
                    ltrSMS.Text      = "Soạn tin <b>" + ConfigurationSettings.AppSettings.Get("gamecode") + " " + dtDetail.Rows[0]["Game_Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("gamecommandcode") + "</b> để tải game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    if (id == 1402 || id == 1401)
                    {
                        ltrSMS.Text = "Soạn tin <b>HOT</b> gửi <b>333</b> để tải game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> về máy" + Resources.Resource.wChon3G;
                    }
                    //}
                    //else
                    //{
                    //    ltrHuongdan.Text = linkStr + " » " + Resources.Resource.wHuongDan_KD;
                    //    ltrSMS.Text = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("gamecode") + " " + dtDetail.Rows[0]["Game_Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("gamecommandcode") + "</b> de tai game <b>" + dtDetail.Rows[0]["GameName"].ToString() + "</b> ve may" + Resources.Resource.wChon3G_KD;
                    //    if (id == 1402 || id == 1401) ltrSMS.Text = "Soan tin <b>HOT</b> gui <b>333</b> de tai game <b>" + dtDetail.Rows[0]["GameNameUnicode"].ToString() + "</b> ve may" + 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(), "GAMEDOWN", "GAME_DOWN", price, "D", "JG", Request.QueryString["id"]);

                        if (messageReturn == "1")
                        {    // Thanh toán thành công >> trả nội dung
                            HienThiNoiDung(true, true, price);
                        }
                        else
                        {    // Thanh toán không thành công >> thông báo lỗi
                            HienThiNoiDung(false, true, "0");
                        }
                        break;
                    }
                }
            }
        }
Exemple #22
0
        public static void Process(Record record)
        {
            try
            {
                #region Process

                string    xmlns = "{http://www.w3.org/1999/xhtml}";
                var       cl    = new CrawlerClass(record.Url);
                XDocument xdoc  = cl.GetXDocument();

                if (xdoc != null)
                {
                    var res = from item in xdoc.Descendants(xmlns + "ul").Elements(xmlns + "li")
                              where item.Elements(xmlns + "div").Count() > 1
                              select new
                    {
                        Link  = item.Elements(xmlns + "div").ElementAt(0).Element(xmlns + "a").Attribute("href").Value,
                        Image = item.Elements(xmlns + "div").ElementAt(0).Element(xmlns + "a").Element(xmlns + "img").Attribute("src").Value,
                        Title = item.Elements(xmlns + "div").ElementAt(1).Elements(xmlns + "p").ElementAt(0).Element(xmlns + "a").Value,
                        Hour  = DateTime.Now.Hour + ":" + DateTime.Now.Minute,
                        Date  = DateTime.Now.ToString("dd/MM/yyyy"),
                        Desc  = item.Elements(xmlns + "div").ElementAt(1).Elements(xmlns + "p").ElementAt(1).Value
                    };
                    foreach (var node in res)
                    {
                        var info = new ContentInfo
                        {
                            Title      = node.Title,
                            Teaser     = node.Desc,
                            Image      = record.HttpPrefix + node.Image,
                            Link       = record.HttpPrefix + node.Link,
                            CategoryID = record.CategoryID,
                            CrawlerUrl = record.Url,
                            Hour       = node.Hour,
                            Date       = node.Date
                        };

                        cl = new CrawlerClass(info.Link);

                        xdoc = cl.GetXDocument();

                        #region Get Body

                        string body = "";
                        if (xdoc != null)
                        {
                            var resBody = from item in xdoc.Descendants(xmlns + "div")
                                          where
                                          item.Attribute("cpms_content") != null &&
                                          item.Attribute("cpms_content").Value == "true"
                                          select new
                            {
                                Description = item.Value
                            };

                            body = resBody.ElementAt(0).Description;
                        }
                        if (body.IndexOf("//") > 0)
                        {
                            body = body.Substring(0, body.IndexOf("//"));
                        }
                        info.Body = body;

                        #endregion

                        AppEnv.Insert(info);

                        _logger.Debug("---------------------------------");
                        _logger.Debug("Title: " + info.Title);
                        _logger.Debug("Desc : " + info.Teaser);
                        _logger.Debug("Image: " + info.Image);
                        _logger.Debug("Link : " + info.Link);
                        _logger.Debug("Url  : " + info.CrawlerUrl);
                    }
                }

                #endregion
            }
            catch (Exception ex)
            {
                _logger.Debug("----------------Error-----------------");
                _logger.Debug("Message: " + ex.Message);
                _logger.Debug("StackTrace : " + ex.StackTrace);
                _logger.Debug("Category: " + record.CategoryID);
                _logger.Debug("Link : " + record.Url);
            }
        }
Exemple #23
0
 protected void dropDotDanhGia_SelectedIndexChanged(object sender, EventArgs e)
 {
     Response.Redirect(AppEnv.AdminUrlParams("kehoachnhanvien") + "&idDotDanhGia=" + dropDotDanhGia.SelectedValue + "&idNhanVien=" + idNhanVien);
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //if(AppEnv.isMobileBrowser())
                //{
                if (Session["msisdn"] == null)
                {
                    int    is3g   = 0;
                    string msisdn = MobileUtils.GetMSISDN(out is3g);
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["telco"]  = Constant.T_Vietnamobile;
                        Session["msisdn"] = msisdn;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }

                if (Session["msisdn"] != null)
                {
                    string code = Request.QueryString["c"];
                    if (!string.IsNullOrEmpty(code))
                    {
                        #region CALL Andy Webservice

                        string strResult = AppEnv.DangKyDinhVuTet(Session["msisdn"].ToString(), "GT gửi 1119", "GT");
                        if (strResult == "0")
                        {
                            pnlThanhCong.Visible = true;
                            litThanhCong.Text    = "Đăng ký thành công. Hàng ngày hệ thống sẽ gửi thông tin về máy điện thoại của bạn !";
                        }
                        else if (strResult == "1")
                        {
                            pnlThanhCong.Visible = true;
                            litThanhCong.Text    = "Bạn đã đăng ký dịch vụ này rồi. Xin cảm ơn !";
                        }
                        else
                        {
                            pnlThanhCong.Visible = true;
                            litThanhCong.Text    = "Hệ thống đang bận. Xin vui lòng thử lại sau !";
                        }

                        #endregion
                    }
                    else
                    {
                        pnlThongBao.Visible = true;
                    }
                }
                else
                {
                    pnlThongBaoSoanSms.Visible = true;
                }
                //}
                //else
                //{
                //    pnlThongBaoWeb.Visible = true;
                //}
            }
        }
        protected void HienThiNoiDung(Boolean thuchien, Boolean isLog)
        {
            pnlNoiDung.Visible = true;
            id = ConvertUtility.ToInt32(Request.QueryString["id"]);
            DataTable dtDetail = MusicController.GetItemDetailHasCache(AppEnv.CheckFreeContentTelco(), id);

            //chitietGiaodich = "Nhạc: " + dtDetail.Rows[0]["SongNameUnicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]);
            chitietGiaodich = "Nhạc: " + dtDetail.Rows[0]["SongNameUnicode"].ToString() + " -- id:" + id.ToString();
            if (thuchien)
            {
                DataTable dtKhuyenMai = MusicController.GetItemDetailRandom(AppEnv.CheckFreeContentTelco(), id);
                string    khuyenmaiID = ConvertUtility.ToString(dtKhuyenMai.Rows[0]["W_MItemID"]);
                lnkKhuyenMai.NavigateUrl = UrlProcess.GetGameDownloadItem(AppEnv.CheckFreeContentTelco(), "22", khuyenmaiID, SecurityMethod.MD5Encrypt(khuyenmaiID));
                //if (lang == "1")
                //{
                ltrTieuDe.Text    = "ÂM NHẠC";
                lblTen.Text       = dtDetail.Rows[0]["SongNameUnicode"].ToString();
                lnkDownload.Text  = Resources.Resource.wBamDeTai;
                ltrNoiDung.Text   = Resources.Resource.wMuaThanhCong + " bản nhạc " + dtDetail.Rows[0]["SongNameUnicode"].ToString();
                lnkKhuyenMai.Text = "Nhạc tặng: " + dtKhuyenMai.Rows[0]["SongNameUnicode"].ToString();
                //}
                //else
                //{
                //    ltrTieuDe.Text = "AM NHAC";
                //    lblTen.Text = dtDetail.Rows[0]["SongName"].ToString();
                //    lnkDownload.Text = Resources.Resource.wBamDeTai_KD;
                //    ltrNoiDung.Text = Resources.Resource.wMuaThanhCong_KD + " ban nhac " + dtDetail.Rows[0]["SongName"].ToString();
                //    lnkKhuyenMai.Text = "Nhac tang: " + dtKhuyenMai.Rows[0]["SongName"].ToString();
                //}
                lnkDownload.NavigateUrl = UrlProcess.GetGameDownloadItem(AppEnv.CheckFreeContentTelco(), "22", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString()));

                if (free != true)
                {
                    if (isLog)
                    {
                        Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 2);
                    }
                }

                MusicController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id);
            }
            else
            {
                //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 (isLog)
                {
                    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
            if (free != true)
            {
                if (isLog)
                {
                    ILog logger = LogManager.GetLogger(Session["telco"].ToString());
                    logger.Debug("--------------------------------------------------");
                    logger.Debug("MSISDN:" + Session["msisdn"]);
                    logger.Debug("Dich vu: Am nhac - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["SongName"] + " - id: " + id);
                    logger.Debug("Am nhac Url:" + lnkDownload.NavigateUrl);
                    logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress);
                    logger.Debug("Error:" + messageReturn);
                    logger.Debug("Current Url:" + Request.RawUrl);
                }
            }
            //end log
        }
Exemple #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);
            price = ConfigurationSettings.AppSettings.Get("goldprice");

            telCo = AppEnv.CheckFreeContentTelco();

            linkStr    = "<a href=\"../" + UrlProcess.GetSportHomeUrl(lang, "home", width.ToString()).Replace("~/", "") + "\" >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

                DataTable dtGiai = ThethaoController.GetCompetitionGetByWID(ConvertUtility.ToInt32(Request.QueryString["catid"]));
                if (WapController.W4A_Subscriber_IsActive(ConvertUtility.ToString(Session["msisdn"]), 2))
                {
                    HienThiNoiDung(true, false);
                    return;
                }

                gameid = ThethaoController.GetCompetitionGetByWID(ConvertUtility.ToInt32(Request.QueryString["catid"])).Rows[0]["CompetitionID"].ToString();
                // 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)
                    {
                        //Chưa xử lý
                        string content = Session["cpid"].ToString() + "&" + Constant.thethao + "5" + Request.QueryString["catid"] + "&" + 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("tkdbcode") + " " + dtGiai.Rows[0]["Code"].ToString() + "</b> gửi <b>" + ConfigurationSettings.AppSettings.Get("tkdbcommandcode") + "</b> để nhận thống kê đặc biệt của giải" + Resources.Resource.wChon3G;
                        }
                        else
                        {
                            ltrHuongdan.Text = linkStr_KD + " » " + Resources.Resource.wHuongDan_KD;
                            ltrSMS.Text      = "Soan tin <b>" + ConfigurationSettings.AppSettings.Get("tkdbcode") + " " + dtGiai.Rows[0]["Code"].ToString() + "</b> gui <b>" + ConfigurationSettings.AppSettings.Get("tkdbcommandcode") + "</b> de nhan thong ke dac biet cua giai" + 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(), "GAMEDOWN", "GAME_DOWN", price, "D", "GAME87", Request.QueryString["id"]);

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

                            if (messageReturn == AppEnv.GetSetting("SystemOverload"))     //System Over Load
                            {
                                messageReturn = AppEnv.VnmChargingSystemOverload(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;
                        }
                    }
                }

                #endregion
            }
        }
Exemple #27
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            bool authorized = false;

            XmlReader reader = new XmlTextReader(File.OpenRead(Server.MapPath("..\\XMLFiles\\CMAMenu.xml")));

            XmlDocument doc = new XmlDocument();

            doc.Load(reader);
            reader.Close();

            string expand = Request.QueryString["Expand"];

            int ExpandWhich;

            if (expand == null)
            {
                ExpandWhich = -1;
            }
            else
            {
                ExpandWhich = Convert.ToInt16(expand);
            }

            TableCell cell;
            HyperLink link;

            XmlNodeList Menus = doc.GetElementsByTagName("Menu");

            for (int i = 0; i < Menus.Count; i++)
            {
                int currnode = 0;

                XmlNodeList MenuNodes = Menus[i].ChildNodes;

                if (MenuNodes[currnode].Name.Equals("authorization"))
                {
                    AppEnv       appEnv       = new AppEnv(Context);
                    AccountRoles accountRoles = new AccountRoles(appEnv.GetConnection());
                    if (accountRoles.Authorization(
                            Roles(MenuNodes[currnode++].InnerText),
                            User.Identity.Name))
                    {
                        authorized = true;
                    }
                    else
                    {
                        authorized = false;
                    }
                }
                else
                {
                    authorized = true;
                }

                if (authorized)
                {
                    TableRow row = new TableRow();
                    tblMenu.Rows.Add(row);

                    if (ExpandWhich == i)
                    {
                        cell       = new TableCell();
                        cell.Width = Unit.Percentage(1.0);
                        cell.Controls.Add(AddImage("Images/minus.gif"));
                        row.Cells.Add(cell);

                        link             = new HyperLink();
                        link.Text        = MenuNodes[currnode++].InnerText;
                        link.NavigateUrl = "NavBar.aspx?Expand=-1";

                        cell       = new TableCell();
                        cell.Width = Unit.Percentage(99.0);
                        cell.Controls.Add(link);

                        row.Cells.Add(cell);

                        // start at 1 since 0 is the Menu Name
                        for (int j = currnode; j < MenuNodes.Count; j++)
                        {
                            row = new TableRow();
                            tblMenu.Rows.Add(row);

                            cell       = new TableCell();
                            cell.Width = Unit.Percentage(1.0);
                            cell.Controls.Add(AddImage("Images/blank.gif"));
                            row.Cells.Add(cell);

                            link             = new HyperLink();
                            link.Text        = MenuNodes[j].ChildNodes[0].InnerText;
                            link.NavigateUrl = MenuNodes[j].ChildNodes[1].InnerText;
                            link.Target      = "main";

                            cell       = new TableCell();
                            cell.Width = Unit.Percentage(99.0);
                            cell.Controls.Add(link);

                            row.Cells.Add(cell);
                        }
                    }
                    else
                    {
                        cell       = new TableCell();
                        cell.Width = Unit.Percentage(1.0);
                        cell.Controls.Add(AddImage("Images/plus.gif"));
                        row.Cells.Add(cell);

                        link             = new HyperLink();
                        link.Text        = MenuNodes[currnode++].InnerText;
                        link.NavigateUrl = "NavBar.aspx?Expand=" + i;

                        cell       = new TableCell();
                        cell.Width = Unit.Percentage(99.0);
                        cell.Controls.Add(link);

                        row.Cells.Add(cell);
                    }
                }
            }
        }
Exemple #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);

            if (!Page.IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width + "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                pnlSMS.Visible = true;

                if (Session["msisdn"] != null)
                {
                    //string value = AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), "DK", "DK VIDEO");//ANDY Service S2_94x
                    //string[] res = value.Split('|');
                    //if (res.Length > 0)
                    //{
                    //    ltrHuongdan.Text = "VIDEO HOT";
                    //    if (res[0] == "1")//DK THANH CONG
                    //    {
                    //        ltrSMS.Text = lang == "1" ? "Bạn đã đăng ký thành công. Video Clip sẽ được gửi đến điện thoại của bạn vào 10h30 hàng ngày <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY VIDEO </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                    //               : "Ban da dang ky thanh cong. Video Clip se duoc gui den dien thoai cua ban vao 10h30 hang ngay. <br/> De huy dich vu vui long soan: <b> HUY VIDEO </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
                    //    }
                    //    else
                    //    {
                    //        if (res[1].Trim() == "DoubleRegister")
                    //        {
                    //            ltrSMS.Text = lang == "1" ? "Bạn đã là thuê bao của dịch vụ Video Clip tuần. Xin cảm ơn <br/> Để hủy dịch vụ vui lòng SOẠN TIN : <b> HUY VIDEO </b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>"
                    //                : "Ban da la thue bao cua dich vu Video Clip tuan. Xin cam on <br/> De huy dich vu vui long SOAN TIN : <b> HUY VIDEO </b> gui <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                    //        }
                    //        else
                    //        {
                    //            ltrSMS.Text = AppEnv.GetSetting("VNM_DangKyThatBai_Mt");
                    //        }
                    //    }
                    //}

                    ltrHuongdan.Text = "Giới Thiệu";
                    ltrSMS.Text      = "SOẠN TIN :  <b> DK VIDEO </b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                }
                else
                {
                    if (lang == "1")
                    {
                        ltrHuongdan.Text = "Giới Thiệu";
                        ltrSMS.Text      = "Cung cấp cho bạn những clip hot và nóng hổi nhất. Những thông tin mới, đặc sắc sẽ được truyền tải đến cho bạn hàng ngày. Đăng ký một lần nhận tin mãi mãi <br/> Đặc biệt miễn phí sử dụng 7 ngày đầu tiên cho khách hàng lần đầu đăng ký <br/>Vui lòng truy cập bằng <b> 3G/GPRS </b> hoặc : <br/> SOẠN TIN :  <b> DK VIDEO </b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                    }
                    else
                    {
                        ltrHuongdan.Text = "Gioi Thieu";
                        ltrSMS.Text      = "Cung cap cho ban nhung clip hot va nong hoi nhat. Nhung thong tin moi, dac sac se duoc truyen tai den cho ban hang ngay. Dang ky mot lan nhan tin mai mai <br/> Dac biet mien phi su dung trong 7 ngay dau tien cho khach hang lan dau dang ky <br/>Vui long truy cap bang <b> 3G/GPRS </b> hoac : <br/> SOAN TIN : <b> DK VIDEO </b> gui <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                    }
                }
            }
        }
Exemple #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                return;

                if (AppEnv.GetSetting("TestFlag") == "1")
                {
                    Session["telco"]  = Constant.T_Vietnamobile;
                    Session["msisdn"] = "0987765522";
                }

                if (Session["msisdn"] == null)
                {
                    int    is3g   = 0;
                    string msisdn = MobileUtils.GetMSISDN(out is3g);
                    if (!string.IsNullOrEmpty(msisdn) && MobileUtils.CheckOperator(msisdn, "vietnammobile"))
                    {
                        Session["telco"]  = Constant.T_Vietnamobile;
                        Session["msisdn"] = msisdn;
                    }
                    else
                    {
                        Session["msisdn"] = null;
                        Session["telco"]  = Constant.T_Undefined;
                    }
                }

                pnlNoiDung.Visible = true;
                string   madichvu    = Request.QueryString["t"];
                string[] codes       = madichvu.Split('-');
                string   commandCode = codes[0];
                madichvu = madichvu.Replace("-", " ").ToUpper();
                string key = Request.QueryString["k"];

                if (Session["msisdn"] != null && Session["msisdn"].ToString() != "")
                {
                    string partnerName = AppEnv.GetPartnerName(key);
                    if (!string.IsNullOrEmpty(partnerName))
                    {
                        if (AppEnv.GetPartnerSub(partnerName, madichvu) == "1")
                        {
                            ltrTieuDe.Text = "Dịch vụ Sub " + madichvu;

                            string   result    = AppEnv.RegisterService(AppEnv.GetSetting("S2ShortCode"), "0", Session["msisdn"].ToString(), commandCode.ToUpper(), madichvu); //Andy Service S2_94x
                            string[] arrResult = result.Split('|');
                            if (arrResult[0] == "1")                                                                                                                           //DK THANH CONG
                            {
                                ltrNoiDung.Text = "Bạn đã đăng ký thành công dịch vụ <b>" + madichvu + "</b><br /> Để hủy dịch vụ soạn : <b> HUY " + madichvu + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                            }
                            else if (arrResult[0] == "0")//DOUBE DK
                            {
                                ltrNoiDung.Text = "Bạn đã đăng ký dịch vụ <b>" + madichvu + "</b> trước đây <br /> Để hủy dịch vụ soạn : <b> HUY " + madichvu + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                            }
                            else if (arrResult[0] == "-1")//DK THAT BAI - SAI CU PHAP
                            {
                                ltrNoiDung.Text = "Đăng ký không thành công. Vui lòng thử lại <br /> Hoặc soạn tin <b>" + madichvu + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                            }
                        }
                        else
                        {
                            ltrNoiDung.Text = "Mã dịch gói dịch vụ chưa đúng. Vui lòng thử lại";
                        }
                    }
                    else
                    {
                        ltrNoiDung.Text = "Mã đối tác không đúng. Vui lòng thử lại";
                    }
                }
                else
                {
                    ltrNoiDung.Text = "Hệ thống không xác định được số điện thoại của bạn <br /> Vui lòng truy cập bằng 3G/GPRS <br /> Hoặc soạn tin <b>" + madichvu + "</b> gửi <b>" + AppEnv.GetSetting("S2ShortCode") + "</b>";
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lang  = Request.QueryString["lang"];
            width = ConvertUtility.ToInt32(Request.QueryString["w"]);

            if (!Page.IsPostBack)
            {
                if (width == 0)
                {
                    width = (int)Constant.DefaultScreen.Standard;
                }
                ltrWidth.Text = "<meta content=\"width=" + width +
                                "; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;\" name=\"viewport\" />";

                if (Session["S2Result_Clip"] != null)
                {
                    pnlNoiDung.Visible = true;
                    if (Session["S2Result_Clip"].ToString() == "1")
                    {
                        ltrNoiDung.Text = lang == "1" ? "Bạn đã đăng ký thành công. Video Clip sẽ được gửi đến điện thoại của bạn vào 10h30 hàng ngày <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY CLIP </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                            : "Ban da dang ky thanh cong. Video Clip se duoc gui den dien thoai cua ban vao 10h30 hang ngay. <br/> De huy dich vu vui long soan: <b> HUY CLIP </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
                    }
                    //else
                    //{
                    //    ltrNoiDung.Text = lang == "1" ? "Bạn đã là thuê bao của dịch vụ Game HOT tuần. Xin cảm ơn <br/> Để hủy dịch vụ vui lòng soạn: <b> HUY GAME </b> gửi <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>"
                    //        : "Ban da la thue bao cua dich vu Game HOT tuan. Xin cam on <br/> De huy dich vu vui long soan: <b> HUY GAME </b> gui <b> " + AppEnv.GetSetting("S2ShortCode") + " </b>";
                    //}
                    Session["S2Result_Clip"] = null;
                }
            }
        }