⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mimaxiugai.aspx.cs

📁 实现货物运输的查询:入库管理、库存管理、出库管理、员工基本信息管理等。
💻 CS
字号:
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;
public partial class mimaxiugai : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            this.Label1.Text = "";
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        SqlConnection con = new SqlConnection("Server=.;Database=物流公司货运管理;uid=sa;pwd=;");
        con.Open();
        SqlCommand cmd = new SqlCommand("select count(*) from 用户表 where 用户编号 ='" + TextBox1.Text + "' and 密码='" + TextBox2.Text + "'", con);
        int count = Convert.ToInt32(cmd.ExecuteScalar());
        if (count > 0)
        {
            this.Panel1.Visible = false;
            this.Panel2.Visible = true;
            this.Label1.Text = this.TextBox1.Text;
            string 用户编号 = "";
            string 密码 = ""; 

        }
      
    }
    protected void TextBox3_TextChanged(object sender, EventArgs e)
    {

    }
    protected void Button3_Click(object sender, EventArgs e)
    {
 if (Page.IsValid)
        {
                SqlConnection con = DB.CreateCon();
                string str = "insert into 用户表(密码,密码确认,安全问题提示,安全回答) values ('" + this.TextBox3.Text + "','" + this.TextBox4.Text + "','" + this.TextBox5.Text + "','" + this.TextBox6.Text + "')";
                SqlCommand cmd = new SqlCommand(str,con);
                con.Open();
                cmd.ExecuteNonQuery();
                con.Close();
        }
    }
    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -