Login.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BookShopTuto
{
public partial class Login : Form
{
public Login()
{
InitializeComponent();
}
// X 标签
private void label8_Click(object sender, EventArgs e)
{
Application.Exit();
}
SqlConnection Con = new SqlConnection(@"Data Source=.;Initial Catalog=WhiteBookShopDb;Integrated Security=True;");
public static string UserName = "";
private void LoginBtn_Click(object sender, EventArgs e)
{
try
{
Con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select count(*) from UserTb1 where UName = '" + UserNameLbl.Text.Trim() + "' and UPassword = '" + PwdLbl.Text.Trim() + "'", Con);
DataTable dt = new DataTable();
sda.Fill(dt);
if (dt.Rows[0][0].ToString() == "1")
{
UserName = UserNameLbl.Text;
Billing obj = new Billing();
obj.Show();
this.Hide();
Con.Close();
}
else
{
MessageBox.Show("用户名或密码错误!!!");
}
Con.Close();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void label4_Click(object sender, EventArgs e)
{
后面还有 6 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。