예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteMaster.Menu = 1;
            if (!IsPostBack)
            {
                //获取登录信息
                UserTicketInfo user = userTicket;

                //获取游戏豆信息
                UserCurrencyInfo currency = FacadeManage.aideTreasureFacade.GetUserCurrencyInfo(user.UserID);
                lbCurrency.Text = currency != null?Convert.ToInt32(currency.Currency).ToString() : "0";

                //获取房卡信息
                UserRoomCard card = FacadeManage.aideTreasureFacade.GetUserRoomCard(user.UserID);
                lbRoomCard.Text = card != null?card.RoomCard.ToString() : "0";

                //获取购买产品
                int            id     = GameRequest.GetQueryInt("id", 0);
                RoomCardConfig config = FacadeManage.aideTreasureFacade.GetRoomCardConfig(id);
                if (config == null)
                {
                    return;
                }

                lbExchCard.Text    = config.RoomCard.ToString();
                lbPayCurrency.Text = Convert.ToInt32(config.Currency).ToString();
            }
        }
        /// <summary>
        /// 钻石流水记录
        /// </summary>
        private static void RecordDiamondsTrade()
        {
            int pageIndex = GameRequest.GetQueryInt("page", 1);
            int pageSize  = GameRequest.GetQueryInt("size", 10);

            //获取流水记录
            IList <DiamondStream> list = new List <DiamondStream>();

            string where = $" WHERE UserID={_userid}";
            PagerSet  ps    = FacadeManage.aideRecordFacade.GetDiamondStreamList(where, pageIndex, pageSize);
            DataTable table = ps.PageSet.Tables[0];

            if (table != null && table.Rows.Count > 0)
            {
                foreach (DataRow item in table.Rows)
                {
                    DiamondStream stream = new DiamondStream
                    {
                        SerialNumber  = item["SerialNumber"].ToString(),
                        SerialTime    = Convert.ToDateTime(item["CollectDate"]).ToString("yyyy-MM-dd HH:mm:ss"),
                        BeforeDiamond = Convert.ToInt64(item["CurDiamond"]),
                        ChangeDiamond = Convert.ToInt32(item["ChangeDiamond"]),
                        AfterDiamond  = Convert.ToInt64(item["CurDiamond"]) + Convert.ToInt32(item["ChangeDiamond"]),
                        TypeName      = EnumHelper.GetDesc((RecordDiamondType)item["TypeID"])
                    };
                    list.Add(stream);
                }
            }

            _ajv.SetValidDataValue(true);
            _ajv.SetDataItem("list", list);
        }
예제 #3
0
        /// <summary>
        /// 获取商品类型
        /// </summary>
        /// <param name="context"></param>
        private void GetShopHome(HttpContext context)
        {
            AjaxJsonValid _ajv   = new AjaxJsonValid();
            int           typeid = GameRequest.GetQueryInt("typeid", 0);
            int           userid = GameRequest.GetQueryInt("userid", 0);

            _ajv.msg = "获取数据成功";
            _ajv.SetValidDataValue(true);

            DataSet           ds       = FacadeManage.aideNativeWebFacade.GetAwardHomeList(typeid);
            UserCurrency      Currency = FacadeManage.aideTreasureFacade.GetUserCurrency(userid);
            IList <AwardInfo> list     = DataHelper.ConvertDataTableToObjects <AwardInfo>(ds.Tables[1]);

            foreach (AwardInfo Info in list)
            {
                Info.AwardImg = Info.AwardImg.IndexOf("http://", StringComparison.Ordinal) < 0
                    ? Fetch.GetUploadFileUrl(Info.AwardImg)
                    : Info.AwardImg;
            }

            _ajv.SetDataItem("type", ds.Tables[0]);
            _ajv.SetDataItem("list", list);
            _ajv.SetDataItem("AwardTicket", Currency == null?0: Currency.AwardTicket);
            context.Response.Write(_ajv.SerializeToJson());
        }
예제 #4
0
        protected string pageName       = "全部商品";       // 页名称

        protected void Page_Load(object sender, EventArgs e)
        {
            orderField  = GameRequest.GetQueryInt("orderby", 0);
            orderMethod = GameRequest.GetQueryString("method");
            SetOrderByLink();
            BindShop();
        }
