CompanyRegister.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class CompanyRegister : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack) { }
}
protected void Button1_Click(object sender, EventArgs e)
{
if (username.Value.Trim() == "")
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "alert('请输入账号!')", true);
}
else if (password.Value.Trim() == "")
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "alert('请输入密码!')", true);
}
else if (CompanyName.Value.Trim() == "")
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "alert('请输入公司名称!')", true);
}
else if (Mobile.Value.Trim() == "")
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "alert('请输入联系电话!')", true);
}
else
{
string sql = "select * from gongsi where yonghuming='" + username.Value + "' or gongsimingcheng = '" + CompanyName.Value + "'";
DataTable dt = new sqlConn().hsggetdata(sql).Tables[0];
if (dt.Rows.Count > 0)
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "alert('账号或公司名称已存在!')", true);
}
else
{
string yonghuming = this.username.Value;
string mima = this.password.Value;
string xingming = this.CompanyName.Value;
string lianxiren = this.PeopleName.Value;
string dianhua = this.Mobile.Value;
string dizhi = this.Address.Value;
string jigoudaima = this.CardID.Value;
string guimo = this.Guimo.Value;
string hangye = this.typeselect.Items[typeselect.SelectedIndex].Value;
string jianjie = this.Intro.Value;
string strsql = "Insert into gongsi(yonghuming,mima,gongsimingcheng,lianxiren,dianhua,dizhi,jigoudaima,guimo,hangye,jianjie,pic)values(";
strsql += "'" + yonghuming + "','" + mima + "','" + xingming + "','" + lianxiren + "','" + dianhua + "','" + dizhi + "','" + jigoudaima + "','" + guimo + "','" + hangye + "','" + jianjie + "','" + HiddenFieldPic.Value + "')";
int result;
result = new sqlConn().hsgexucute(strsql);
if (result == 1)
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), System.DateTime.Now.Ticks.ToString(), "alert('注册成功,请等待审核!');location.href='Index.aspx';", true);
后面还有 10 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
