protected void btnSave_Click(object sender, EventArgs e)
        {
            AccountsProtect model = new AccountsProtect( );

            model.ProtectID = IntParam;
            model.Question1 = TextFilter.FilterAll(CtrlHelper.GetSelectValue(ddlQuestion1));
            model.Question2 = TextFilter.FilterAll(CtrlHelper.GetSelectValue(ddlQuestion2));
            model.Question3 = TextFilter.FilterAll(CtrlHelper.GetSelectValue(ddlQuestion3));
            model.Response1 = TextFilter.FilterAll(CtrlHelper.GetText(txtResponse1));
            model.Response2 = TextFilter.FilterAll(CtrlHelper.GetText(txtResponse2));
            model.Response3 = TextFilter.FilterAll(CtrlHelper.GetText(txtResponse3));
            model.SafeEmail = TextFilter.FilterAll(CtrlHelper.GetText(txtSafeEmail));


            Message msg = new Message( );

            msg = FacadeManage.aideAccountsFacade.UpdateAccountsProtect(model);

            if (msg.Success)
            {
                MessageBox("密保信息修改成功");
            }
            else
            {
                MessageBox(msg.Content);
            }
        }
        /// <summary>
        /// 用户查询
        /// </summary>
        protected void btnUseSearch_Click(object sender, EventArgs e)
        {
            StringBuilder where = new StringBuilder("WHERE 1=1");
            string text = CtrlHelper.GetText(txtUser);

            if (!string.IsNullOrEmpty(text))
            {
                int userID;
                if (CtrlHelper.GetSelectValue(ddlType) == "0")
                {
                    userID = GetUserIDByAccount(text);
                }
                else
                {
                    if (!Utils.Validate.IsNegativeInt(text))
                    {
                        ShowError("游戏ID必须为整数");
                        return;
                    }
                    userID = GetUserIDByGameID(Convert.ToInt32(text));
                }
                where.AppendFormat(" AND UserID={0}", userID);
            }
            SearchItems = where.ToString();
            DataMallOrder();
        }
示例#3
0
        /// <summary>
        /// 用户搜索
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnUseSearch_Click(object sender, EventArgs e)
        {
            StringBuilder where = new StringBuilder("");

            //用户条件
            string user = CtrlHelper.GetTextAndFilter(txtUser);

            if (string.IsNullOrEmpty(user))
            {
                ShowError("请输入用户信息");
                return;
            }

            int userID = 0;

            switch (CtrlHelper.GetSelectValue(ddlType))
            {
            case "0":
                userID = GetUserIDByAccount(user);
                break;

            case "1":
                if (Utils.Validate.IsNumeric(user))
                {
                    userID = GetUserIDByGameID(Convert.ToInt32(user));
                }
                break;

            case "2":
                if (Utils.Validate.IsNumeric(user))
                {
                    userID = Convert.ToInt32(user);
                }
                break;

            default:
                break;
            }
            if (userID == 0)
            {
                litNoData.Visible = true;
                rpData.Visible    = false;
                return;
            }
            where.AppendFormat(" WHERE UserID={0}", userID);

            //日期条件
            string date = CtrlHelper.GetText(txtDate);

            if (!string.IsNullOrEmpty(date))
            {
                string dateID = Fetch.GetDateID(Convert.ToDateTime(date));
                where.AppendFormat(" AND DateID={0}", dateID);
            }

            //绑定数据
            BindTaskRecord(where.ToString());
        }
示例#4
0
        private void ProcessData()
        {
            if (!IsValid)
            {
                return;
            }

            GameIssueInfo issue = new GameIssueInfo();

            issue.IssueTitle   = CtrlHelper.GetText(txtIssueTitle);
            issue.IssueContent = CtrlHelper.GetText(txtIssueContent);
            issue.TypeID       = CtrlHelper.GetSelectValue(ddlTypeID, 1);
            issue.Nullity      = Convert.ToByte(rbtnNullity.SelectedValue.Trim());

            if (string.IsNullOrEmpty(issue.IssueContent))
            {
                ShowError("请输入问题内容");
                return;
            }

            Message msg = new Message();

            if (StrCmd == "add")
            {
                //判断权限
                AuthUserOperationPermission(Permission.Add);
                msg = FacadeManage.aideNativeWebFacade.InsertGameIssue(issue);
            }
            else
            {
                //判断权限
                AuthUserOperationPermission(Permission.Edit);
                issue.IssueID = IntParam;
                msg           = FacadeManage.aideNativeWebFacade.UpdateGameIssue(issue);
            }

            if (msg.Success)
            {
                if (StrCmd == "add")
                {
                    ShowInfo("问题信息增加成功", "IssueList.aspx", 1200);
                }
                else
                {
                    ShowInfo("问题信息修改成功", "IssueList.aspx", 1200);
                }
            }
            else
            {
                ShowError(msg.Content);
            }
        }