예제 #5
0
        //绑定数据
        private void BindData()
        {
            int startDateID = GameRequest.GetQueryInt("startDateID", 0);
            int endDateID   = GameRequest.GetQueryInt("endDateID", 0);

            if (startDateID == 0 || endDateID == 0)
            {
                litNoData.Visible = true;
                rptData.Visible   = false;
            }

            string where = string.Format(" WHERE DateID>={0} AND DateID<={1}", startDateID, endDateID);
            PagerSet pagerSet = FacadeManage.aideRecordFacade.GetList(RecordEveryDayData.Tablename, anpPage.CurrentPageIndex, anpPage.PageSize, where, " ORDER BY DateID DESC");

            anpPage.RecordCount = pagerSet.RecordCount;

            if (pagerSet.PageSet.Tables[0].Rows.Count > 0)
            {
                rptData.DataSource = pagerSet.PageSet;
                rptData.DataBind();
                litNoData.Visible = false;
                rptData.Visible   = true;
            }
            else
            {
                litNoData.Visible = true;
                rptData.Visible   = false;
            }
        }
예제 #6
0
        /// <summary>
        /// 获取下单信息
        /// </summary>
        /// <param name="context"></param>
        private void GetOrderAwardInfo(HttpContext context)
        {
            int id     = GameRequest.GetQueryInt("id", 0);
            int userid = GameRequest.GetQueryInt("uid", 0);


            AjaxJsonValid _ajv = new AjaxJsonValid();

            if (id == 0)
            {
                _ajv.msg = "缺少参数奖品ID";
                context.Response.Write(_ajv.SerializeToJson());
                return;
            }

            UserCurrency Currency = FacadeManage.aideTreasureFacade.GetUserCurrency(userid);

            _ajv.msg = "获取数据成功";
            _ajv.SetValidDataValue(true);


            DataSet ds = FacadeManage.aideNativeWebFacade.GetOrderAwardInfo(userid, id);

            _ajv.SetDataItem("award", ds.Tables[0]);
            _ajv.SetDataItem("uinfo", ds.Tables[1]);
            _ajv.SetDataItem("AwardTicket", Currency.AwardTicket);
            context.Response.Write(_ajv.SerializeToJson());
        }
예제 #7
0
        //绑定数据
        private void BindData()
        {
            int dateID = GameRequest.GetQueryInt("dateID", 0);

            if (dateID == 0)
            {
                litNoData.Visible = true;
                rptData.Visible   = false;
            }

            DataSet ds = FacadeManage.aideRecordFacade.GetGameTaxListByDateID(dateID);

            if (ds.Tables[0].Rows.Count > 0)
            {
                rptData.DataSource = ds;
                rptData.DataBind();
                litNoData.Visible = false;
                rptData.Visible   = true;
            }
            else
            {
                litNoData.Visible = true;
                rptData.Visible   = false;
            }
        }
예제 #8
0
        private void BindData( )
        {
            int typeid = GameRequest.GetQueryInt("type", 0);

            if (IntParam <= 0)
            {
                return;
            }

            GameProperty property = FacadeManage.aidePlatformFacade.GetPropertyInfo(IntParam, typeid);

            if (property == null)
            {
                return;
            }

            CtrlHelper.SetText(txtName, property.Name);
            CtrlHelper.SetText(txtBuyResultsGold, property.BuyResultsGold.ToString());
            CtrlHelper.SetText(txtUseResultsGold, property.UseResultsGold.ToString());
            CtrlHelper.SetText(txtRegulationsInfo, property.RegulationsInfo);
            CtrlHelper.SetText(txtSortID, property.SortID.ToString());
            CtrlHelper.SetText(txtPrice, property.ExchangeRatio.ToString());
            ddlType.SelectedValue = property.ExchangeType.ToString();
            ddlType.Enabled       = false;
            ddlSate.SelectedValue = property.Nullity.ToString();

            //禁止用户操作
            NulityInput(property.Kind);
        }
