protected void HienThiNoiDung(Boolean thuchien) { pnlNoiDung.Visible = true; id = ConvertUtility.ToInt32(Request.QueryString["id"]); DataTable dtDetail = VideoController.GetVideoDetailByID(Session["telco"].ToString(), id); chitietGiaodich = "Video: " + dtDetail.Rows[0]["VTitle_Unicode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); if (thuchien) { if (lang == "1") { ltrTieuDe.Text = linkStr; lblTen.Text = dtDetail.Rows[0]["VTitle_Unicode"].ToString(); lnkDownload.Text = Resources.Resource.wBamDeTai; ltrNoiDung.Text = Resources.Resource.wMuaThanhCong + " video " + dtDetail.Rows[0]["VTitle_Unicode"].ToString(); } else { ltrTieuDe.Text = linkStr; lblTen.Text = dtDetail.Rows[0]["VTitle"].ToString(); lnkDownload.Text = Resources.Resource.wBamDeTai_KD; ltrNoiDung.Text = Resources.Resource.wMuaThanhCong_KD + " video " + dtDetail.Rows[0]["VTitle"].ToString(); }; lnkDownload.NavigateUrl = UrlProcess.GetDownloadItem(Session["telco"].ToString(), "5", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString())); Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 5); VideoController.SetDownloadCounter(Session["telco"].ToString(), id); } else { //Thông báo lỗi thanh toán if (lang == "1") { ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao; ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan; } else { ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao_KD; ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD; } Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 5, messageReturn); //--Thông báo lỗi thanh toán } //log charging ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString()); logger.Debug("--------------------------------------------------"); logger.Debug("MSISDN:" + Session["msisdn"].ToString()); logger.Debug("Dich vu: Video - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["VTitle"].ToString() + " - id: " + id); logger.Debug("Video Url:" + lnkDownload.NavigateUrl); logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress); logger.Debug("Error:" + messageReturn); logger.Debug("Current Url:" + Request.RawUrl); //end log }
protected void HienThiNoiDung(Boolean thuchien, Boolean isLog) { pnlNoiDung.Visible = true; id = ConvertUtility.ToInt32(Request.QueryString["id"]); DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(AppEnv.CheckSessionTelco(), id); if (thuchien) { if (lang == "1") { //ltrTieuDe.Text = linkStr; lblTen.Text = dtDetail.Rows[0]["WTitle_Unicode"].ToString(); lnkDownload.Text = Resources.Resource.wBamDeTai; ltrNoiDung.Text = Resources.Resource.wMuaThanhCong + " hình nền " + dtDetail.Rows[0]["WTitle_Unicode"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ")"; } else { //ltrTieuDe.Text = linkStr_KD; lblTen.Text = dtDetail.Rows[0]["WTitle"].ToString(); lnkDownload.Text = Resources.Resource.wBamDeTai_KD; ltrNoiDung.Text = Resources.Resource.wMuaThanhCong_KD + " hình nền " + dtDetail.Rows[0]["WTitle"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ")"; } lnkDownload.NavigateUrl = UrlProcess.GetDownloadItem(AppEnv.CheckSessionTelco(), "1", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString())); if (ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]) == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid"))) { if (isLog) { chitietGiaodich = "Thu phap: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); Transaction.Success(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 15); } } else { if (isLog) { chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); Transaction.Success(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, lnkDownload.NavigateUrl, id.ToString(), chitietGiaodich, 1); } } //if(isLog) //{ HinhNenController.SetDownloadCounter(AppEnv.CheckFreeContentTelco(), id); //} } else { //Thông báo lỗi thanh toán if (lang == "1") { //ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao; ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan; } else { //ltrTieuDe.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD; ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD; } if (ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]) == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid"))) { chitietGiaodich = "Thu phap: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); if (isLog) { Transaction.Failure(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 15, messageReturn); } } else { chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); if (isLog) { Transaction.Failure(AppEnv.CheckSessionTelco(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 1, messageReturn); } } //--Thông báo lỗi thanh toán } if (isLog) { //log charging ILog logger = LogManager.GetLogger(Session["telco"].ToString()); logger.Debug("--------------------------------------------------"); logger.Debug("MSISDN:" + Session["msisdn"].ToString()); logger.Debug("Dich vu: Hinh nen - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["WTitle"].ToString() + " - id: " + id); logger.Debug("Wallpaper Url:" + lnkDownload.NavigateUrl); logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress); logger.Debug("Error:" + messageReturn); logger.Debug("Current Url:" + Request.RawUrl); //end log } }
protected void HienThiNoiDung(Boolean thuchien) { pnlNoiDung.Visible = true; id = ConvertUtility.ToInt32(Request.QueryString["id"]); DataTable dtDetail = HinhNenController.GetWallpaperDetailByID(Session["telco"].ToString(), id); SoDT = MobileUtils.ToSTDMobileNumber(SoDT); if (thuchien) { if (lang == "1") { ltrTieuDe.Text = linkStr; lblTen.Text = dtDetail.Rows[0]["WTitle_Unicode"].ToString(); //lnkDownload.Text = Resources.Resource.wBamDeTai; ltrNoiDung.Text = Resources.Resource.wTangThanhCong + " hình nền " + dtDetail.Rows[0]["WTitle_Unicode"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ") tới số điện thoại 0" + SoDT.Remove(0, 2); } else { ltrTieuDe.Text = linkStr_KD; lblTen.Text = dtDetail.Rows[0]["WTitle"].ToString(); //lnkDownload.Text = Resources.Resource.wBamDeTai_KD; ltrNoiDung.Text = Resources.Resource.wTangThanhCong_KD + " hinh nen " + dtDetail.Rows[0]["WTitle"].ToString() + " (" + dtDetail.Rows[0]["WCode"].ToString() + ") toi so dien thoai 0" + SoDT.Remove(0, 2); }; string url = UrlProcess.GetDownloadItem(Session["telco"].ToString(), "1", id.ToString(), SecurityMethod.MD5Encrypt(id.ToString())); MTInfo mtInfo = new MTInfo(); Random random = new Random(); //Thông báo cho người được tặng mtInfo.User_ID = SoDT; mtInfo.Service_ID = ConfigurationSettings.AppSettings.Get("wallcommandcode"); mtInfo.Command_Code = ConfigurationSettings.AppSettings.Get("wallcode"); mtInfo.Message_Type = (int)Constant.MessageType.FREE; mtInfo.Request_ID = random.Next(100000000, 999999999).ToString(); mtInfo.Total_Message = 1; mtInfo.Message_Index = 0; mtInfo.IsMore = 0; mtInfo.Content_Type = 0; mtInfo.Message_Type = (int)Constant.MessageType.FREE; mtInfo.Message = "Ban nhan duoc qua tang hinh nen " + dtDetail.Rows[0]["WCode"].ToString() + " tu so dien thoai " + "0" + Session["msisdn"].ToString().Remove(0, 2); MTController.SMS_MTInsert(mtInfo); //MT thong bao cho nguoi gui tang biet mtInfo.Content_Type = 0; mtInfo.User_ID = Session["msisdn"].ToString(); mtInfo.Message = "Ban da gui tang thanh cong hinh nen " + dtDetail.Rows[0]["WCode"].ToString() + " toi so dt " + SoDT; mtInfo.Message_Type = (int)Constant.MessageType.FREE; mtInfo.Request_ID = random.Next(100000000, 999999999).ToString(); MTController.SMS_MTInsert(mtInfo); //Build waplink send to customer and insert to MT table mtInfo.User_ID = SoDT; mtInfo.Message = "Tai hinh nen duoc tang theo dia chi: " + url; mtInfo.Content_Type = 8; mtInfo.Message_Type = (int)Constant.MessageType.FREE; mtInfo.Request_ID = random.Next(100000000, 999999999).ToString(); MTController.SMS_MTInsert(mtInfo); //Lưu Transaction if (ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]) == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid"))) { chitietGiaodich = "Thu phap: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, url, id.ToString(), chitietGiaodich, 15); } else { chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); Transaction.Success(Session["telco"].ToString(), Session["msisdn"].ToString(), price, url, id.ToString(), chitietGiaodich, 1); } HinhNenController.SetDownloadCounter(Session["telco"].ToString(), id); } else { //Thông báo lỗi thanh toán if (lang == "1") { ltrTieuDe.Text = linkStr + " » " + Resources.Resource.wThongBao; ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan; } else { ltrTieuDe.Text = linkStr_KD + " » " + Resources.Resource.wThongBao_KD; ltrNoiDung.Text = Resources.Resource.wThongBaoLoiThanhToan_KD; } if (ConvertUtility.ToInt32(dtDetail.Rows[0]["W_CategoryID"]) == ConvertUtility.ToInt32(ConfigurationSettings.AppSettings.Get("thuphapid"))) { chitietGiaodich = "Thu phap: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 15, messageReturn); } else { chitietGiaodich = "Hinh nen: " + dtDetail.Rows[0]["WCode"].ToString() + " -- id:" + id.ToString() + " -- newtransactionid: " + ConvertUtility.ToString(Session["transactionid"]) + " -- old tranid: " + ConvertUtility.ToString(Session["transactionid_old"]); Transaction.Failure(Session["telco"].ToString(), Session["msisdn"].ToString(), price, Request.Url.ToString(), id.ToString(), chitietGiaodich, 1, messageReturn); } //--Thông báo lỗi thanh toán } //log charging ILog logger = log4net.LogManager.GetLogger(Session["telco"].ToString()); logger.Debug("--------------------------------------------------"); logger.Debug("MSISDN: " + Session["msisdn"].ToString()); logger.Debug("So gui tang: " + SoDT); logger.Debug("Dich vu: Hinh nen - parameter: " + price + " - Ten: " + dtDetail.Rows[0]["WTitle"].ToString() + " - id: " + id); logger.Debug("Wallpaper Url:" + lnkDownload.NavigateUrl); logger.Debug("IP:" + HttpContext.Current.Request.UserHostAddress); logger.Debug("Error:" + messageReturn); logger.Debug("Current Url:" + Request.RawUrl); //end log }