資源簡介
內含sqlserver數據庫mld文件,附加就可以訪問,vs2015以上

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
namespace?SubWaySystem
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????/**輸入框重置*/
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????this.textBox1.Text?=?““;
????????????this.textBox2.Text?=?““;
????????}
????????private?void?button1_Click_1(object?sender?EventArgs?e)
????????{
????????????Register?view?=?new?Register();//創建一個新頁面
????????????view.Show();//顯示新頁面
????????????this.Hide();//隱藏當前頁面
????????}
????????/**登錄驗證*/
????????private?void?login(object?sender?EventArgs?e)
????????{
????????????//獲取文本框中的值
????????????string?username?=?this.textBox1.Text;
????????????string?password?=?this.textBox2.Text;
????????????if?(username.Equals(““)?||?password.Equals(““))//用戶名或密碼為空
????????????{
????????????????MessageBox.Show(“用戶名或密碼不能為空“);
????????????}
????????????else//用戶名或密碼不為空
????????????{
????????????????//到數據庫中驗證
????????????????string?selectSql?=?“select?*?from?users?where?username=‘“?+?username?+?“‘?and?password=‘“?+?password?+?“‘“;
????????????????SqlHelper?sqlHelper?=?new?SqlHelper();
????????????????int?count?=?sqlHelper.SqlServerRecordCount(selectSql);//返回符合的結果數量
????????????????if?(count?>?0)//如果信息>0則說明匹配成功
????????????????{
????????????????????MessageBox.Show(“信息驗證成功“);
????????????????????//將當前登錄日志信息寫入數據庫(待開發...)
????????????????????//跳轉到主頁面
????????????????????MainSystem?view?=?new?MainSystem();//創建一個新頁面
????????????????????view.Show();//顯示新頁面
????????????????????this.Hide();//隱藏當前頁面
????????????????}
????????????????else
????????????????{
????????????????????MessageBox.Show(“用戶名或密碼錯誤“);
????????????????}
????????????}
????????}
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????Register?view?=?new?Register();//創建一個新頁面
????????????view.Show();//顯示新頁面
????????????this.Hide();//隱藏當前頁面
????????}
????????private?void?button2_Click_1(object?sender?EventArgs?e)
????????{
????????????//獲取文本框中的值
????????????string?username?=?this.textBox1.Text;
????????????string?password?=?this.textBox2.Text;
????????????if?(username.Equals(““)?||?password.Equals(““))//用戶名或密碼為空
????????????{
????????????????MessageBox.Show(“用戶名或密碼不能為空“);
????????????}
????????????else//用戶名或密碼不為空
????????????{
????????????????//到數據庫中驗證
????????????????string?selectSql?=?“select?*?from?users?where?username=‘“?+?username?+?“‘?and?password=‘“?+?password?+?“‘“;
????????????????SqlHelper?sqlHelper?=?new?SqlHelper();
????????????????int?count?=?sqlHelper.SqlServerRecordCount(selectSql);//返回符合的結果數量
????????????????if?(count?>?0)//如果信息>0則說明匹配成功
????????????????{
????????????????????MessageBox.Show(“信息驗證成功“);
???????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-07-05?19:00??SubWaySystem\
?????目錄???????????0??2018-07-04?16:11??SubWaySystem\.vs\
?????目錄???????????0??2018-07-04?16:11??SubWaySystem\.vs\SubWaySystem\
?????目錄???????????0??2018-07-04?16:11??SubWaySystem\.vs\SubWaySystem\v14\
?????文件???????71680??2018-07-05?18:57??SubWaySystem\.vs\SubWaySystem\v14\.suo
?????目錄???????????0??2018-07-05?18:57??SubWaySystem\SubWaySystem\
?????文件?????????949??2018-07-05?17:45??SubWaySystem\SubWaySystem\App.config
?????文件????????4696??2018-07-04?16:38??SubWaySystem\SubWaySystem\Form1.Designer.cs
?????文件????????3948??2018-07-04?16:38??SubWaySystem\SubWaySystem\Form1.cs
?????文件????????5817??2018-07-04?16:38??SubWaySystem\SubWaySystem\Form1.resx
?????文件????????6074??2018-07-05?17:17??SubWaySystem\SubWaySystem\FormPassWord.Designer.cs
?????文件????????2619??2018-07-05?17:17??SubWaySystem\SubWaySystem\FormPassWord.cs
?????文件????????5817??2018-07-05?17:17??SubWaySystem\SubWaySystem\FormPassWord.resx
?????文件????????6269??2018-07-05?18:52??SubWaySystem\SubWaySystem\MainSystem.Designer.cs
?????文件????????1027??2018-07-05?18:52??SubWaySystem\SubWaySystem\MainSystem.cs
?????文件??????336608??2018-07-05?18:52??SubWaySystem\SubWaySystem\MainSystem.resx
?????文件?????????524??2018-07-04?16:11??SubWaySystem\SubWaySystem\Program.cs
?????目錄???????????0??2018-07-04?16:11??SubWaySystem\SubWaySystem\Properties\
?????文件????????1332??2018-07-04?16:11??SubWaySystem\SubWaySystem\Properties\AssemblyInfo.cs
?????文件????????2837??2018-07-04?16:11??SubWaySystem\SubWaySystem\Properties\Resources.Designer.cs
?????文件????????5612??2018-07-04?16:11??SubWaySystem\SubWaySystem\Properties\Resources.resx
?????文件????????1099??2018-07-04?16:11??SubWaySystem\SubWaySystem\Properties\Settings.Designer.cs
?????文件?????????249??2018-07-04?16:11??SubWaySystem\SubWaySystem\Properties\Settings.settings
?????文件????????4894??2018-07-04?16:35??SubWaySystem\SubWaySystem\Register.Designer.cs
?????文件????????1904??2018-07-04?16:35??SubWaySystem\SubWaySystem\Register.cs
?????文件????????5817??2018-07-04?16:35??SubWaySystem\SubWaySystem\Register.resx
?????文件????????5864??2018-07-05?17:47??SubWaySystem\SubWaySystem\SqlHelper.cs
?????文件????????1176??2018-07-04?16:17??SubWaySystem\SubWaySystem\Stay.cs
?????文件????????5182??2018-07-05?17:38??SubWaySystem\SubWaySystem\StayLine.Designer.cs
?????文件?????????970??2018-07-05?17:38??SubWaySystem\SubWaySystem\StayLine.cs
?????文件????????6183??2018-07-05?17:38??SubWaySystem\SubWaySystem\StayLine.resx
............此處省略41個文件信息
- 上一篇:oracle數據庫OT.zip
- 下一篇:之前上傳的ssm商城的數據庫文件
評論
共有 條評論