예제 #9
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            //判断权限
            if (!AuthUserOperationPermission(Permission.Edit))
            {
                return;
            }
            GameProperty property = new GameProperty();

            property.ID              = IntParam;
            property.ExchangeType    = (byte)GameRequest.GetQueryInt("type", 0);
            property.BuyResultsGold  = CtrlHelper.GetInt(txtBuyResultsGold, 0);
            property.ExchangeRatio   = CtrlHelper.GetInt(txtPrice, 0);
            property.Name            = CtrlHelper.GetText(txtName);
            property.Nullity         = Convert.ToByte(ddlSate.SelectedValue);
            property.RegulationsInfo = CtrlHelper.GetText(txtRegulationsInfo);
            property.SortID          = CtrlHelper.GetInt(txtSortID, 0);
            property.UseResultsGold  = CtrlHelper.GetInt(txtUseResultsGold, 0);
            property.BuyResultsGold  = CtrlHelper.GetInt(txtBuyResultsGold, 0);

            int result = FacadeManage.aidePlatformFacade.UpdatePropertyInfo(property);

            if (result > 0)
            {
                ShowInfo("更新成功", "PropertyConfigList.aspx", 500);
            }
            else
            {
                ShowError("更新失败");
            }
        }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // 充值卡类型
            cardType = GameRequest.GetQueryInt("type", 101);

            // 充值卡类型ID不合法强制定义为101
            if (cardType > 115 || cardType < 101)
            {
                cardType = 101;
            }

            // 充值卡名称
            sPaySidebar.PayID = cardType;
            cardName          = Enum.GetName(typeof(AppConfig.JFTPayCardType), cardType);

            if (!IsPostBack)
            {
                SwitchStep(1);
                if (Fetch.GetUserCookie() != null)
                {
                    this.txtPayAccounts.Text   = Fetch.GetUserCookie().Accounts;
                    this.txtPayReAccounts.Text = Fetch.GetUserCookie().Accounts;
                }

                DataSet ds = FacadeManage.aideTreasureFacade.GetPayQuotaList(cardType);
                ddlCurrenry.DataSource     = ds;
                ddlCurrenry.DataTextField  = "PresentCurrency";
                ddlCurrenry.DataValueField = "Price";
                ddlCurrenry.DataBind();
                ddlCurrenry.Items.Insert(0, new ListItem(" -----请选择充值额度----- ", "0"));
            }
        }
예제 #11
0
        public ActionResult GameSettingList()
        {
            int queryInt = GameRequest.GetQueryInt("type", 1);
            IList <GameKindItem> gameList = FacadeManage.aidePlatformFacade.GetGameList(queryInt);

            return(View(gameList));
        }
예제 #12
0
        protected void LotteryStart(System.Web.HttpContext context)
        {
            int           queryInt      = GameRequest.GetQueryInt("userid", 0);
            string        queryString   = GameRequest.GetQueryString("signature");
            string        queryString2  = GameRequest.GetQueryString("time");
            AjaxJsonValid ajaxJsonValid = new AjaxJsonValid();
            Message       message       = new Message();

            message = FacadeManage.aideAccountsFacade.CheckUserSignature(queryInt, queryString2, queryString);
            if (!message.Success)
            {
                ajaxJsonValid.msg = message.Content;
                context.Response.Write(ajaxJsonValid.SerializeToJson());
            }
            else
            {
                UserInfo userInfo  = message.EntityList[0] as UserInfo;
                string   logonPass = userInfo.LogonPass;
                message = FacadeManage.aideTreasureFacade.GetLotteryStart(queryInt, logonPass, Utility.UserIP);
                if (!message.Success)
                {
                    ajaxJsonValid.msg = message.Content;
                    context.Response.Write(ajaxJsonValid.SerializeToJson());
                }
                else
                {
                    LotteryReturn value = message.EntityList[0] as LotteryReturn;
                    ajaxJsonValid.AddDataItem("list", value);
                    ajaxJsonValid.SetValidDataValue(true);
                    context.Response.Write(ajaxJsonValid.SerializeToJson());
                }
            }
        }
예제 #13
0
        /// <summary>
        /// 获取损耗统计
        /// </summary>
        /// <param name="context"></param>
        private void GetWasteStatictics(HttpContext context)
        {
            string stime  = GameRequest.GetQueryString("stime");
            string etime  = GameRequest.GetQueryString("etime");
            int    kindid = GameRequest.GetQueryInt("kindid", 0);

            if (string.IsNullOrEmpty(stime) || string.IsNullOrEmpty(etime))
            {
                return;
            }
            stime = stime + " 00:00:00";
            etime = etime + " 23:59:59";
            IList <StatisticsWaste> list = FacadeManage.aideTreasureFacade.GetDayWaste(stime, etime, kindid > 0?$" AND KindID = {kindid} | , KindID, ServerID ":" | ,KindID ");
            List <StatisticsChart>  data = new List <StatisticsChart>();

            if (list != null && list.Count > 0)
            {
                data.AddRange(list.Select(item => new StatisticsChart
                {
                    time  = item.TimeDate,
                    count = item.Waste,
                    type  = "游戏损耗" + (item.KindId > 0
                               ? " - " + FacadeManage.aidePlatformFacade.GetMobileKindItemInfo(item.KindId)
                                      ?.KindName ?? ""
                               : "") + (item.ServerId > 0
                               ? " - " + FacadeManage.aidePlatformFacade.GetGameRoomInfoInfo(item.ServerId)
                                        ?.ServerName ?? ""
                               : "")
                }));
            }
            ajv.SetValidDataValue(true);
            ajv.AddDataItem("data", data);
            context.Response.Write(ajv.SerializeToJson());
        }
