protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "user/UserManage.aspx'>用户管理</a></li><li><a href='InviteCodeList.aspx'>邀请码列表</a></li><li>添加邀请码</li>");
         Format_T.Text        = SiteConfig.UserConfig.InviteFormat;
         Group_Rad.DataSource = gpBll.Sel();
         Group_Rad.DataBind();
         Group_Rad.SelectedValue = SiteConfig.UserConfig.InviteJoinGroup.ToString();
     }
 }
示例#2
0
        //public void DownFile(string url)
        //{
        //    SafeSC.DownFile(url);
        //}
        //用户可自由变换所属会员组,仅VIP组可访问该页面(前端判断)
        public IActionResult ChangeGroup()
        {
            M_Group gpMod = gpBll.SelReturnModel(mu.GroupID);
            M_Temp  tpMod = tpBll.SelModelByUid(mu.UserID, 13);

            if (gpMod.VIPGroup != 1 && tpMod == null)
            {
                return(WriteErr("你所在的会员组无权使用该功能页"));
            }
            ViewBag.gpMod = gpMod;
            ViewBag.gpdt  = gpBll.Sel();
            return(View());
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Pid < 0)
         {
             function.WriteErrMsg("参数不正确");
         }
         DataTable dt = gpBll.Sel(Pid);
         dt.Columns["GroupID"].ColumnName = "ID";
         RPT.DataSource = dt;
         RPT.DataBind();
         Call.HideBread(Master);
     }
 }
