JobsOnline/Account/frmRegister.aspx.cs

(开头部分) 3KB

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

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

public partial class Account_frmRegister : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string tempstr = "";
            tempstr = (Request.QueryString["type"] == null) ? "" : Request.QueryString["type"].ToString();
            hfType.Value = tempstr;
            hfid.Value = (Request.QueryString["id"] == null) ? "0" : Request.QueryString["id"].ToString();
        }
    }


    protected void btnOk_Click(object sender, EventArgs e)
    {
        try
        {
            if (txtUsername.Text =="" || txtPwd.Text=="")
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "s", "<script>alert('请输入完整信息!');</script>");
                return;
            }
            if (txtPwd.Text != txtPwd1.Text)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "s", "<script>alert('两次密码输入不一致!');</script>");
                return;
            }
            if (BaseData.Instanse.SelectManagerByName(txtUsername.Text)!=null)
            {
                ClientScript.RegisterClientScriptBlock(this.GetType(), "s", "<script>alert('该用户名已经存在,请重新输入!');</script>");
                return;
            }

            Manager mg = new Manager();
            mg.permiss = hfType.Value;
            mg.username = txtUsername.Text;
            mg.userpwd = txtPwd.Text;
            BaseData.Instanse.InsertManager(mg);
            var mg1 = BaseData.Instanse.SelectManagerByName(txtUsername.Text);
            if (hfType.Value == "个人")
            {
                SelfInformation selfinfo = new SelfInformation();
                selfinfo.Sbh = mg1.id;
                selfinfo.sname = "";
                selfinfo.sex = "男";
                selfinfo.brithdate =DateTime.Now;
                selfinfo.brithPlace = "";
                selfinfo.major = "";
                selfinfo.degree = "";
                selfinfo.selfintroduction = "";
                selfinfo.workhour = 0;
后面还有 37 行代码,购买后查看完整代码

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

AI 解读 AI

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

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