資源簡介
簡單的停車場管理系統(tǒng),該有的功能應(yīng)該算是都有了,用的VS2010和sqlserver2012做的。

代碼片段和文件信息
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?Parksystem
{
????public?partial?class?Index?:?Form
????{
????????public?Index()
????????{
????????????InitializeComponent();
????????}
????????private?void?返回ToolStripMenuItem_Click(object?sender?EventArgs?e)
????????{
????????????this.Visible?=?false;
????????????Login?jason?=?new?Login();
????????????jason.ShowDialog();
????????}
??????
??????
????????private?void?退出ToolStripMenuItem1_Click(object?sender?EventArgs?e)
????????{
????????????{
????????????????if?(MessageBox.Show(“您真的要退出系統(tǒng)嗎?“?“溫馨提醒您“?MessageBoxButtons.YesNo)?==?DialogResult.Yes)
????????????????{
????????????????????Application.Exit();
????????????????}
????????????}????
????????}
????????private?void?button0_Click(object?sender?EventArgs?e)?//檢查車位
????????{
????????????try
????????????{
????????????????SqlConnection?conn?=?new?SqlConnection(“Data?Source=JASON-LUK-PC;Initial?Catalog=Parksystem;Integrated?Security=True“);
????????????????conn.Open();
????????????????SqlCommand?cmd?=?new?SqlCommand(“SELECT?COUNT(*)?FROM?Entrance“?conn);
????????????????string?count?=?cmd.ExecuteScalar().ToString();
????????????????conn.Close();
????????????????textBox6.Text?=?count.ToString();?//已用車位
????????????????int?c?=?Convert.ToInt32(count);
????????????????int?left?=?100?-?c;
????????????????textBox7.Text?=?left.ToString();?//還剩車位
????????????????if?(left?>?0)
????????????????????button1.Enabled?=?true;?//有空余車位時(shí),入場登記按鈕變成能點(diǎn)擊
????????????????else
????????????????????MessageBox.Show(“停車場已滿,無法停車!“);
????????????}
????????????catch?(System.ArgumentException?he)
????????????{
????????????????MessageBox.Show(he.Message?“連接失敗“);
????????????}
????????}
????????private?void?button19_Click(object?sender?EventArgs?e)//入場登記按鈕
????????{
????????????if?(this.textBox1.Text.Trim()?==?““)?//車牌為空時(shí)
????????????{
????????????????MessageBox.Show(“車牌號碼不能為空!“?“系統(tǒng)提示“?MessageBoxButtons.OK?MessageBoxIcon.Error);
????????????????return;
????????????}
????????????try
????????????{
????????????????SqlConnection?conn?=?new?SqlConnection(“Data?Source=JASON-LUK-PC;Initial?Catalog=Parksystem;Integrated?Security=True“);
????????????????conn.Open();
????????????????SqlDataAdapter?insert?=?new?SqlDataAdapter(“insert?into?Entrance?values(‘“?+?this.textBox1.Text?+?“‘‘“?+?DateTime.Now?+?“‘)“?conn);?//讀取textBox1的文本為車牌號、系統(tǒng)時(shí)間為入場時(shí)間
????????????????DataSet?ds?=?new?DataSet();
????????????????insert.Fill(ds?“Entrance?“);
????????????????conn.Close();
????????????????MessageBox.Show(“登記成功“);
????????????????button0_Click(sender?e);//自動(dòng)更新車位信息
????????????????textBox1.Text?=?““;
????????????}
????????????catch?(SqlException?ccc)
????????????{
????????????????MessageBox.Show(ccc.Message?“連接失敗“);
????????????}
????????????catch?(Sy
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????379392??2015-06-14?21:39??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\報(bào)告.doc
?????文件????4259840??2015-06-10?23:15??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\數(shù)據(jù)庫\Parksystem.mdf
?????文件????1064960??2015-06-10?23:15??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\數(shù)據(jù)庫\Parksystem_log.ldf
?????文件????????929??2015-06-06?17:34??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parking管理系統(tǒng).sln
????..A..H.?????76800??2015-06-06?17:40??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parking管理系統(tǒng).suo
?????文件????????646??2015-06-08?19:35??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\app.config
?????文件????????410??2008-01-16?20:13??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\bin\Debug\Parking管理系統(tǒng).vshost.exe.config
?????文件??????82432??2015-06-09?09:25??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\bin\Debug\WindowsApplication1.exe
?????文件????????646??2015-06-08?19:35??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\bin\Debug\WindowsApplication1.exe.config
?????文件?????194048??2015-06-09?09:25??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\bin\Debug\WindowsApplication1.pdb
?????文件??????11608??2015-06-09?13:20??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\bin\Debug\WindowsApplication1.vshost.exe
?????文件????????646??2015-06-08?19:35??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\bin\Debug\WindowsApplication1.vshost.exe.config
?????文件????????490??2015-05-23?21:02??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\bin\Debug\WindowsApplication1.vshost.exe.manifest
?????文件????????410??2008-01-16?20:13??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\bin\Debug\WindowsApplication2.vshost.exe.config
?????文件???????9935??2015-06-09?10:57??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\Index.cs
?????文件??????65411??2015-06-08?19:35??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\Index.Designer.cs
?????文件???????7878??2015-06-06?20:38??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\Index.resx
?????文件???????2669??2015-06-08?19:45??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\Login.cs
?????文件???????7648??2015-06-08?19:35??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\Login.Designer.cs
?????文件???????5814??2015-06-06?18:14??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\Login.resx
?????文件??????18029??2015-06-06?18:11??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6074??2015-06-09?13:20??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????2048??2008-01-17?10:44??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\Paking管理系統(tǒng).csproj.GenerateResource.Cache
?????文件???????1822??2015-06-06?17:30??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\Parking管理系統(tǒng).csproj.FileListAbsolute.txt
?????文件???????1230??2015-06-06?17:24??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\Parking管理系統(tǒng).csproj.GenerateResource.Cache
?????文件???????4433??2015-06-09?13:20??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\Parksystem.csproj.FileListAbsolute.txt
?????文件???????1094??2015-06-08?10:03??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\Parksystem.csproj.GenerateResource.Cache
?????文件????????180??2015-06-08?19:35??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\Parksystem.Index.resources
?????文件????????180??2015-06-08?19:35??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\Parksystem.Login.resources
?????文件????????180??2015-06-08?19:35??停車場管理系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)\程序\Parksystem\obj\Debug\Parksystem.Register.resources
............此處省略59個(gè)文件信息
評論
共有 條評論