예제 #14
0
        /// <summary>
        /// 购买
        /// </summary>
        protected void btnBuy_Click(object sender, EventArgs e)
        {
            int id = GameRequest.GetQueryInt("id", 0);

            if (id <= 0)
            {
                ShowInfo("抱歉,请重新选择购买产品");
                return;
            }
            string password = CtrlHelper.GetText(txtPassword);

            if (string.IsNullOrEmpty(password))
            {
                ShowInfo("抱歉,银行密码不能为空");
                return;
            }
            Message msg = FacadeManage.aideTreasureFacade.BuyRoomCard(userTicket.UserID, TextEncrypt.EncryptPassword(password), id, GameRequest.GetUserIP());

            if (msg.Success)
            {
                Response.Redirect("/Menu/BuySuccess.aspx");
            }
            else
            {
                ShowInfo(msg.Content);
            }
        }
        /// <summary>
        /// 绑定查询数据
        /// </summary>
        private void DataBindInsure()
        {
            if (!Fetch.IsUserOnline())
            {
                return;
            }

            StringBuilder sWhere = new StringBuilder();

            sWhere.AppendFormat("WHERE SourceUserID = {0} OR TargetUserID = {0} ", Fetch.GetUserCookie().UserID);

            int sPageIndex = GameRequest.GetQueryInt("page", 1);
            int sPageSize  = anpPage.PageSize;

            PagerSet pagerSet = FacadeManage.aideTreasureFacade.GetInsureTradeRecord(sWhere.ToString(), sPageIndex, sPageSize);

            anpPage.RecordCount = pagerSet.RecordCount;

            if (pagerSet.PageSet.Tables[0].Rows.Count > 0)
            {
                rptInsureList.DataSource = pagerSet.PageSet;
                rptInsureList.DataBind();

                this.rptInsureList.Visible = true;
                this.litNoData.Visible     = false;
            }
            else
            {
                this.rptInsureList.Visible = false;
                this.litNoData.Visible     = true;
            }
        }
예제 #16
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int    userId    = GameRequest.GetQueryInt("UserID", 0);
                string orderId   = GameRequest.GetQueryString("OrderID");
                int    payAmount = GameRequest.GetQueryInt("PayAmount", 0);

                StreamReader sr          = new StreamReader(Request.InputStream);
                string       receiptData = sr.ReadToEnd();

                //苹果返回数据
                string rValue = GetAppInfo(receiptData);

                //苹果返回对象
                AppReceipt receipt = AppReceipt.DeserializeObject(rValue);
                if (receipt.Status == 0 && orderId == receipt.Receipt.transaction_id)
                {
                    OnLinePayOrder order = new OnLinePayOrder
                    {
                        OrderID    = orderId,
                        UserID     = userId,
                        PayAddress = GameRequest.GetUserIP(),
                        Amount     = payAmount
                    };

                    Message umsg = FacadeManage.aideTreasureFacade.FinishOnLineOrderIOS(order, receipt.Receipt.product_id);
                    Response.Write(umsg.Success ? "0" : umsg.Content);
                }
                else
                {
                    Response.Write("失败");
                }
            }
        }
예제 #17
0
 /**
  *
  * 网页授权获取用户基本信息的全部过程
  * 详情请参看网页授权获取用户基本信息:http://mp.weixin.qq.com/wiki/17/c0f37d5704f0b64713d5d2c37b468d75.html
  * 第一步:利用url跳转获取code
  * 第二步:利用code去获取openid和access_token
  *
  */
 public void GetOpenidAndAccessToken()
 {
     if (!string.IsNullOrEmpty(page.Request.QueryString["code"]))
     {
         //获取code码,以获取openid和access_token
         string code = page.Request.QueryString["code"];
         Log.Debug(this.GetType().ToString(), "Get code : " + code);
         GetOpenidAndAccessTokenFromCode(code);
     }
     else
     {
         //构造网页授权获取code的URL
         string host         = page.Request.Url.Host;
         string path         = page.Request.Path;
         int    gameID       = GameRequest.GetQueryInt("GameID", 0);
         string redirect_uri = HttpUtility.UrlEncode("http://" + host + path + "?GameID=" + gameID);
         SortedDictionary <string, object> dic = new SortedDictionary <string, object>();
         dic.Add("appid", appid);
         dic.Add("redirect_uri", redirect_uri);
         dic.Add("response_type", "code");
         dic.Add("scope", "snsapi_userinfo");
         dic.Add("state", "STATE" + "#wechat_redirect");
         string url = "https://open.weixin.qq.com/connect/oauth2/authorize?" + ToUrl(dic);
         Log.Debug(this.GetType().ToString(), "Will Redirect to URL : " + url);
         try
         {
             //触发微信返回code码
             page.Response.Redirect(url);//Redirect函数会抛出ThreadAbortException异常,不用处理这个异常
         }
         catch (System.Threading.ThreadAbortException ex)
         {
         }
     }
 }