示例#4
0
        private void MyBind()
        {
            M_Shop_RegionPrice regionMod = regionBll.SelModelByGuid(Guid);

            if (regionMod == null)
            {
                function.WriteErrMsg("无匹配的区域价格");
            }
            //ja regionDT = JsonConvert.DeserializeObject<DataTable>(dt.Rows[0]["Info"].ToString());
            List <M_RegionPrice_Price> list  = JsonConvert.DeserializeObject <List <M_RegionPrice_Price> >(regionMod.Info);
            M_RegionPrice_Price        model = list.FirstOrDefault(p => p.region.Equals(Region));

            Region_L.Text        = model.region;
            PriceDT              = model.price;
            Group_RPT.DataSource = gpBll.Sel();
            Group_RPT.DataBind();
        }
 private void MyBind()
 {
     Group_RPT.DataSource = groupBll.Sel();
     Group_RPT.DataBind();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!B_ARoleAuth.Check(ZLEnum.Auth.other, "SiteConfig"))
            {
                function.WriteErrMsg("没有权限进行此项操作");
            }
            m_RegFields = new Dictionary <string, ListItem>();
            m_RegFields.Add("Permissions", new ListItem("真实姓名", "Permissions"));
            m_RegFields.Add("UserSex", new ListItem("性别", "UserSex"));
            m_RegFields.Add("Birthday", new ListItem("出生日期", "Birthday"));
            m_RegFields.Add("Address", new ListItem("联系地址", "Address"));
            m_RegFields.Add("ZipCode", new ListItem("邮政编码", "ZipCode"));
            m_RegFields.Add("Homepage", new ListItem("个人主页", "Homepage"));
            m_RegFields.Add("QQ", new ListItem("QQ号码", "QQ"));
            // m_RegFields.Add("ICQ", new ListItem("ICQ号码", "ICQ"));
            //m_RegFields.Add("MSN", new ListItem("MSN帐号", "MSN"));
            //m_RegFields.Add("UC", new ListItem("UC号码", "UC"));
            //m_RegFields.Add("Yahoo", new ListItem("雅虎通帐号", "Yahoo"));
            m_RegFields.Add("OfficePhone", new ListItem("办公电话", "OfficePhone"));
            m_RegFields.Add("HomePhone", new ListItem("家庭电话", "HomePhone"));
            m_RegFields.Add("Mobile", new ListItem("手机号码", "Mobile"));
            m_RegFields.Add("Fax", new ListItem("传真号码", "Fax"));
            //m_RegFields.Add("PHS", new ListItem("小灵通", "PHS"));
            m_RegFields.Add("IDCard", new ListItem("身份证号码", "IDCard"));
            m_RegFields.Add("salt", new ListItem("用户头像", "UserFace"));
            m_RegFields.Add("FaceWidth", new ListItem("头像宽度", "FaceWidth"));
            m_RegFields.Add("FaceHeight", new ListItem("头像高度", "FaceHeight"));
            m_RegFields.Add("Sign", new ListItem("签名档", "Sign"));
            m_RegFields.Add("Privacy", new ListItem("隐私设定", "Privacy"));
            m_RegFields.Add("Province", new ListItem("省市县", "Province"));
            //m_RegFields.Add("ParentUserID", new ListItem("推荐人", "ParentUserID"));
            m_RegFields.Add("ParentUser", new ListItem("推荐人", "ParentUser"));
            m_RegFields.Add("InvitCode", new ListItem("邀请码", "InvitCode"));

            //ZL_UserBaseField
            B_UserBaseField ufll    = new B_UserBaseField();
            DataTable       uftable = ufll.Select_All();

            if (uftable != null)
            {
                if (uftable.Rows.Count > 0)
                {
                    for (int c = 0; c < uftable.Rows.Count; c++)
                    {
                        string FieldName  = uftable.Rows[c]["FieldName"].ToString();
                        string FieldAlias = uftable.Rows[c]["FieldAlias"].ToString();
                        m_RegFields.Add(FieldName, new ListItem(FieldAlias, FieldName));
                    }
                }
            }

            if (!IsPostBack)
            {
                Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "user/UserManage.aspx'>用户管理</a></li><li>会员参数配置</li>" + Call.GetHelp(40));
                RadioButtonList1.Checked = SiteConfig.UserConfig.EnableUserReg;
                //会员注册默认状态
                UserValidateType_Rad.SelectedValue = SiteConfig.UserConfig.UserValidateType ? "0" : "1";
                //是否开启注册后Email验证
                rdoEmailCheck.Checked = SiteConfig.UserConfig.EmailCheckReg;
                //是否开启Email注册登录
                RadioButtonList2.Checked = SiteConfig.UserConfig.EmailRegis;
                //是否开启注册成功邮件提醒
                radioEmail.Checked = SiteConfig.UserConfig.EmailTell;
                //是否开启UserID登录
                radioUserID.Checked = SiteConfig.UserConfig.UserIDlgn;
                //是否开启手机注册
                radioMobile.Checked  = SiteConfig.UserConfig.MobileReg;
                MobileCodeNum_T.Text = SiteConfig.UserConfig.MobileCodeNum.ToString();
                function.Script(this, "SetRadVal('mobilecode_rad'," + SiteConfig.UserConfig.MobileCodeType + ");");

                RadioButtonList3.Checked = SiteConfig.UserConfig.AdminCheckReg;
                RadioButtonList5.Checked = SiteConfig.UserConfig.EnableCheckCodeOfReg;

                TextBox6.Text = SiteConfig.UserConfig.UserNameLimit.ToString();
                TextBox7.Text = SiteConfig.UserConfig.UserNameMax.ToString();
                TextBox8.Text = SiteConfig.UserConfig.UserNameRegDisabled;

                RadioButtonList6.Checked = SiteConfig.UserConfig.EnableCheckCodeOfLogin;
                RadioButtonList7.Checked = SiteConfig.UserConfig.EnableMultiLogin;
                //DisCuzNT.Checked = SiteConfig.UserConfig.DisCuzNT;
                string regFieldsMustFill   = SiteConfig.UserConfig.RegFieldsMustFill;
                string regFieldsSelectFill = SiteConfig.UserConfig.RegFieldsSelectFill;
                HdnRegFields_MustFill.Value   = regFieldsMustFill;
                HdnRegFields_SelectFill.Value = regFieldsSelectFill;

                List <string> list  = new List <string>();
                List <string> list2 = new List <string>();
                if (!string.IsNullOrEmpty(regFieldsMustFill))
                {
                    foreach (string str3 in regFieldsMustFill.Split(new char[] { ',' }))
                    {
                        list.Add(str3);
                        if (m_RegFields.ContainsKey(str3))
                        {
                            LitRegFields_MustFill.Items.Add(m_RegFields[str3]);
                        }
                    }
                }
                if (!string.IsNullOrEmpty(regFieldsSelectFill))
                {
                    foreach (string str4 in regFieldsSelectFill.Split(new char[] { ',' }))
                    {
                        list2.Add(str4);
                        if (m_RegFields.ContainsKey(str4))
                        {
                            LitRegFields_SelectFill.Items.Add(m_RegFields[str4]);
                        }
                    }
                }
                foreach (string str5 in m_RegFields.Keys)
                {
                    if (!list.Contains(str5) && !list2.Contains(str5))
                    {
                        LitRegFields.Items.Add(m_RegFields[str5]);
                    }
                }

                //TextBox12.Text = SiteConfig.UserConfig.EmailOfRegCheck;
                //txtEmailTell.Text = SiteConfig.UserConfig.EmailTellContent;
                txtMobileRegInfo.Text   = SiteConfig.UserConfig.MobileRegInfo;
                tb_CommentRule.Text     = SiteConfig.UserConfig.CommentRule.ToString();
                tb_InformationRule.Text = SiteConfig.UserConfig.InfoRule.ToString();
                tb_RecommandRule.Text   = SiteConfig.UserConfig.RecommandRule.ToString();
                txtzi.Text                         = SiteConfig.UserConfig.PresentPointAll.ToString();
                TxtPresentExp.Text                 = SiteConfig.UserConfig.PresentExp.ToString();
                TxtPresentMoney.Text               = SiteConfig.UserConfig.PresentMoney.ToString();
                TxtPresentPoint.Text               = SiteConfig.UserConfig.PresentPoint.ToString();
                TxtPresentValidNum.Text            = SiteConfig.UserConfig.PresentValidNum.ToString();
                DropPresentValidUnit.SelectedValue = SiteConfig.UserConfig.PresentValidUnit.ToString();
                TxtPresentExpPerLogin.Text         = SiteConfig.UserConfig.PresentExpPerLogin.ToString();
                SignPurse_T.Text                   = SiteConfig.UserConfig.SigninPurse.ToString();
                TxtMoneyExchangePoint.Text         = SiteConfig.UserConfig.MoneyExchangePointByMoney.ToString();
                TxtMoneyExchangeValidDay.Text      = SiteConfig.UserConfig.MoneyExchangeValidDayByMoney.ToString();
                TxtUserExpExchangePoint.Text       = SiteConfig.UserConfig.UserExpExchangePointByExp.ToString();
                TxtUserExpExchangeValidDay.Text    = SiteConfig.UserConfig.UserExpExchangeValidDayByExp.ToString();
                TxtCMoneyExchangePoint.Text        = SiteConfig.UserConfig.MoneyExchangePointByPoint.ToString();
                TxtCMoneyExchangeValidDay.Text     = SiteConfig.UserConfig.MoneyExchangeValidDayByValidDay.ToString();
                TxtCUserExpExchangePoint.Text      = SiteConfig.UserConfig.UserExpExchangePointByPoint.ToString();
                TxtCUserExpExchangeValidDay.Text   = SiteConfig.UserConfig.UserExpExchangeValidDayByValidDay.ToString();
                txtCMoneyExchangeDummyPurse.Text   = SiteConfig.UserConfig.MoneyExchangeDummyPurseByDummyPurse.ToString();
                txtMoneyExchangeDummyPurse.Text    = SiteConfig.UserConfig.MoneyExchangeDummyPurseByMoney.ToString();
                TxtPointName.Text                  = SiteConfig.UserConfig.PointName;
                TxtPointUnit.Text                  = SiteConfig.UserConfig.PointUnit;
                TxtCUserExpExchangePoints.Text     = SiteConfig.UserConfig.PointExp.ToString();
                TxtCUserExpExchangeMoney.Text      = SiteConfig.UserConfig.PointMoney.ToString();

                TxtCUserExpExchangeExp.Text        = SiteConfig.UserConfig.ChangeSilverCoinByExp.ToString();
                TxtCUserExpExchangeSilverCoin.Text = SiteConfig.UserConfig.PointSilverCoin.ToString();

                Agreement.SelectedValue = SiteConfig.UserConfig.Agreement;
                selPunch.Value          = SiteConfig.UserConfig.PunchType.ToString();
                txtPunch.Text           = SiteConfig.UserConfig.PunchVal.ToString();
                //txtEmailRegInfo.Text = SiteConfig.UserConfig.EmailRegInfo;
                //txtGetPassword.Text = SiteConfig.UserConfig.UserGetPasswordEmail;
                Txtintegral.Text           = SiteConfig.UserConfig.Integral.ToString();
                TxtIntegralPercentage.Text = SiteConfig.UserConfig.IntegralPercentage.ToString();
                #region 用户名注册规则
                string userregrule = SiteConfig.UserConfig.RegRule;

                if (userregrule != null && userregrule != "")
                {
                    if (userregrule.IndexOf(',') > -1)
                    {
                        string[] rulearr = userregrule.Split(',');
                        for (int ii = 0; ii < rulearr.Length; ii++)
                        {
                            if (rulearr[ii].ToString() == "1")
                            {
                                RegRule.Items[0].Selected = true;
                            }

                            if (rulearr[ii].ToString() == "2")
                            {
                                RegRule.Items[1].Selected = true;
                            }

                            if (rulearr[ii].ToString() == "3")
                            {
                                RegRule.Items[2].Selected = true;
                            }
                        }
                    }
                    else
                    {
                        if (userregrule.ToString() == "1")
                        {
                            RegRule.Items[0].Selected = true;
                        }

                        if (userregrule.ToString() == "2")
                        {
                            RegRule.Items[1].Selected = true;
                        }

                        if (userregrule.ToString() == "3")
                        {
                            RegRule.Items[2].Selected = true;
                        }
                    }
                }
                if (SiteConfig.UserConfig.RegRule != null)
                {
                    RegRule.SelectedValue = SiteConfig.UserConfig.RegRule.ToString();
                }
                #endregion
                #region 可使用站内短信用户组
                B_Group b_Group = new B_Group();
                MessageGroup.DataSource = b_Group.GetGroupList();
                MessageGroup.DataBind();
                string MessageGroupStr = SiteConfig.UserConfig.MessageGroup;
                if (!string.IsNullOrEmpty(MessageGroupStr))
                {
                    if (MessageGroupStr.IndexOf(",") > -1)
                    {
                        foreach (string Mstr in MessageGroupStr.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries))
                        {
                            if (MessageGroup.Items.FindByValue(Mstr) != null)
                            {
                                MessageGroup.Items.FindByValue(Mstr).Selected = true;
                            }
                        }
                    }
                }
                ////用户统计字段
                //foreach (ListItem item in m_RegFields.Values)
                //{
                //    UserFields_list.Items.Add(item);
                //}
                #endregion
                RadioButtonList10.SelectedValue = SiteConfig.UserConfig.PromotionType.ToString();
                RadioButtonList10_SelectedIndexChanged(null, null);
                //CountFields_Hid.Value = SiteConfig.UserConfig.CountUserField;
                txtPromotion.Text = SiteConfig.UserConfig.Promotion.ToString();
                try
                {
                    //邀请码配置
                    InviteCode_T.Text             = SiteConfig.UserConfig.InviteCodeCount.ToString();
                    InviteFormat_T.Text           = SiteConfig.UserConfig.InviteFormat;
                    InviteJoinGroup_DP.DataSource = gpBll.Sel();
                    InviteJoinGroup_DP.DataBind();
                    InviteJoinGroup_DP.SelectedValue = SiteConfig.UserConfig.InviteJoinGroup.ToString();
                }
                catch (Exception ex) { ZLLog.L(ex.Message); }

                MyBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <M_UserInfo> Dinfo = new List <M_UserInfo>();
                List <M_Uinfo>    Iinfo = new List <M_Uinfo>();
                mu = buser.SelReturnModel(UserID);
                if (mu.IsNull)
                {
                    function.WriteErrMsg("用户[" + UserID + "]不存在");
                }
                basemu = buser.GetUserBaseByuserid(UserID);
                //判断是否是认证用户
                ApproveFailure_B.Visible = (mu.State == 2);
                if (DataConvert.CLng(mu.ParentUserID) > 0)
                {
                    pmu = buser.SelReturnModel(Convert.ToInt32(mu.ParentUserID));
                }
                Dinfo.Add(mu);
                Iinfo.Add(basemu);
                UInfo_RPT.DataSource = Dinfo;
                UInfo_RPT.DataBind();
                BaseMU_RPT.DataSource = Iinfo;
                BaseMU_RPT.DataBind();
                #region 增加模型选项卡
                DataTable dtModelUser = bm.GetListUser();
                string    labstr      = "";
                int       tabnum      = 3;
                for (int i = 0; i < dtModelUser.Rows.Count; i++)
                {
                    string    tablename = dtModelUser.Rows[i]["TableName"].ToString();
                    DataTable info      = bmf.SelectTableName(tablename, "userid=" + UserID);
                    if (info != null && info.Rows.Count > 0)
                    {
                        int       modelid    = Convert.ToInt32(dtModelUser.Rows[i]["ModelId"].ToString());
                        DataTable modelfiled = bmf.GetModelFieldList(modelid);
                        labstr      += "<td id=\"TabTitle" + (tabnum) + ("\" class=\"tabtitle\" onclick=\"ShowTabss(" + (tabnum)) + ")\">\r";
                        labstr      += dtModelUser.Rows[i]["ModelName"].ToString() + "\r";
                        labstr      += ("</td>\r");
                        tabTitles   += ", \"TabTitle" + (tabnum) + "\"";
                        tabs        += ", \"Tabs" + (tabnum) + "\"";
                        ltlTab.Text += "<tbody id=\"Tabs" + (tabnum) + "\" style=\"display: none\">";
                        ltlTab.Text += "<tr>";
                        ltlTab.Text += "<td colspan=\"4\">";
                        ltlTab.Text += " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">";

                        for (int k = 0; k < modelfiled.Rows.Count; k++)
                        {
                            if (k % 2 == 0)
                            {
                                ltlTab.Text += "<tr class=\"tdbg\">\r";
                            }
                            ltlTab.Text += "<td class=\"tdbgleft\" style=\"width: 15%; height: 22px\" align=\"right\">\r";
                            ltlTab.Text += modelfiled.Rows[k]["FieldAlias"].ToString() + "\r";
                            ltlTab.Text += "</td>\r";
                            ltlTab.Text += "<td style=\"width: 35%; height: 22px\" align=\"left\">\r";
                            ltlTab.Text += info.Rows[0][modelfiled.Rows[k]["FieldName"].ToString()].ToString() + "\r";
                            ltlTab.Text += "</td>\r";
                            if (k % 2 != 0)
                            {
                                ltlTab.Text += "</tr>\r";
                            }
                        }
                        ltlTab.Text += " </table>";
                        ltlTab.Text += " </td>";
                        ltlTab.Text += " </tr>";
                        ltlTab.Text += "</tbody>";
                        tabnum++;
                    }
                }
                #endregion
                tbSign.Text                = basemu.Sign;
                txtDeadLine.Text           = mu.DeadLine.ToString();//有效期截止时间
                txtCerificateDeadLine.Text = mu.CerificateDeadLine.ToString();
                Privancy.Text              = tbPrivacy.SelectedValue.ToString();
                Privancy.Text              = tbPrivacy.Items[basemu.Privating].Text;
                DataTable dtuser2 = buser.GetUserBaseByuserid(UserID.ToString());
                lblHtml.Text = bub.GetUpdateHtml(dtuser2);
                BindUserRole(mu);
                AuthorDT = null;
                //-----------------
                try
                {
                    DataTable gpdt = gpBll.Sel();
                    UserGroup_DP.DataSource = gpdt;
                    UserGroup_DP.DataBind();
                    UserGroup_DP.Items.Insert(0, new ListItem("未分组", "0"));
                    UserGroup_DP.SelectedValue = mu.GroupID.ToString();
                }
                catch { UserGroup_DP.Items[0].Text = "会员组[" + mu.GroupID + "]不存在"; }
                M_User_BindPro ubpMod = ubpBll.SelModelByUid(UserID);
                if (ubpMod != null && !string.IsNullOrEmpty(ubpMod.ProIDS))
                {
                    UPProDT = proBll.SelByIDS(StrHelper.PureIDSForDB(ubpMod.ProIDS));
                    string pids = "", nids = "";
                    foreach (DataRow dr in UPProDT.Rows)
                    {
                        pids += dr["ID"] + ",";
                    }
                    foreach (DataRow dr in UPProDT.Rows)
                    {
                        nids += dr["NodeID"] + ",";
                    }
                    nids = nids.TrimEnd(','); pids.TrimEnd(',');
                    DataTable nodedt = nodeBll.SelByIDS(nids);
                    UPRONode_RPT.DataSource = nodedt;
                    UPRONode_RPT.DataBind();
                    UProIDS_Hid.Value = StrHelper.IdsFormat(pids);
                }
                if (DataConvert.CStr(Request["show"]) == "diag")
                {
                    Call.HideBread(Master);
                }
                else
                {
                    Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='AdminManage.aspx'>用户管理</a></li><li><a href='UserManage.aspx'>会员管理</a></li><li class='active'><a href='" + Request.RawUrl + "'>会员信息</a> 当前用户:" + mu.UserName + "</li>");
                }
            }
        }