private void BindDate()
 {
     if (this._gameInfo == null)
     {
         string keyWord = Guid.NewGuid().ToString().Replace("-", "");
         this.hfKeyWord.Value = keyWord;
         string str2 = this.CreateGameUrl(keyWord);
         this.txtGameUrl.Text = str2;
     }
     else
     {
         this.memberCheck                      = this._gameInfo.MemberCheck == 1;
         this.hfGameId.Value                   = this._gameInfo.GameId.ToString();
         this.txtGameTitle.Text                = this._gameInfo.GameTitle;
         this.dateBeginTime.SelectedDate       = new DateTime?(this._gameInfo.BeginTime);
         this.dateEndTime.SelectedDate         = new DateTime?(this._gameInfo.EndTime);
         this.txtDescription.Text              = this._gameInfo.Description.Replace("<br/>", "\n");
         this.txtNeedPoint.Text                = this._gameInfo.NeedPoint.ToString();
         this.txtGivePoint.Text                = this._gameInfo.GivePoint.ToString();
         this.cbOnlyGiveNotPrizeMember.Checked = this._gameInfo.OnlyGiveNotPrizeMember;
         this.txtLimitEveryDay.Text            = this._gameInfo.LimitEveryDay.ToString();
         this.txtMaximumDailyLimit.Text        = this._gameInfo.MaximumDailyLimit.ToString();
         HiddenField field  = this.memberRange.FindControl("txt_Grades") as HiddenField;
         HiddenField field2 = this.memberRange.FindControl("txt_DefualtGroup") as HiddenField;
         HiddenField field3 = this.memberRange.FindControl("txt_CustomGroup") as HiddenField;
         this.memberRange.Grade        = this._gameInfo.ApplyMembers;
         this.memberRange.CustomGroup  = this._gameInfo.CustomGroup;
         this.memberRange.DefualtGroup = this._gameInfo.DefualtGroup;
         field.Value  = this.memberRange.Grade;
         field2.Value = this.memberRange.DefualtGroup;
         field3.Value = this.memberRange.CustomGroup;
         switch (this._gameInfo.PlayType)
         {
         }
         if ((string.Equals(this._gameInfo.ApplyMembers, "0") && string.Equals(this._gameInfo.DefualtGroup, "0")) && string.Equals(this._gameInfo.CustomGroup, "0"))
         {
             this.isAllCheck = true;
         }
         this.txtGameUrl.Text = this._gameInfo.GameUrl;
     }
     foreach (MemberGradeInfo info in MemberHelper.GetMemberGrades())
     {
         MemberGradeItem item = new MemberGradeItem();
         if (!this.isAllCheck)
         {
             item.IsCheck = this.IsCheck(info.GradeId.ToString());
         }
         else
         {
             item.IsCheck = this.isAllCheck;
         }
         item.Name    = info.Name;
         item.GradeId = info.GradeId.ToString();
         this._memberGrades.Add(item);
     }
 }