예제 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            typeID = GameRequest.GetQueryInt("param", 0);

            //绑定商品顶级分类列表
            DataSet ds = FacadeManage.aideNativeWebFacade.GetShopTypeListByParentId(0);

            if (ds.Tables[0].Rows.Count > 0)
            {
                rptTopType.DataSource = ds;
                rptTopType.DataBind();
            }

            //是否显示房卡菜单
            UserTicketInfo userTicket = Fetch.GetUserCookie();
            int            agentID    = 0;

            if (userTicket != null)
            {
                UserInfo userInfo = FacadeManage.aideAccountsFacade.GetUserBaseInfoByUserID(userTicket.UserID);
                agentID = userInfo.AgentID;
            }

            SystemStatusInfo status = FacadeManage.aideAccountsFacade.GetSystemStatusInfo(AppConfig.SystemConfigKey.IsOpenRoomCard.ToString());

            if (status != null && status.StatusValue == 0 && agentID <= 0)
            {
                IsRoomCard = true;
            }
        }
예제 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // 查询汇率
            SystemStatusInfo ssi = FacadeManage.aideAccountsFacade.GetSystemStatusInfo(AppConfig.SystemConfigKey.RateCurrency.ToString());

            if (ssi != null)
            {
                rateGameBean = ssi.StatusValue;
            }

            // 充值卡类型
            cardType = GameRequest.GetQueryInt("type", 101);

            // 充值卡类型ID不合法强制定义为101
            if (cardType > 115 || cardType < 101)
            {
                cardType = 101;
            }

            // 充值卡名称
            sPaySidebar.PayID = cardType;
            cardName          = Enum.GetName(typeof(AppConfig.JFTPayCardType), cardType);

            if (!IsPostBack)
            {
                SwitchStep(1);
                if (Fetch.GetUserCookie() != null)
                {
                    this.txtPayAccounts.Text   = Fetch.GetUserCookie().Accounts;
                    this.txtPayReAccounts.Text = Fetch.GetUserCookie().Accounts;
                }

                // 充值面值
                Dictionary <int, string> dicCardFaceValue = new Dictionary <int, string>();
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.骏网一卡通), "5,6,10,15,20,30,50,100,120,200,300,500,1000");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.盛大卡), "1,2,3,5,9,10,15,25,30,35,45,50,100,300,350,1000");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.神州行), "10,20,30,50,100");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.征途卡), "10,15,20,25,30,50,60,100,300,468,500,1000");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.Q币卡), "5,10,15,30,60,100");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.联通卡), "10,20,30,50,100");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.久游卡), "5,10,20,25,30,50,100");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.易宝e卡通), "1,2,3,5,9,10,15,25,30,35,45,50,100,300,350,1000");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.网易卡), "5,10,15,20,30,50");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.完美卡), "15,30,50,100");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.搜狐卡), "5,10,15,30,40,100");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.电信卡), "10,20,30,50,100,300");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.纵游一卡通), "10,15,30,50,100");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.天下一卡通), "5,6,10,15,30,50,100");
                dicCardFaceValue.Add(Convert.ToInt32(AppConfig.JFTPayCardType.天宏一卡通), "5,10,15,30,50,100");

                string[] arrCardFaceValue = dicCardFaceValue[cardType].Split(',');
                ddlAmount.Items.Clear();
                ddlAmount.Items.Add(new ListItem("---请选择卡面值---", "0"));
                foreach (string item in arrCardFaceValue)
                {
                    ddlAmount.Items.Add(new ListItem(item, item));
                }
            }
        }
예제 #20
0
 public void ProcessRequest(HttpContext context)
 {
     context.Response.ContentType = "text/plain";
     userID    = GameRequest.GetQueryInt("UserID", 0);
     orderID   = GameRequest.GetQueryString("OrderID");
     payAmount = GameRequest.GetQueryInt("PayAmount", 0);
     PayApp(context);
 }
예제 #21
0
        /// <summary>
        /// 移动版获取公告
        /// </summary>
        /// <param name="context"></param>
        private void GetMobileNotice(HttpContext context)
        {
            int kindId = GameRequest.GetQueryInt("kindid", 0);

            if (kindId == 0)
            {
                return;
            }
        }
