资源简介
银行管理系统
支持数据库管理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个文件信息
评论
共有 条评论