示例#5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strReason = CtrlHelper.GetText(txtReason);
            int    intDays   = CtrlHelper.GetInt(txtMemberDays, 0);

            if (intDays <= 0)
            {
                MessageBox("赠送天数必须为大于零的正整数!");
                return;
            }
            if (string.IsNullOrEmpty(strReason))
            {
                MessageBox("赠送原因不能为空!");
                return;
            }

            AccountsInfo modelAccountInfo = new AccountsInfo( );

            /*RecordGrantMember grantMember = new RecordGrantMember( );
             * grantMember.ClientIP = GameRequest.GetUserIP( );
             * grantMember.MasterID = userExt.UserID;
             * grantMember.GrantCardType = int.Parse( ddlMemberType.SelectedValue );
             * grantMember.MemberDays = intDays;
             * grantMember.Reason = strReason;
             */
            string[] arrUserIDList = StrParamsList.Split(new char[] { ',' });
            foreach (string strid in arrUserIDList)
            {
                if (Utils.Validate.IsPositiveInt(strid))
                {
                    modelAccountInfo = aideAccountsFacade.GetAccountInfoByUserID(int.Parse(strid));
                    if (modelAccountInfo == null)
                    {
                        continue;
                    }

                    aideRecordFacade.GrantMember(int.Parse(strid), CtrlHelper.GetSelectValue(ddlMemberType, 0), intDays, userExt.UserID, strReason, GameRequest.GetUserIP( ));

                    /*grantMember.UserID = int.Parse( strid );
                     * modelAccountInfo.MemberOrder = CtrlHelper.GetSelectValue( ddlMemberType,0 );
                     *
                     * aideAccountsFacade.UpdateAccount( modelAccountInfo );           //更新会员信息
                     * aideRecordFacade.InsertRecordGrantMember( grantMember );        //插入赠送会员日志*/
                }
            }
            MessageBox("确认成功");
        }
示例#6
0
        protected void SqlDataSourceGameIcon_Deleted(object sender, SqlDataSourceStatusEventArgs e)
        {
            //e.Command.Parameters["@Id"].Value;
            string SDKPackageDir = string.Empty;
            string platform      = CtrlHelper.GetSelectValue(DropDownListSystem);

            SDKPackageDir = string.Equals(platform, "1") ? System.Configuration.ConfigurationManager.AppSettings["SDKAndroidPackageIcon"]
                                                        : System.Configuration.ConfigurationManager.AppSettings["SDKIOSPackageIcon"];

            string gameID = this.ddlGameList.SelectedValue;

            //OldValuesParameterFormatString = "old_{0}"
            string IconPath = SDKPackageDir + gameID + "\\" + e.Command.Parameters["@IconName"].Value + "\\";

            DeleteFolder(IconPath);

            MessageLabel.Text = "";
        }