예제 #22
0
        protected static string Plattype     = string.Empty; //平台类型
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }
            string type = GameRequest.GetQueryString("y");

            Plattype = type;

            string state = GameRequest.GetQueryString("s");

            if (state == "already")
            {
                int terminalType = Fetch.GetTerminalType(Request);
                int gameid       = GameRequest.GetQueryInt("g", 0);
                if (gameid <= 0)
                {
                    return;
                }

                //保存IP绑定信息
                string UserIP = GameRequest.GetUserIP();
                int    result = FacadeManage.aideAccountsFacade.UserIPBind(UserIP, gameid);

                ConfigInfo config = FacadeManage.aideNativeWebFacade.GetConfigInfo(AppConfig.SiteConfigKey.MobilePlatformVersion.ToString());
                if (config != null)
                {
                    PlatformDownloadUrl = terminalType == 2 ? config.Field5 : config.Field6;
                    if (type == "u3d")
                    {
                        PlatformDownloadUrl = terminalType == 2 ? config.Field9 : config.Field10;
                    }
                }
                Random random = new Random();
                MobileQrcode = Fetch.GetQrCode("http://" + Request.Url.Authority + "/Mobile/ShareLinkNew.aspx?r=" + random.Next(1000, 9999) + "&g=" + gameid + "&y=" + type, 312);
            }
            else
            {
                string domain = Request.Url.Authority;
                int    gameid = FacadeManage.aideAgentFacade.GetGameIDByAgentDomain(domain);
                if (gameid <= 0)
                {
                    string[] domainStr = domain.Split('.');
                    if (domainStr.Length == 3 && Regex.IsMatch(domainStr[0], "^[0-9]*$"))
                    {
                        gameid = Convert.ToInt32(domainStr[0]);
                    }
                    else
                    {
                        gameid = GameRequest.GetQueryInt("g", 0);
                    }
                }
                Response.Redirect("/Mobile/WxRegister.aspx?t=81&g=" + gameid + (!string.IsNullOrEmpty(type) ? "&y=" + type : ""));
            }
        }
예제 #23
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }
            string state = GameRequest.GetQueryString("s");
            string type  = GameRequest.GetQueryString("y");

            if (state == "already")
            {
                int gameid = GameRequest.GetQueryInt("g", 0);
                if (gameid <= 0)
                {
                    return;
                }

                AccountsInfo info = FacadeManage.aideAccountsFacade.GetAccountsInfoByGameID(gameid);
                if (info == null)
                {
                    return;
                }
                Nickname = info.NickName;
                Spread   = gameid.ToString();
                AccountsFace face = FacadeManage.aideAccountsFacade.GetAccountsFace(info.CustomID);
                FaceUrl = face != null ? face.FaceUrl : FaceUrl;

                SystemStatusInfo status =
                    FacadeManage.aideAccountsFacade.GetSystemStatusInfo(AppConfig.ConfigInfoKey.JJBindSpreadPresent
                                                                        .ToString());
                if (status != null)
                {
                    Diamond = status.StatusValue.ToString();
                }
                PlatformDownloadUrl = Fetch.GetDownLoadUrl(Page.Request);
                Title = "推广邀请 - " + AppConfig.PageTitle;
            }
            else
            {
                string domain = Request.Url.Authority;
                int    gameid = FacadeManage.aideAccountsFacade.GetGameIDByAgentDomain(domain);
                if (gameid <= 0)
                {
                    string[] domainStr = domain.Split('.');
                    if (domainStr.Length == 3 && Regex.IsMatch(domainStr[0], "^[0-9]*$"))
                    {
                        gameid = Convert.ToInt32(domainStr[0]);
                    }
                    else
                    {
                        gameid = GameRequest.GetQueryInt("g", 0);
                    }
                }
                Response.Redirect("/Mobile/WxRegister.aspx?t=81&g=" + gameid + (!string.IsNullOrEmpty(type)?"&y=" + type:""));
            }
        }
예제 #24
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     this.typeID = GameRequest.GetQueryInt("param", 0);
     System.Data.DataSet shopTypeListByParentId = FacadeManage.aideNativeWebFacade.GetShopTypeListByParentId(0);
     if (shopTypeListByParentId.Tables[0].Rows.Count > 0)
     {
         this.rptTopType.DataSource = shopTypeListByParentId;
         this.rptTopType.DataBind();
     }
 }
