Car/Admin/User/AddPeople.aspx.cs

(开头部分) 4KB

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

using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Car.Admin.User
{
    public partial class AddPeople : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                if (Request["InfoID"] != null)
                {
                    DataTable dt = new BLL.Models.Car().GetContentInfo(int.Parse(Request["InfoID"].ToString()), "UserTable");
                    loginname.Value = dt.Rows[0]["LoginName"].ToString();
                    loginname.Disabled = true;
                    PicHidden1.Value = dt.Rows[0]["Pic"].ToString();
                    username.Value = dt.Rows[0]["UserName"].ToString(); 
                    tel.Value = dt.Rows[0]["Tel"].ToString();
                    for (int i = 0; i < Sex.Items.Count; i++) 
                    {
                        if (Sex.Items[i].Value == dt.Rows[0]["Sex"].ToString()) 
                        {
                            Sex.Items[i].Selected = true;
                        }
                    }
                    carid.Value = dt.Rows[0]["CarID"].ToString();
                    Birthday.Value = dt.Rows[0]["Birthday"].ToString();
                    Literal1.Text = "编辑会员信息";
                }
                else
                {
                    Literal1.Text = "添加会员信息";
                }
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (Request["InfoID"] == null)
            {
                Hashtable ht = new Hashtable();
                ht.Add("LoginName", loginname.Value);
                ht.Add("UserName", username.Value);
                ht.Add("Tel", tel.Value);
                ht.Add("BirthDay", Birthday.Value);
                ht.Add("CarID", carid.Value);
                ht.Add("Sex", Sex.Items[Sex.SelectedIndex].Value);
                ht.Add("UserType", "会员");
                ht.Add("Pic", PicHidden1.Value);
                ht.Add("Flag", 1);
                if (new BLL.Models.Car().AddContent("UserTable", ht) > 0)
                {
                    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "layer.alert('操作成功!', {icon: 1,kin: 'layer-ext-moon',closeBtn: 0}, function () { location.href = 'PeopleManage.aspx';})", true);
后面还有 36 行代码,购买后查看完整代码

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

AI 解读 AI

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

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