示例#7
0
        protected void ButtonAddPlatformVersion_Click(object sender, EventArgs e)
        {
            this.LabelMessage.Text = "";
            string platformid      = this.DropDownListPlatform.SelectedValue;
            string sqlQuery        = string.Format(@"select platformName from sdk_DefaultPlatform where id={0}", platformid);
            string platformName    = aideNativeWebFacade.GetScalarBySql(sqlQuery);
            string platformVersion = CtrlHelper.GetText(TextBoxVersion);

            string systemId = CtrlHelper.GetSelectValue(DropDownListSystem);

            string SDKPackageDir        = "";
            string SDKAndroidPackageDir = ConfigurationManager.AppSettings["SDKPackageDir"];
            string SDKIOSPackageDir     = ConfigurationManager.AppSettings["SDKIOSPackageDir"];

            if (string.Equals(systemId, "1"))
            {
                SDKPackageDir = SDKAndroidPackageDir + "SDK\\Channel_SDK\\" + platformName + "\\" + platformVersion + "\\";
            }
            else
            {
                SDKPackageDir = SDKIOSPackageDir + "SDKFile\\ChannelSDKFramework\\sdk_include_" + platformName + "\\" + platformVersion + "\\";
            }

            if (!System.IO.Directory.Exists(SDKPackageDir))
            {
                Response.Write("<script>alert('渠道版本创建失败\\r\\n该渠道版本文件夹不存在!')</script>");
                //this.LabelMessage.Text = "渠道配置文件夹尚未创建!";
                return;
            }
            string  systemid = this.DropDownListSystem.SelectedValue;
            string  username = Context.User.Identity.Name;
            Message umsg     = aideNativeWebFacade.AddMyVersion(platformVersion, username, platformid, systemid);

            if (umsg.Success)
            {
                this.ListView1.DataBind();
                return;
            }
            Response.Write("<script>alert('" + umsg.Content + "')</script>");
            //this.LabelMessage.Text = umsg.Content;
        }
示例#8
0
        /// <summary>
        /// 订单状态查询
        /// </summary>
        protected void btnNewOrder_Command(object sender, CommandEventArgs e)
        {
            StringBuilder where = new StringBuilder("WHERE 1=1");
            string orderNum = CtrlHelper.GetText(txtOrderID);

            if (orderNum != "")
            {
                where.AppendFormat(" AND OrderID={0}", orderNum);
            }
            string start = CtrlHelper.GetText(txtStartDate);
            string end   = CtrlHelper.GetText(txtEndDate);

            if (start != "" && end != "")
            {
                where.AppendFormat(" AND CollectDate>='{0}' AND CollectDate<='{1}'", Fetch.GetStartTime(Convert.ToDateTime(start)), Fetch.GetEndTime(Convert.ToDateTime(end)));
            }
            string text = CtrlHelper.GetText(txtUser);

            if (!string.IsNullOrEmpty(text))
            {
                int userID;
                if (CtrlHelper.GetSelectValue(ddlType) == "0")
                {
                    userID = GetUserIDByAccount(text);
                }
                else
                {
                    if (!Utils.Validate.IsNumeric(text))
                    {
                        ShowError("游戏ID必须为整数");
                        return;
                    }
                    userID = GetUserIDByGameID(Convert.ToInt32(text));
                }
                where.AppendFormat(" AND UserID={0}", userID);
            }
            where.AppendFormat(" AND OrderStatus={0}", e.CommandArgument);
            SearchItems = where.ToString();
            DataMallOrder();
        }
示例#9
0
        /// <summary>
        /// 绑定商品类型
        /// </summary>
        //private void DataMallType()
        //{
        //    DataSet ds = FacadeManage.aideNativeWebFacade.GetAllAwardType();
        //    ddlType.DataSource = ds.Tables[0];
        //    ddlType.DataTextField = "TypeName";
        //    ddlType.DataValueField = "TypeID";
        //    ddlType.DataBind();
        //    ddlType.Items.Insert( 0, new ListItem( "全部", "0" ) );
        //}

        /// <summary>
        /// 获取查询条件
        /// </summary>
        private string GetWhere()
        {
            StringBuilder where = new StringBuilder(" WHERE 1=1");
            string name = CtrlHelper.GetTextAndFilter(txtName);

            if (!string.IsNullOrEmpty(name))
            {
                where.AppendFormat(" AND AwardName Like '%{0}%'", name);
            }
            string type = CtrlHelper.GetSelectValue(ddlType);

            if (type != "0")
            {
                where.AppendFormat(" AND AwardType={0}", type);
            }
            string start = CtrlHelper.GetText(txtPriceStart);
            string end   = CtrlHelper.GetText(txtPriceEnd);

            if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(end))
            {
                where.AppendFormat(" AND UnitPrice>={0} AND UnitPrice<={1}", start, end);
            }
            return(where.ToString());
        }