예제 #25
0
        /// <summary>
        /// 绘制二维码
        /// </summary>
        /// <param name="context"></param>
        private void GetQRCode(HttpContext context)
        {
            string encodeData = GameRequest.GetQueryString("qt");
            string icoURL     = GameRequest.GetQueryString("qm");
            int    width      = GameRequest.GetQueryInt("qs", 0);

            if (encodeData != string.Empty)
            {
                calQrcode(encodeData, icoURL, width, context);
            }
        }
예제 #26
0
        private void GetQRCode(System.Web.HttpContext context)
        {
            string queryString  = GameRequest.GetQueryString("qt");
            string queryString2 = GameRequest.GetQueryString("qm");
            int    queryInt     = GameRequest.GetQueryInt("qs", 0);

            if (queryString != string.Empty)
            {
                this.calQrcode(queryString, queryString2, queryInt, context);
            }
        }
예제 #27
0
        /// <summary>
        /// 申请退货
        /// </summary>
        /// <param name="context"></param>
        public void ReturnAward(HttpContext context)
        {
            Message       msg      = new Message();
            AjaxJsonValid ajaxJson = new AjaxJsonValid();

            //判断登录
            if (!Fetch.IsUserOnline())
            {
                ajaxJson.code = 1;
                ajaxJson.msg  = "请先登录";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }

            //验证订单号
            int orderID = GameRequest.GetQueryInt("orderid", 0);           //订单号

            if (orderID == 0)
            {
                return;
            }

            AwardOrder awardOrder = FacadeManage.aideNativeWebFacade.GetAwardOrder(orderID, Fetch.GetUserCookie().UserID);

            if (awardOrder == null)
            {
                ajaxJson.msg = "申请退货失败,订单不存在";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }
            if (awardOrder.OrderStatus != 1 && awardOrder.OrderStatus != 2)
            {
                ajaxJson.msg = "此订单暂不允许退货";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }

            //验证商品是否允许退货
            AwardInfo awardInfo = FacadeManage.aideNativeWebFacade.GetAwardInfo(awardOrder.AwardID);

            if (!awardInfo.IsReturn)
            {
                ajaxJson.msg = "此商品属于不予退货服务的产品范畴";
                context.Response.Write(ajaxJson.SerializeToJson());
                return;
            }

            awardOrder.OrderStatus = (int)AppConfig.AwardOrderStatus.申请退货;
            FacadeManage.aideNativeWebFacade.UpdateAwardOrderStatus(awardOrder);
            ajaxJson.SetValidDataValue(true);
            ajaxJson.msg = "申请退货成功,请等待客服审核";
            context.Response.Write(ajaxJson.SerializeToJson());
            return;
        }
예제 #28
0
        /// <summary>
        /// 绑定商品
        /// </summary>
        protected void BindShop()
        {
            //查询条件
            string where = " WHERE Nullity=0";
            if (IntParam != 0)
            {
                where += string.Format(" AND ( TypeID IN (SELECT TypeID FROM AwardType WHERE ParentID={0}) OR TypeID={0} ) ", IntParam);
                AwardType awardType = FacadeManage.aideNativeWebFacade.GetAwardType(IntParam);
                if (awardType != null)
                {
                    pageName = awardType.TypeName;
                    if (awardType.ParentID != 0)
                    {
                        awardType = FacadeManage.aideNativeWebFacade.GetAwardType(awardType.ParentID);
                        pageName  = awardType.TypeName + " -> " + pageName;
                    }
                }
            }

            //登录用户查能兑换商品
            int range = GameRequest.GetQueryInt("range", 0);

            if (range == 1)
            {
                if (!Fetch.IsUserOnline())
                {
                    string url = string.Format("/login.aspx?url={0}", Utility.UrlEncode(Utils.GameRequest.GetUrl()));
                    Response.Redirect(url);
                    Response.End();
                }
                else
                {
                    Message  msg  = FacadeManage.aideAccountsFacade.GetUserGlobalInfo(Fetch.GetUserCookie().UserID, 0, "");
                    UserInfo user = msg.EntityList[0] as UserInfo;
                    where    = string.Format(" WHERE Price<={1} AND Nullity=0", IntParam, user.UserMedal);
                    pageName = "我能兑换的商品";
                }
            }

            //排序方法
            string orderBy = GetOrderBy();

            //绑定数据

            PagerSet pagerSet = FacadeManage.aideNativeWebFacade.GetList(AwardInfo.Tablename, PageIndex, anpPage.PageSize, orderBy, where);

            anpPage.RecordCount = pagerSet.RecordCount;
            if (pagerSet.PageSet.Tables[0].Rows.Count > 0)
            {
                rptShop.DataSource = pagerSet.PageSet;
                rptShop.DataBind();
            }
        }