Esempio n. 2
0
        private void BindDate()
        {
            if (this._gameInfo != null)
            {
                this.memberCheck                      = (this._gameInfo.MemberCheck == 1);
                this.hfGameId.Value                   = this._gameInfo.GameId.ToString();
                this.txtGameTitle.Text                = this._gameInfo.GameTitle;
                this.dateBeginTime.SelectedDate       = new System.DateTime?(this._gameInfo.BeginTime);
                this.dateEndTime.SelectedDate         = new System.DateTime?(this._gameInfo.EndTime);
                this.txtDescription.Text              = this._gameInfo.Description.Replace("<br/>", "\n");
                this.txtNeedPoint.Text                = this._gameInfo.NeedPoint.ToString();
                this.txtGivePoint.Text                = this._gameInfo.GivePoint.ToString();
                this.cbOnlyGiveNotPrizeMember.Checked = this._gameInfo.OnlyGiveNotPrizeMember;
                this.txtLimitEveryDay.Text            = this._gameInfo.LimitEveryDay.ToString();
                this.txtMaximumDailyLimit.Text        = this._gameInfo.MaximumDailyLimit.ToString();
                System.Web.UI.WebControls.HiddenField hiddenField  = this.memberRange.FindControl("txt_Grades") as System.Web.UI.WebControls.HiddenField;
                System.Web.UI.WebControls.HiddenField hiddenField2 = this.memberRange.FindControl("txt_DefualtGroup") as System.Web.UI.WebControls.HiddenField;
                System.Web.UI.WebControls.HiddenField hiddenField3 = this.memberRange.FindControl("txt_CustomGroup") as System.Web.UI.WebControls.HiddenField;
                this.memberRange.Grade        = this._gameInfo.ApplyMembers;
                this.memberRange.CustomGroup  = this._gameInfo.CustomGroup;
                this.memberRange.DefualtGroup = this._gameInfo.DefualtGroup;
                hiddenField.Value             = this.memberRange.Grade;
                hiddenField2.Value            = this.memberRange.DefualtGroup;
                hiddenField3.Value            = this.memberRange.CustomGroup;
                switch (this._gameInfo.PlayType)
                {
                case PlayType.一天一次:
                case PlayType.一次:
                case PlayType.一天两次:
                case PlayType.两次:
IL_21C:
                    if (string.Equals(this._gameInfo.ApplyMembers, "0") && string.Equals(this._gameInfo.DefualtGroup, "0") && string.Equals(this._gameInfo.CustomGroup, "0"))
                    {
                        this.isAllCheck = true;
                    }
                    this.txtGameUrl.Text = this._gameInfo.GameUrl;
                    goto IL_2C6;
                }
                //goto IL_21C;
            }
            string text = System.Guid.NewGuid().ToString().Replace("-", "");

            this.hfKeyWord.Value = text;
            string text2 = this.CreateGameUrl(text);

            this.txtGameUrl.Text = text2;
IL_2C6:
            System.Collections.Generic.IList <MemberGradeInfo> memberGrades = MemberHelper.GetMemberGrades();
            foreach (MemberGradeInfo current in memberGrades)
            {
                MemberGradeItem memberGradeItem = new MemberGradeItem();
                if (!this.isAllCheck)
                {
                    memberGradeItem.IsCheck = this.IsCheck(current.GradeId.ToString());
                }
                else
                {
                    memberGradeItem.IsCheck = this.isAllCheck;
                }
                memberGradeItem.Name    = current.Name;
                memberGradeItem.GradeId = current.GradeId.ToString();
                this._memberGrades.Add(memberGradeItem);
            }
        }
Esempio n. 3
0
        private void BindDate()
        {
            if (this._gameInfo == null)
            {
                string keyWord = Guid.NewGuid().ToString().Replace("-", "");
                this.hfKeyWord.Value = keyWord;
                string str2 = this.CreateGameUrl(keyWord);
                this.txtGameUrl.Text = str2;
            }
            else
            {
                this.hfGameId.Value                   = this._gameInfo.GameId.ToString();
                this.txtGameTitle.Text                = this._gameInfo.GameTitle;
                this.dateBeginTime.SelectedDate       = new DateTime?(this._gameInfo.BeginTime);
                this.dateEndTime.SelectedDate         = new DateTime?(this._gameInfo.EndTime);
                this.txtDescription.Text              = this._gameInfo.Description.Replace("<br/>", "\n");
                this.txtNeedPoint.Text                = this._gameInfo.NeedPoint.ToString();
                this.txtGivePoint.Text                = this._gameInfo.GivePoint.ToString();
                this.cbOnlyGiveNotPrizeMember.Checked = this._gameInfo.OnlyGiveNotPrizeMember;
                this.rbdPlayType0.Checked             = false;
                this.rbdPlayType1.Checked             = false;
                this.rbdPlayType2.Checked             = false;
                this.rbdPlayType3.Checked             = false;
                switch (this._gameInfo.PlayType)
                {
                case PlayType.一天一次:
                    this.rbdPlayType0.Checked = true;
                    break;

                case PlayType.一次:
                    this.rbdPlayType1.Checked = true;
                    break;

                case PlayType.一天两次:
                    this.rbdPlayType2.Checked = true;
                    break;

                case PlayType.两次:
                    this.rbdPlayType3.Checked = true;
                    break;
                }
                if (string.Equals(this._gameInfo.ApplyMembers, "0"))
                {
                    this.isAllCheck = true;
                }
                this.txtGameUrl.Text = this._gameInfo.GameUrl;
            }
            foreach (MemberGradeInfo info in MemberHelper.GetMemberGrades(this.wid))
            {
                MemberGradeItem item = new MemberGradeItem();
                if (!this.isAllCheck)
                {
                    item.IsCheck = this.IsCheck(info.GradeId.ToString());
                }
                else
                {
                    item.IsCheck = this.isAllCheck;
                }
                item.Name    = info.Name;
                item.GradeId = info.GradeId.ToString();
                this._memberGrades.Add(item);
            }
        }