資源簡介
銀行管理系統
支持數據庫管理SQL 2005, VS2005
功能: 用戶登錄、注冊、修改密碼、查詢余額、轉賬、銷戶、支持明細查詢

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.SqlClient;
namespace?Bank
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????//進行數據庫連接
????????????SqlConnection?sqlcon?=?new?SqlConnection(@“server=.\sqlexpress;database=Bank;integrated?security=SSPI“);
????????????try
????????????{
????????????????sqlcon.Open();//無法打開數據庫連接,下面基本沒什么問題
????????????????string?sqlSelect?=?“select?*?from?UserInfor“;
????????????????SqlCommand?sqlcmd?=?new?SqlCommand(sqlSelect?sqlcon);
????????????????SqlDataReader?sdr?=?sqlcmd.ExecuteReader();
????????????????while(sdr.Read())
????????????????{
????????????????????if?(sdr[“acountNum“].ToString().CompareTo(textBox1.Text)?==?0)
????????????????????{
????????????????????????if?(sdr[“userpassword“].ToString().CompareTo(textBox2.Text)?==?0)
????????????????????????{
????????????????????????????Form3?form?=?new?Form3(textBox1.TexttextBox2.Text);
????????????????????????????this.Hide();
????????????????????????????form.ShowDialog();
????????????????????????????return;
????????????????????????}
????????????????????}??
????????????????}
????????????????MessageBox.Show(“對不起!!!該用戶不存在,請注冊!!!““Confirm“MessageBoxButtons.OKMessageBoxIcon.Information);????
????????????}
????????????catch?(Exception?em)
????????????{
????????????????MessageBox.Show(em.ToString());
????????????}
????????????finally
????????????{
????????????????sqlcon.Close();????????????????
????????????}
????????}
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????Form2?form?=?new?Form2();
????????????this.Hide();
????????????form.ShowDialog();
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4192??2010-11-21?15:44??銀行管理系統\Bank\Bank.csproj
?????文件????????896??2010-11-22?00:02??銀行管理系統\Bank\Bank.sln
????..A..H.?????17408??2010-11-26?16:10??銀行管理系統\Bank\Bank.suo
?????文件?????299008??2010-11-24?20:09??銀行管理系統\Bank\bin\Debug\Bank.exe
?????文件??????56832??2010-11-24?20:09??銀行管理系統\Bank\bin\Debug\Bank.pdb
?????文件???????5632??2005-12-08?14:51??銀行管理系統\Bank\bin\Debug\Bank.vshost.exe
?????文件???????2069??2010-11-22?16:22??銀行管理系統\Bank\Form1.cs
?????文件???????6436??2010-11-22?00:02??銀行管理系統\Bank\Form1.Designer.cs
?????文件???????5814??2010-11-22?00:02??銀行管理系統\Bank\Form1.resx
?????文件???????3319??2010-11-21?23:25??銀行管理系統\Bank\Form2.cs
?????文件???????7342??2010-11-21?16:35??銀行管理系統\Bank\Form2.Designer.cs
?????文件???????5814??2010-11-21?16:35??銀行管理系統\Bank\Form2.resx
?????文件??????17879??2010-11-24?20:09??銀行管理系統\Bank\Form3.cs
?????文件??????40410??2010-11-24?20:09??銀行管理系統\Bank\Form3.Designer.cs
?????文件???????5814??2010-11-24?20:09??銀行管理系統\Bank\Form3.resx
?????文件????????311??2010-11-26?16:10??銀行管理系統\Bank\obj\Bank.csproj.FileList.txt
?????文件???????1163??2010-11-24?20:09??銀行管理系統\Bank\obj\Debug\Bank.csproj.GenerateResource.Cache
?????文件?????299008??2010-11-24?20:09??銀行管理系統\Bank\obj\Debug\Bank.exe
?????文件????????180??2010-11-22?14:10??銀行管理系統\Bank\obj\Debug\Bank.Form1.resources
?????文件????????180??2010-11-21?16:35??銀行管理系統\Bank\obj\Debug\Bank.Form2.resources
?????文件????????180??2010-11-24?20:09??銀行管理系統\Bank\obj\Debug\Bank.Form3.resources
?????文件??????56832??2010-11-24?20:09??銀行管理系統\Bank\obj\Debug\Bank.pdb
?????文件?????255837??2010-11-21?15:44??銀行管理系統\Bank\obj\Debug\Bank.Properties.Resources.resources
?????文件???????5120??2010-11-21?14:42??銀行管理系統\Bank\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
?????文件????????463??2010-11-21?14:07??銀行管理系統\Bank\Program.cs
?????文件???????1174??2010-11-21?14:07??銀行管理系統\Bank\Properties\AssemblyInfo.cs
?????文件???????3927??2010-11-21?14:42??銀行管理系統\Bank\Properties\Resources.Designer.cs
?????文件???????7016??2010-11-21?14:42??銀行管理系統\Bank\Properties\Resources.resx
?????文件???????1087??2010-11-21?14:07??銀行管理系統\Bank\Properties\Settings.Designer.cs
?????文件????????249??2010-11-21?14:07??銀行管理系統\Bank\Properties\Settings.settings
............此處省略27個文件信息
評論
共有 條評論