예제 #29
0
        public void ProcessRequest(HttpContext context)
        {
            //允许跨站请求域名
            context.Response.AddHeader("Access-Control-Allow-Origin", AppConfig.MoblieInterfaceDomain);
            context.Response.ContentType = "application/json";

            int    userid   = GameRequest.GetQueryInt("userid", 0);
            int    customId = GameRequest.GetInt("customid", 0);
            string time     = GameRequest.GetQueryString("time");
            string sign     = GameRequest.GetQueryString("sign");

            //签名验证
            AjaxJsonValid ajv = Fetch.VerifySignData(userid + AppConfig.MoblieInterfaceKey + time, sign);

            ////接口版本号
            //ajv.SetDataItem("apiVersion", 20171106);
            //if (ajv.code == (int) ApiCode.VertySignErrorCode)
            //{
            //    context.Response.Write(ajv.SerializeToJson());
            //    return;
            //}
            //参数验证
            if (userid <= 0 || customId <= 0)
            {
                ajv.code = (int)ApiCode.VertyParamErrorCode;
                ajv.msg  = string.Format(EnumHelper.GetDesc(ApiCode.VertyParamErrorCode), "");
                context.Response.Write(ajv.SerializeToJson());
                return;
            }

            AccountsFace faceModel = FacadeManage.aideAccountsFacade.GetAccountsFace(customId);

            if (faceModel == null || faceModel.UserID != userid)
            {
                ajv.msg = "抱歉,头像参数无效";
                context.Response.Write(ajv.SerializeToJson());
                return;
            }

            ConfigInfo webCfg =
                FacadeManage.aideNativeWebFacade.GetConfigInfo(AppConfig.SiteConfigKey.WebSiteConfig.ToString());
            string imageServerHost = webCfg.Field2;

            ajv.SetValidDataValue(true);
            ajv.SetDataItem("UserID", faceModel.UserID);
            ajv.SetDataItem("FaceUrl",
                            string.IsNullOrEmpty(faceModel.FaceUrl)
                    ? ""
                    : (faceModel.FaceUrl.IndexOf("http://", StringComparison.Ordinal) > -1
                        ? faceModel.FaceUrl
                        : $"{imageServerHost}{faceModel.FaceUrl}"));
            context.Response.Write(ajv.SerializeToJson());
        }
예제 #30
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!base.IsPostBack)
     {
         int queryInt = GameRequest.GetQueryInt("userid", 0);
         this.UId = queryInt;
         UserTicketInfo userTicketInfo = Fetch.GetUserCookie();
         if (userTicketInfo == null || userTicketInfo.UserID != queryInt)
         {
             string  queryString  = GameRequest.GetQueryString("signature");
             string  queryString2 = GameRequest.GetQueryString("time");
             Message message      = FacadeManage.aideAccountsFacade.CheckUserSignature(queryInt, queryString2, queryString);
             if (!message.Success)
             {
                 base.Response.Write(message.Content);
                 base.Response.End();
             }
             UserInfo userInfo = message.EntityList[0] as UserInfo;
             userTicketInfo = userInfo.ToUserTicketInfo();
             Fetch.SetUserCookie(userTicketInfo);
         }
         Message bankBindInfo = FacadeManage.aideAccountsFacade.GetBankBindInfo(queryInt);
         if (!bankBindInfo.Success)
         {
             Log.Write(bankBindInfo.Content, "tixian");
         }
         else
         {
             this.isBind = 1;
             System.Data.DataSet dataSet = (bankBindInfo.EntityList != null && bankBindInfo.EntityList.Count > 0) ? (bankBindInfo.EntityList[0] as System.Data.DataSet) : null;
             if (dataSet != null && dataSet.Tables.Count > 0)
             {
                 System.Data.DataTable dataTable = dataSet.Tables[0];
                 this.name = dataTable.Rows[0]["Compellation"].ToString();
                 string text = dataTable.Rows[0]["BankNo"].ToString();
                 if (!string.IsNullOrEmpty(text) && text.Length >= 16)
                 {
                     this.account = text.Substring(0, 4) + "**********" + text.Substring(13);
                 }
                 this.insure = dataTable.Rows[0]["InsureScore"].ToString();
             }
             CashSetting cashSetting = FacadeManage.aideAccountsFacade.PlayerCashInfo();
             if (cashSetting != null)
             {
                 this.BalancePrice  = cashSetting.BalancePrice.ToString();
                 this.MinBalance    = cashSetting.MinBalance.ToString();
                 this.MinCounterFee = cashSetting.MinCounterFee.ToString();
                 this.CounterFee    = cashSetting.CounterFee * 100.0;
             }
         }
     }
 }