Ejemplo n.º 1
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (IntParam > 0)
                {
                    AccountsInfo model = FacadeManage.aideAccountsFacade.GetAccountInfoByUserId(IntParam);
                    if (model != null)
                    {
                        int logonTimes = model.WebLogonTimes + model.GameLogonTimes;
                        CtrlHelper.SetText(ltSpread,
                                           model.SpreaderID > 0 ? GetSpreaderDesc(model.SpreaderID, model.UserID) : "无推广人");
                        CtrlHelper.SetText(ltAgent, model.AgentID > 0 ? "代理商" : "非代理商");
                        CtrlHelper.SetText(ltGameID, model.GameID.ToString());
                        CtrlHelper.SetText(ltGameLogonTimes, model.GameLogonTimes.ToString());
                        CtrlHelper.SetText(ltLastLogonDate,
                                           logonTimes > 0 ? model.LastLogonDate.ToString("yyyy-MM-dd HH:mm:ss") : "");
                        CtrlHelper.SetText(ltLastLogonIP, logonTimes > 0 ? model.LastLogonIP : "");
                        CtrlHelper.SetText(ltLastLogonMachine, model.LastLogonMachine);
                        CtrlHelper.SetText(ltNickName, model.NickName);
                        CtrlHelper.SetText(ltOnLineTimeCount, Fetch.ConverTimeToDHMS(model.OnLineTimeCount));
                        CtrlHelper.SetText(ltPlayTimeCount, Fetch.ConverTimeToDHMS(model.PlayTimeCount));
                        CtrlHelper.SetText(ltRegisterDate, model.RegisterDate.ToString("yyyy-MM-dd HH:mm:ss"));
                        CtrlHelper.SetText(ltRegisterIP, model.RegisterIP);
                        CtrlHelper.SetText(ltRegisterMachine, model.RegisterMachine);
                        CtrlHelper.SetText(ltRegisterOrigin, GetRegisterOrigin(model.RegisterOrigin));
                        CtrlHelper.SetText(ltWebLogonTimes, model.WebLogonTimes.ToString());
                        CtrlHelper.SetText(ltLogonSpacingTime,
                                           logonTimes > 0
                                ? (Fetch.GetTimeSpan(Convert.ToDateTime(model.LastLogonDate), DateTime.Now) + "前")
                                : "");
                        CtrlHelper.SetText(ltRegSpacingTime,
                                           Fetch.GetTimeSpan(Convert.ToDateTime(model.RegisterDate), DateTime.Now) + "前");
                        CtrlHelper.SetText(ltSex, model.Gender == 1 ? "男" : "女");

                        CtrlHelper.SetText(txtRealName, model.Compellation);
                        CtrlHelper.SetText(txtCardNum, model.PassPortID);
                        CtrlHelper.SetText(txtUnderWrite, model.UnderWrite);

                        ckbNullity.Checked = model.Nullity == 1 ? true : false;
                        ckbLock.Checked    = model.MoorMachine == 1 ? true : false;

                        imgFace.ImageUrl = FacadeManage.aideAccountsFacade.GetAccountsFaceById(model.CustomID);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void BindData( )
        {
            if (IntParam <= 0)
            {
                return;
            }

            //获取信息
            AccountsInfo model = aideAccountsFacade.GetAccountInfoByUserID(IntParam);

            if (model == null)
            {
                MessageBox("用户信息不存在");
                return;
            }
            //CtrlHelper.SetText( ltUserID, model.UserID.ToString( ) );
            CtrlHelper.SetText(ltGameID, model.GameID.ToString( ));
            CtrlHelper.SetText(ltRegAccounts, model.RegAccounts.Trim( ));
            CtrlHelper.SetText(txtAccount, model.Accounts.Trim( ));
            CtrlHelper.SetText(txtNickName, model.NickName.Trim( ));
            CtrlHelper.SetText(litCompellation, model.Compellation);
            //CtrlHelper.SetText(litUserMedal, model.UserMedal.ToString());

            CtrlHelper.SetText(txtUnderWrite, model.UnderWrite.Trim( ));
            CtrlHelper.SetCheckBoxValue(ckbNullity, model.Nullity);
            CtrlHelper.SetCheckBoxValue(ckbStunDown, model.StunDown);
            CtrlHelper.SetText(txtExperience, model.Experience.ToString( ).Trim( ));
            CtrlHelper.SetText(txtPresent, model.Present.ToString( ).Trim( ));
            CtrlHelper.SetText(txtLoveLiness, model.LoveLiness.ToString( ).Trim( ));
            CtrlHelper.SetText(ltProtectID, model.ProtectID > 0 ? "<span style=\"font-weight: bold;\">已申请</span>&nbsp;<a href=\"javascript:openWindow('AccountsProtectInfo.aspx?param=" + model.ProtectID + "',580,320)\" class=\"l1\">点击查看</a>" : "未申请");
            CtrlHelper.SetText(ltMemberInfo, GetMemberName(model.MemberOrder) + (model.MemberOrder == 0 ? "" : "&nbsp;&nbsp;&nbsp;&nbsp;到期时间:" + model.MemberSwitchDate.ToString("yyyy-MM-dd mm:HH:ss")));
            if (model.MemberOrder != 0)
            {
                plMemberList.Visible = true;
            }
            strFaceID = model.FaceID.ToString( );
            ddlGender.SelectedValue      = model.Gender.ToString( );
            rdoMoorMachine.SelectedValue = model.MoorMachine.ToString( );
            //用户权限
            int intUserRight = model.UserRight;

            if (ckbUserRight.Items.Count > 0)
            {
                foreach (ListItem item in ckbUserRight.Items)
                {
                    item.Selected = int.Parse(item.Value) == (intUserRight & int.Parse(item.Value));
                }
            }
            //玩家身份
            ddlMasterOrder.SelectedValue = model.MasterOrder.ToString( ).Trim( );
            //用户管理权限
            int intMasterRight = model.MasterRight;

            if (ckbMasterRight.Items.Count > 0)
            {
                foreach (ListItem item in ckbMasterRight.Items)
                {
                    item.Selected = int.Parse(item.Value) == (intMasterRight & int.Parse(item.Value));
                }
            }
            //机器人
            CtrlHelper.SetCheckBoxValue(chkIsAndroid, model.IsAndroid);

            //登录、注册信息
            CtrlHelper.SetText(ltWebLogonTimes, model.WebLogonTimes.ToString( ));
            CtrlHelper.SetText(ltGameLogonTimes, model.GameLogonTimes.ToString( ));
            CtrlHelper.SetText(ltLastLogonDate, model.LastLogonDate.ToString("yyyy-MM-dd HH:mm:ss"));
            CtrlHelper.SetText(ltLogonSpacingTime, Fetch.GetTimeSpan(Convert.ToDateTime(model.LastLogonDate), DateTime.Now));
            CtrlHelper.SetText(ltLastLogonIP, model.LastLogonIP.ToString( ));
            CtrlHelper.SetText(ltLogonIPInfo, IPQuery.GetAddressWithIP(model.LastLogonIP.ToString( )));
            CtrlHelper.SetText(ltLastLogonMachine, model.LastLogonMachine.ToString( ));
            CtrlHelper.SetText(ltRegisterDate, model.RegisterDate.ToString("yyyy-MM-dd HH:mm:ss"));
            CtrlHelper.SetText(ltRegisterIP, model.RegisterIP.ToString( ));
            CtrlHelper.SetText(ltRegIPInfo, IPQuery.GetAddressWithIP(model.RegisterIP.ToString( )));
            CtrlHelper.SetText(ltRegisterMachine, model.RegisterMachine.ToString( ));
            CtrlHelper.SetText(ltOnLineTimeCount, Fetch.ConverTimeToDHMS(model.OnLineTimeCount));
            CtrlHelper.SetText(ltPlayTimeCount, Fetch.ConverTimeToDHMS(model.PlayTimeCount));

            //密保卡信息
            //PasswordCard pc = new PasswordCard( );
            if (model.PasswordID != 0)
            {
                LiteralPasswordCard.Text = "<span style=\"font-weight: bold;\">已绑定</span>";
                spanPasswordCard.Visible = true;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 页面加载
        /// </summary>
        protected void Page_Load(object sender, EventArgs e)
        {
            base.moduleID = 100;
            if (!IsPostBack)
            {
                if (IntParam > 0)
                {
                    AccountsInfo model = FacadeManage.aideAccountsFacade.GetAccountInfoByUserId(IntParam);
                    if (model != null)
                    {
                        DropDownList2.Items.Clear();
                        string cfg = FacadeManage.aideNativeWebFacade.GetConfigInfo(3).Field5;
                        if (cfg == null)
                        {
                            return;
                        }
                        DropDownList2.Items.Add(new ListItem("无", "0"));
                        string[] strList = cfg.Split(',');
                        for (int i = 0; i < strList.Length; ++i)
                        {
                            DropDownList2.Items.Add(new ListItem(strList[i], (i + 1).ToString()));
                        }
                        DropDownList2.SelectedValue = model.RankID.ToString();

                        DropDownList1.SelectedValue = model.BankType.ToString();
                        int logonTimes = model.WebLogonTimes + model.GameLogonTimes;
                        //CtrlHelper.SetText(ltAgent, model.AgentID > 0 ? "代理" : "非代理");
                        CtrlHelper.SetText(ltGameID, model.GameID.ToString());
                        CtrlHelper.SetText(ltGameLogonTimes, model.GameLogonTimes.ToString());
                        CtrlHelper.SetText(ltLastLogonDate,
                                           logonTimes > 0 ? model.LastLogonDate.ToString("yyyy-MM-dd HH:mm:ss") : "");
                        CtrlHelper.SetText(ltLastLogonIP, logonTimes > 0 ? model.LastLogonIP : "");
                        CtrlHelper.SetText(ltLastLogonMachine, model.LastLogonMachine);
                        CtrlHelper.SetText(ltNickName, model.NickName);
                        CtrlHelper.SetText(ltOnLineTimeCount, Fetch.ConverTimeToDHMS(model.OnLineTimeCount));
                        CtrlHelper.SetText(ltPlayTimeCount, Fetch.ConverTimeToDHMS(model.PlayTimeCount));
                        CtrlHelper.SetText(ltRegisterDate, model.RegisterDate.ToString("yyyy-MM-dd HH:mm:ss"));
                        CtrlHelper.SetText(ltRegisterIP, model.RegisterIP);
                        CtrlHelper.SetText(ltRegisterMachine, model.RegisterMachine);
                        CtrlHelper.SetText(ltRegisterOrigin, GetRegisterOrigin(model.RegisterOrigin));
                        CtrlHelper.SetText(ltWebLogonTimes, model.WebLogonTimes.ToString());
                        CtrlHelper.SetText(ltLogonSpacingTime,
                                           logonTimes > 0
                                ? (Fetch.GetTimeSpan(Convert.ToDateTime(model.LastLogonDate), DateTime.Now) + "前")
                                : "");
                        CtrlHelper.SetText(ltRegSpacingTime,
                                           Fetch.GetTimeSpan(Convert.ToDateTime(model.RegisterDate), DateTime.Now) + "前");
                        CtrlHelper.SetText(ltSex, model.Gender == 1 ? "男" : "女");

                        CtrlHelper.SetText(txtRealName, model.Compellation);
                        CtrlHelper.SetText(txtPhoneNum, model.RegisterMobile);
                        CtrlHelper.SetText(TextAli, model.AliAccount);
                        CtrlHelper.SetText(TextBank, model.BankAccount);
                        CtrlHelper.SetText(txtUnderWrite, model.UnderWrite);

                        //ckbNullity.Checked = model.Nullity == 1 ? true : false;
                        //ckbLock.Checked = model.MoorMachine == 1 ? true : false;

                        imgFace.ImageUrl = FacadeManage.aideAccountsFacade.GetAccountsFaceById(model.CustomID);
                    }
                }
            }
        }