示例#10
0
        /// <summary>
        /// 点击保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (!IsValid)
            {
                return;
            }

            if (string.IsNullOrEmpty(CtrlHelper.GetSelectValue(ddlTypeID)))
            {
                ShowError("请为商品选择一个商品类型");
                return;
            }

            AwardInfo info = new AwardInfo();

            if (IntParam > 0)
            {
                AuthUserOperationPermission(Permission.Edit);
                info = FacadeManage.aideNativeWebFacade.GetAwardInfoByID(IntParam);
            }
            else
            {
                AuthUserOperationPermission(Permission.Add);
                info.CollectDate = DateTime.Now;
                info.BuyCount    = 0;
            }

            #region 图片验证
            //缩率图上传
            try
            {
                info.SmallImage = upSmallImage.FilePath;
            }
            catch (Exception ex)
            {
                ShowError("缩率图上传失败:" + ex.Message);
                return;
            }

            //展示图上传
            try
            {
                info.BigImage = upBigImage.FilePath;
            }
            catch (Exception ex)
            {
                ShowError("展示图上传失败:" + ex.Message);
                return;
            }
            #endregion

            info.AwardName   = CtrlHelper.GetText(txtAwardName);
            info.Description = CtrlHelper.GetText(txtDescription);
            info.Inventory   = CtrlHelper.GetInt(txtInventory, 0);
            info.IsMember    = false;
            info.IsReturn    = rbIsReturn.SelectedValue == "0" ? false : true;
            info.NeedInfo    = 1;
            info.Nullity     = Convert.ToByte(rbNullity.SelectedValue);
            info.Price       = CtrlHelper.GetInt(txtPrice, 0);
            info.SortID      = CtrlHelper.GetInt(txtSortID, 0);
            info.TypeID      = Convert.ToInt32(CtrlHelper.GetSelectValue(ddlTypeID));

            int needInfo = 0;
            for (int i = 0; i < cbNeedInfo.Items.Count; i++)
            {
                if (cbNeedInfo.Items[i].Selected == true)
                {
                    needInfo = needInfo | Convert.ToInt32(cbNeedInfo.Items[i].Value);
                }
            }
            info.NeedInfo = needInfo;
            bool result;
            if (IntParam > 0)
            {
                result = FacadeManage.aideNativeWebFacade.UpdateAwardInfo(info);
                DataMallType();
            }
            else
            {
                result = FacadeManage.aideNativeWebFacade.InsertAwardInfo(info);
            }

            if (result)
            {
                ShowInfo("商品信息保存成功", "MallInfoList.aspx", 1000);
            }
            else
            {
                ShowError("商品信息保存失败");
            }
        }
示例#11
0
        /// <summary>
        /// 点击保存
        /// </summary>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (!IsValid)
            {
                return;
            }

            if (string.IsNullOrEmpty(CtrlHelper.GetSelectValue(ddlTypeID)))
            {
                ShowError("请为商品选择一个商品类型");
                return;
            }

            AwardInfo info = new AwardInfo();

            if (IntParam > 0)
            {
                if (!AuthUserOperationPermission(Permission.Edit))
                {
                    return;
                }
                info = FacadeManage.aideNativeWebFacade.GetAwardInfoByID(IntParam);
            }
            else
            {
                if (!AuthUserOperationPermission(Permission.Add))
                {
                    return;
                }
                info.CollectDate = DateTime.Now;
            }

            #region 图片验证


            //展示图上传
            try
            {
                info.AwardImg = upBigImage.FilePath;
            }
            catch (Exception ex)
            {
                ShowError("展示图上传失败:" + ex.Message);
                return;
            }

            if (string.IsNullOrEmpty(info.AwardImg))
            {
                ShowError("请上传商品大图");
                return;
            }

            #endregion

            info.AwardName = CtrlHelper.GetText(txtAwardName);
            if (info.AwardName.Length > 32)
            {
                ShowError("商品名称过长!");
                return;
            }
            info.Inventory = CtrlHelper.GetInt(txtInventory, 0);

            info.Nullity   = Convert.ToByte(rbNullity.SelectedValue);
            info.UnitPrice = CtrlHelper.GetInt(txtPrice, 0);
            info.Gold      = CtrlHelper.GetInt(txtGold, 0);
            info.Diamond   = CtrlHelper.GetInt(txtDiamond, 0);
            info.SortID    = CtrlHelper.GetInt(txtSortID, 0);
            info.AwardType = Convert.ToInt32(CtrlHelper.GetSelectValue(ddlTypeID));
            bool result;
            if (IntParam > 0)
            {
                result = FacadeManage.aideNativeWebFacade.UpdateAwardInfo(info);
            }
            else
            {
                result = FacadeManage.aideNativeWebFacade.InsertAwardInfo(info);
            }

            if (result)
            {
                ShowInfo("商品信息保存成功", "MallInfoList.aspx", 1000);
            }
            else
            {
                ShowError("商品信息保存失败");
            }
        }
