Forms/SignUp.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Vender.Forms
{
public partial class SignUp : Form
{
private DBConnect dBCon = new DBConnect();
public SignUp()
{
InitializeComponent();
}
//
/// <summary>
/// Sign Up function
/// </summary>
public void signUp()
{
try
{
if (String.IsNullOrWhiteSpace(TextBoxUsername.Text) && String.IsNullOrWhiteSpace(TextBoxPassword.Text) && String.IsNullOrWhiteSpace(TextBoxtRepeatPassword.Text))
{
LabelMessage.ForeColor = Color.Red;
LabelMessage.Text = "Please enter username and password ";
}
else
{
if (TextBoxPassword.Text == TextBoxtRepeatPassword.Text)
{
int state = 0;
try
{
string updateQuery = "UPDATE admin SET username ='" + TextBoxUsername.Text + "',password ='" + TextBoxPassword.Text + "' WHERE ID =1";
SqlCommand cmd = new SqlCommand(updateQuery, dBCon.GetCon());
dBCon.OpenCon();
cmd.ExecuteNonQuery();
state = 1;
}
catch
{
state = 0;
LabelMessage.ForeColor = Color.Red;
LabelMessage.Text = ("Error please try again");
}
if (state == 1)
{
string stat = "1";
后面还有 56 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。