BBSWeb/Manage/Users/UserAdd.aspx.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Web;
using Winsteps.Validator;
using BaseConfig;
using System.Data;
using BBS.Model;
using BBS.BLL;
using WebApp;

public partial class UserAdd : System.Web.UI.Page
{
    public X_UserInfo u;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session[SessionKey.USER] == null)
            {
                Server.Transfer("~/login.htm");
                return;
            }
            WinVal WinValInstance = new WinVal();
            WinValInstance.ValStyle = "toppoptip";
            WinValInstance.SetValidator();

            string strWhere = " ParentId = 0 ";
            string cols = "Id,Title,ParentId";
            DataTable dt = BaseConfig.BaseBLL.Pager.GetPager(10, 1, strWhere, "Id", "T_Agents", cols);
            repAgent.DataSource = dt;
            repAgent.DataBind();

            int uid = StringUtil.GetIntValue(HttpContext.Current.Request["id"]);
            if (uid > 0)
            {
                u = X_UserInfoManager.GetUserById(uid);
                if (u != null)
                {
                    txtName.Value = u.UserName;
                    txtPhone.Value = u.Phone;
                    txtMobile.Value = u.Mobile;
                    txtAddr.Value = u.Address;
                    txtMail.Value = u.Email;
                    txtCreateDate.Value = u.EntryTime.ToShortDateString();
                    if (u.Sex != "")
                    {
                        if (u.Sex == "男")
                            rdoBoy.Checked = true;
                        else
                            rdoGirl.Checked = true;
                    }
                    else
                        rdoBoy.Checked = true;
                }
            }
            else
            {
                u = (X_UserInfo)Session[SessionKey.USER];
                txtCreateDate.Value = DateTime.Now.ToString("yyyy-MM-dd");
            }
        }
后面还有 153 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。