User/UpdateMember.aspx.cs

(开头部分) 4KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Text.RegularExpressions;

public partial class User_UpdateMember : System.Web.UI.Page
{
    UserInfoClass uiObj = new UserInfoClass();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        { 
         GetMIByID();
        }
           
    }
    protected void GetMIByID()
    {
        if (Convert.ToString(Session["UID"]) == "")
        {
            Response.Redirect("index.aspx");
        }
        else
         { 
                DataSet ds = new DataSet();
                ds = uiObj.ReturnUIDsByID(Convert.ToInt32(Session["UID"].ToString()), "UserInfo");
                txtName.Text=ds.Tables["UserInfo"].Rows[0][1].ToString();
                txtPassword.Text=ds.Tables["UserInfo"].Rows[0][3].ToString ();
               
                if(Convert.ToBoolean(ds.Tables["UserInfo"].Rows[0][2])==true )
                {
                    ddlSex.SelectedIndex =0;
                }
                else 
                {
                    ddlSex.SelectedIndex = 1;
                }
                txtTrueName.Text =ds.Tables["UserInfo"].Rows[0][4].ToString ();
                ddlCity.SelectedItem.Text =ds.Tables["UserInfo"].Rows [0][9].ToString ();
                txtAddress.Text=ds.Tables["UserInfo"].Rows[0][10].ToString ();
                txtPostCode.Text =ds.Tables["UserInfo"].Rows[0][11].ToString();
                txtPhone.Text=ds.Tables["UserInfo"].Rows[0][7].ToString ();
                txtEmail.Text = ds.Tables["UserInfo"].Rows[0][8].ToString();
               
        }
    }
    protected void btnUpdate_Click(object sender, EventArgs e)
    {
        if (txtName.Text.Trim() == "" && txtPassword.Text.Trim() == "" && txtAddress.Text.Trim() == "" && txtPostCode.Text.Trim() == "" && txtPassword.Text.Trim() == "")
        {
            Response.Write("<script>alert('请输入完整信息!');location='javascript:history.go(-1)';</script>");
        }
后面还有 61 行代码,解锁后查看完整代码

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

AI 解读

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

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