-
大小: 22.11MB文件類型: .zip金幣: 1下載: 0 次發(fā)布日期: 2023-06-28
- 語言: C#
- 標(biāo)簽:
資源簡介
該程序可用于簡單的家庭記賬,程序基于.NET 4.0,使用VS2012開發(fā)工具編寫。
代碼片段和文件信息
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.OleDb;
namespace?AccountSystem
{
????public?partial?class?AddAccount?:?Form
????{
????????public?AddAccount()
????????{
????????????InitializeComponent();
????????}
????????private?void?AddAccount_Load(object?sender?EventArgs?e)
????????{
????????????Accountstyle.Text?=?“普通“;
????????????string?accountstyle;
????????????string?username?=?(string)this.ParentForm.Tag;
????????????try
????????????{
????????????????string?connectstring?=?“provider=Microsoft.jet.OLEDB.4.0;Data?Source=accountsystem.mdb;Jet?OleDb:Database?Password=lxw618“;
????????????????string?sqlcommand?=?“select?accountstyle?from?[User]?where?username=‘“?+?username?+?“‘“;
????????????????OleDbConnection?aConnection?=?new?OleDbConnection(connectstring);
????????????????aConnection.Open();
????????????????OleDbCommand?aCommand?=?new?OleDbCommand(sqlcommand?aConnection);
????????????????OleDbDataReader?reader?=?aCommand.ExecuteReader();
????????????????reader.Read();
????????????????accountstyle?=?reader.GetString(0);
????????????????reader.Close();
????????????????aConnection.Close();
????????????????if?(accountstyle?!=?“管理員“)
????????????????{
????????????????????Accountstyle.Enabled?=?false;
????????????????}
????????????????return;
????????????}
????????????catch?{?}
????????}
????????private?void?btnOK_Click(object?sender?EventArgs?e)
????????{
????????????string?username?=?(string)this.ParentForm.Tag;
????????????if?(txtUsername.Text?==?““?||?txtPassword.Text?==?““?||?txtNickname.Text?==?““)
????????????{
????????????????MessageBox.Show(“請將所有必填空格填寫完整“?“填寫錯誤“);
????????????????return;
????????????}
????????????string?str1?str2;
????????????try
????????????{
????????????????string?connectstring?=?“provider=Microsoft.jet.OLEDB.4.0;Data?Source=accountsystem.mdb;Jet?OleDb:Database?Password=lxw618“;
????????????????string?sqlcommand?=?“select?usernamenickname?from?[User]“;
????????????????OleDbConnection?aConnection?=?new?OleDbConnection(connectstring);
????????????????aConnection.Open();
????????????????OleDbCommand?aCommand?=?new?OleDbCommand(sqlcommandaConnection);
????????????????OleDbDataReader?reader?=?aCommand.ExecuteReader();
????????????????while?(reader.Read())
????????????????{
????????????????????str1?=?reader.GetString(0);
????????????????????str2?=?reader.GetString(1);
????????????????????if?(txtUsername.Text.Trim()?==?str1.Trim()?||?txtNickname.Text.Trim()?==?str2.Trim())
????????????????????{
????????????????????????
????????????????????????reader.Close();
????????????????????????aConnection.Close();
????????????????????????MessageBox.Show(“用戶名或昵稱與已有帳號重復(fù)“?“系統(tǒng)錯誤“);
????????????????????????return;
????????????????????}
????????????????}???????????????
????????????}
????????????catch?(Exce
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????257??2017-07-29?14:45??家庭記賬軟件(Access)\使用說明.txt
?????文件?????????257??2017-07-29?14:45??家庭記賬軟件(Access)\家庭記賬軟件演示\使用說明.txt
?????目錄???????????0??2017-03-23?00:06??家庭記賬軟件(Access)\
?????目錄???????????0??2017-03-23?00:05??家庭記賬軟件(Access)\AccountSystem\
?????目錄???????????0??2017-03-23?00:05??家庭記賬軟件(Access)\AccountSystem\AccountSystem\
?????文件???????10255??2016-05-19?12:34??家庭記賬軟件(Access)\AccountSystem\AccountSystem\AccountSystem.csproj
?????文件???????15684??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\AddAccount.Designer.cs
?????文件????????4504??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\AddAccount.cs
?????文件????????5817??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\AddAccount.resx
?????文件???????16817??2016-05-18?14:26??家庭記賬軟件(Access)\AccountSystem\AccountSystem\AddRecord.Designer.cs
?????文件????????4689??2016-05-18?14:26??家庭記賬軟件(Access)\AccountSystem\AccountSystem\AddRecord.cs
?????文件????????5817??2016-05-18?14:26??家庭記賬軟件(Access)\AccountSystem\AccountSystem\AddRecord.resx
?????文件?????????167??2016-03-08?16:38??家庭記賬軟件(Access)\AccountSystem\AccountSystem\App.config
?????文件????????3104??2016-05-18?19:50??家庭記賬軟件(Access)\AccountSystem\AccountSystem\Calendar.Designer.cs
?????文件?????????537??2016-05-18?19:50??家庭記賬軟件(Access)\AccountSystem\AccountSystem\Calendar.cs
?????文件????????6013??2016-05-18?19:50??家庭記賬軟件(Access)\AccountSystem\AccountSystem\Calendar.resx
?????文件???????17154??2016-05-18?14:23??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangeAccountInfo.Designer.cs
?????文件????????7883??2016-05-19?13:02??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangeAccountInfo.cs
?????文件????????5817??2016-05-18?14:23??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangeAccountInfo.resx
?????文件???????11450??2016-05-17?18:08??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangePassword.Designer.cs
?????文件????????4046??2016-05-17?18:08??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangePassword.cs
?????文件???????89793??2016-05-17?18:08??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangePassword.resx
?????文件???????18400??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangeRecord.Designer.cs
?????文件???????13360??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangeRecord.cs
?????文件????????5817??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\ChangeRecord.resx
?????文件????????8008??2016-05-19?13:19??家庭記賬軟件(Access)\AccountSystem\AccountSystem\DayInstance.Designer.cs
?????文件???????11230??2016-05-19?17:08??家庭記賬軟件(Access)\AccountSystem\AccountSystem\DayInstance.cs
?????文件????????5817??2016-05-19?13:19??家庭記賬軟件(Access)\AccountSystem\AccountSystem\DayInstance.resx
?????文件???????10733??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\DeleteRecord.Designer.cs
?????文件???????11050??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\DeleteRecord.cs
?????文件????????5817??2016-05-18?15:14??家庭記賬軟件(Access)\AccountSystem\AccountSystem\DeleteRecord.resx
............此處省略132個文件信息
- 上一篇:ASP.NET 后臺管理系統(tǒng)154514
- 下一篇:基于C#窗體的貪吃蛇
評論
共有 條評論