示例#12
0
        /// <summary>
        /// 添加游戏
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ButtonAddGame_Click(object sender, EventArgs e)
        {
            //if (!UploadGameIcon()) return;
            string gamename             = CtrlHelper.GetText(txtGameName);
            string gamedisplayname      = CtrlHelper.GetText(txtGameDisplayName);
            string gameAndroidVersionID = CtrlHelper.GetSelectValue(ddlAndroidVersionList);
            string gameIOSVersionID     = CtrlHelper.GetSelectValue(ddlIOSVersionList);
            string gameAndroidKeyID     = CtrlHelper.GetSelectValue(ddlAndroidKeyList);
            string gameNameSpell        = CtrlHelper.GetText(txtGameNameSpell);
            string gameUnityVer         = CtrlHelper.GetText(txtUnityVer);
            string gameicon             = this.hfGameIcon.Value;
            string gameProductName      = CtrlHelper.GetText(txtProductName);
            string gameIsEncryption     = this.CheckBoxIsEncryption.Checked ? "1" : "0";
            //追加sdk相关
            string sdkgameid  = CtrlHelper.GetText(txtSDKGameID);
            string sdkgamekey = CtrlHelper.GetText(txtSDKGameKey);

            if (gamename == "" || gamedisplayname == "")
            {
                MessageLabel.Text = "游戏名字不能为空";
                return;
            }

            if (sdkgameid == "" || sdkgamekey == "")
            {
                MessageLabel.Text = "SDK通信ID及KEY不能为空";
                return;
            }


            string sql = "";

            if (hfSubmitType.Value == "add")
            {
                Message umsg = aideNativeWebFacade.AddGame(gamename, gamedisplayname, gameAndroidVersionID, gameIOSVersionID, gameAndroidKeyID, "", gameicon, Context.User.Identity.Name, gameNameSpell, gameUnityVer, gameProductName, gameIsEncryption, sdkgameid, sdkgamekey);
                if (umsg.Success)
                {
                    BindingList();
                    MessageLabel.Text = "游戏新增成功";
                    CreateGameImgList(umsg.Content, gamename, gameicon, false);
                    CreateIOSIcon(umsg.Content, gameNameSpell, gameicon, true);
                }
                else
                {
                    MessageLabel.Text = "游戏新增失败";
                }
            }
            else if (hfSubmitType.Value == "edit")
            {
                sql = string.Format(@"UPDATE [sdk_GameInfo] SET  [GameName]='{0}',[GameDisplayName]='{1}',[AndroidVersionID]={2},[IOSVersionID]={3},[AndroidKeyID]={4},
                                      [GameIcon]='{5}',[CreateUser]='{6}',[GameNameSpell]='{8}',[UnityVer]='{9}',ProductName='{10}',IsEncryption='{11}',SDKGameID='{12}',SDKGameKey='{13}' WHERE GAMEID={7}"
                                    , gamename, gamedisplayname, gameAndroidVersionID, gameIOSVersionID, gameAndroidKeyID, gameicon, Context.User.Identity.Name, CtrlHelper.GetInt(hfgameID, 0), gameNameSpell, gameUnityVer, gameProductName, gameIsEncryption, sdkgameid, sdkgamekey);



                int row = aideNativeWebFacade.ExecuteSql(sql);
                if (row > 0)
                {
                    BindingList();
                    MessageLabel.Text = "游戏更新成功";
                    CreateGameImgList(CtrlHelper.GetText(hfgameID), gamename, gameicon, true);
                    CreateIOSIcon(CtrlHelper.GetText(hfgameID), gameNameSpell, gameicon, true);
                }
                else
                {
                    MessageLabel.Text = "游戏更新失败";
                }
            }
            else
            {
                MessageLabel.Text = "抱歉,未识别操作!";
                return;
            }
        }