資源簡介
本資源是是一套利用C#與MYSQL數據寫的小型超市管理系統,可以實現基本的功能。

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.SqlClient;
namespace?AYCSGJ
{
????public?partial?class?addemp?:?Form
????{
????????SqlConnection?conn?=?null;
????????SqlCommand?cmd?=?null;
????????public?addemp()
????????{
????????????InitializeComponent();
????????}???
????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????int?intFalg?=?0;
????????????string?strEmpID?=?tb_EmpInfoID();
????????????string?strEmpName?=?txtEmpName.Text;
????????????string?intEmpSex?=?comboBox2.Text;
????????????string?strEmpDept?=?cmbEmpDept.Text;
????????????string?strEmpPost?=?cmbEmpPost.Text;
????????????string?strEmpPhone?=?txtEmpPhone.Text;
????????????string?strEmpAddress?=?txtEmpAddress.Text;
????????????string?strEmpFalg?=?“1“;
????????????if?(txtEmpName.Text?!=?““?||?comboBox2.Text?!=?““?||?cmbEmpDept.Text?!=?““?||?cmbEmpPost.Text?!=?““?||?txtEmpPhone.Text?!=?““)
????????????{
????????????????string?str_Add?=?“insert?into?EmpInfo?values(?“;
????????????????str_Add?+=?“?‘“?+?strEmpID?+?“‘‘“?+?strEmpName?+?“‘‘“?+?intEmpSex?+?“‘“;
????????????????str_Add?+=?“?‘“?+?strEmpDept?+?“‘‘“?+?strEmpPost?+?“‘‘“?+?strEmpPhone?+?“‘“;
????????????????str_Add?+=?“?‘“?+?strEmpAddress?+?“‘“;
????????????????str_Add?+=?““?+?strEmpFalg?+?“)“;
????????????????getsqlconn?g1?=?new?getsqlconn();
????????????????conn?=?g1.getconn();
????????????????cmd?=?new?SqlCommand(str_Add?conn);
????????????????intFalg?=?cmd.ExecuteNonQuery();
????????????????MessageBox.Show(“添加成功“?“提示“);
????????????????conn.Dispose();
????????????????this.Close();
????????????}
????????????else
????????????{
????????????????MessageBox.Show(“添加無內容!“?“提示“);
????????????}
????????????
????????}//確定添加
????????public?string?tb_EmpInfoID()
????????{
????????????int?intYear?=?DateTime.Now.Day;
????????????int?intMonth?=?DateTime.Now.Month;
????????????int?intDate?=?DateTime.Now.Year;
????????????int?intHour?=?DateTime.Now.Hour;
????????????int?intSecond?=?DateTime.Now.Second;
????????????int?intMinute?=?DateTime.Now.Minute;
????????????string?strTime?=?null;
????????????strTime?=?intYear.ToString();
????????????if?(intMonth?10)
????????????{
????????????????strTime?+=?“0“?+?intMonth.ToString();
????????????}
????????????else
????????????{
????????????????strTime?+=?intMonth.ToString();
????????????}
????????????if?(intDate?10)
????????????{
????????????????strTime?+=?“0“?+?intDate.ToString();
????????????}
????????????else
????????????{
????????????????strTime?+=?intDate.ToString();
????????????}
????????????if?(intHour?10)
????????????{
????????????????strTime?+=?“0“?+?intHour.ToString();
????????????}
????????????else
????????????{
????????????????strTime?+=?intHour.ToString();
????????????}
????????????if?(intMinute?1
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????860??2018-07-06?16:23??超市管理系統\AYCSGJ.sln
?????目錄???????????0??2018-07-14?16:33??超市管理系統\AYCSGJ\
?????文件????????3516??2018-07-14?13:32??超市管理系統\AYCSGJ\AddEmp.cs
?????文件???????10950??2018-07-09?22:16??超市管理系統\AYCSGJ\AddEmp.Designer.cs
?????文件????????5817??2018-07-09?22:16??超市管理系統\AYCSGJ\AddEmp.resx
?????文件?????????397??2018-07-14?15:35??超市管理系統\AYCSGJ\app.config
?????文件????????5817??2018-07-14?12:13??超市管理系統\AYCSGJ\AYCSGJ.csproj
?????目錄???????????0??2018-07-14?16:33??超市管理系統\AYCSGJ\bin\
?????目錄???????????0??2018-07-14?16:33??超市管理系統\AYCSGJ\bin\Debug\
?????文件???????76800??2018-07-14?15:36??超市管理系統\AYCSGJ\bin\Debug\AYCSGJ.exe
?????文件?????????397??2018-07-14?15:35??超市管理系統\AYCSGJ\bin\Debug\AYCSGJ.exe.config
?????文件??????159232??2018-07-14?15:36??超市管理系統\AYCSGJ\bin\Debug\AYCSGJ.pdb
?????文件???????11600??2018-07-14?16:11??超市管理系統\AYCSGJ\bin\Debug\AYCSGJ.vshost.exe
?????文件?????????397??2018-07-14?15:35??超市管理系統\AYCSGJ\bin\Debug\AYCSGJ.vshost.exe.config
?????目錄???????????0??2018-07-06?16:25??超市管理系統\AYCSGJ\bin\Release\
?????文件??????480735??2018-07-14?16:22??超市管理系統\AYCSGJ\db_AYCSGJDataSet.Designer.cs
?????文件???????????3??2018-07-10?17:18??超市管理系統\AYCSGJ\db_AYCSGJDataSet.xsc
?????文件???????16445??2018-07-10?17:18??超市管理系統\AYCSGJ\db_AYCSGJDataSet.xsd
?????文件???????????3??2018-07-10?17:18??超市管理系統\AYCSGJ\db_AYCSGJDataSet.xss
?????文件????????1353??2018-07-14?13:30??超市管理系統\AYCSGJ\DeleEmp.cs
?????文件???????11905??2018-07-14?12:27??超市管理系統\AYCSGJ\DeleEmp.Designer.cs
?????文件????????5817??2018-07-14?12:27??超市管理系統\AYCSGJ\DeleEmp.resx
?????文件?????????568??2018-07-07?09:22??超市管理系統\AYCSGJ\getsqlconn.cs
?????文件????????6276??2018-07-14?15:36??超市管理系統\AYCSGJ\Home.cs
?????文件???????22384??2018-07-14?13:14??超市管理系統\AYCSGJ\Home.Designer.cs
?????文件????????9419??2018-07-14?13:14??超市管理系統\AYCSGJ\Home.resx
?????目錄???????????0??2018-07-14?16:33??超市管理系統\AYCSGJ\image\
?????文件????????2550??2018-07-08?10:20??超市管理系統\AYCSGJ\image\AddEntry.ico
?????文件????????2550??2018-07-08?10:20??超市管理系統\AYCSGJ\image\DeleteEntry.ico
?????文件????????2550??2018-07-08?10:20??超市管理系統\AYCSGJ\image\EditEntry.ico
?????文件????????2071??2018-07-09?22:53??超市管理系統\AYCSGJ\Login.cs
............此處省略37個文件信息
- 上一篇:asp.net簡單購物網站
- 下一篇:winform電影售票系統
評論
共有 條評論