資源簡(jiǎn)介
由Winform版本的學(xué)院管理系統(tǒng)轉(zhuǎn)化為WPF版本的,其中包含了學(xué)員信息的增刪改查的相關(guān)操作,考勤打卡的操作等功能
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?Models;
using?System.Data;
using?System.Data.SqlClient;
namespace?DAL
{
????public?class?AdminService
????{
????????///?
????????///?根據(jù)用戶賬號(hào)和密碼登錄
????????///?
????????///?
????????///?
????????public?Admin?AdminLogin(Admin?objAdmin)
????????{
????????????string?sql?=?“select?LoginIdLoginPwdAdminName?from?Admins?where?loginId={0}?and?loginPwd=‘{1}‘“;
????????????sql?=?string.Format(sql?objAdmin.LoginId?objAdmin.LoginPwd);
????????????try
????????????{
????????????????SqlDataReader?objReader?=?SQLHelper.GetReader(sql);
????????????????if?(objReader.Read())
????????????????{
????????????????????objAdmin.AdminName?=?objReader[“AdminName“].ToString();
????????????????????objReader.Close();
????????????????}
????????????????else
????????????????{
????????????????????objAdmin?=?null;
????????????????}
????????????}
????????????catch?(SqlException)
????????????{
????????????????throw?new?Exception(“應(yīng)用程序和數(shù)據(jù)庫連接出現(xiàn)問題!“);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????throw?ex;
????????????}
????????????return?objAdmin;
????????}
????????///?
????????///?修改管理員密碼
????????///?
????????///?
????????///?
????????public?int?ModifyPwd(Admin?objAdmin)
????????{
????????????string?sql?=?“update?Admins?set?LoginPwd=‘{0}‘?where?LoginId={1}“;
????????????sql?=?string.Format(sql?objAdmin.LoginPwd?objAdmin.LoginId);
????????????try
????????????{
????????????????return?SQLHelper.Update(sql);
????????????}
????????????catch?(SqlException)
????????????{
????????????????throw?new?Exception(“應(yīng)用程序和數(shù)據(jù)庫連接出現(xiàn)問題!“);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????throw?ex;
????????????}
????????}
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件??????13428??2016-09-05?23:03??學(xué)員管理系統(tǒng)\DB\SMDB.sql
?????文件??????29922??2016-04-12?14:37??學(xué)員管理系統(tǒng)\DB\SMDB數(shù)據(jù)庫關(guān)系圖.png
????..A..H.????617984??2017-08-21?22:34??學(xué)員管理系統(tǒng)\StudentManager\.vs\StudentManagerPro\v14\.suo
?????文件???????2057??2015-08-23?20:13??學(xué)員管理系統(tǒng)\StudentManager\DAL\AdminService.cs
?????文件???????4246??2016-05-07?17:11??學(xué)員管理系統(tǒng)\StudentManager\DAL\AttendanceService.cs
?????文件??????22016??2017-08-25?08:55??學(xué)員管理系統(tǒng)\StudentManager\DAL\bin\Debug\DAL.dll
?????文件??????52736??2017-08-25?08:55??學(xué)員管理系統(tǒng)\StudentManager\DAL\bin\Debug\DAL.pdb
?????文件???????9728??2017-08-25?08:55??學(xué)員管理系統(tǒng)\StudentManager\DAL\bin\Debug\Models.dll
?????文件??????13824??2017-08-25?08:55??學(xué)員管理系統(tǒng)\StudentManager\DAL\bin\Debug\Models.pdb
?????文件??????20480??2015-08-13?22:38??學(xué)員管理系統(tǒng)\StudentManager\DAL\bin\Release\DAL.dll
?????文件??????54784??2015-08-13?22:38??學(xué)員管理系統(tǒng)\StudentManager\DAL\bin\Release\DAL.pdb
?????文件???????8192??2015-08-13?22:38??學(xué)員管理系統(tǒng)\StudentManager\DAL\bin\Release\Models.dll
?????文件???????7680??2015-08-13?22:38??學(xué)員管理系統(tǒng)\StudentManager\DAL\bin\Release\Models.pdb
?????文件???????2899??2014-10-26?19:08??學(xué)員管理系統(tǒng)\StudentManager\DAL\DAL.csproj
?????文件???????2686??2014-10-26?22:16??學(xué)員管理系統(tǒng)\StudentManager\DAL\Helper\ImportDataFromExcel.cs
?????文件???????4569??2016-02-22?18:10??學(xué)員管理系統(tǒng)\StudentManager\DAL\Helper\OleDbHelper.cs
?????文件???????5421??2015-08-28?20:54??學(xué)員管理系統(tǒng)\StudentManager\DAL\Helper\SQLHelper.cs
?????文件??????45095??2017-08-23?11:34??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Debug\DAL.csproj.FileListAbsolute.txt
?????文件???????5223??2017-08-25?08:55??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Debug\DAL.csprojResolveAssemblyReference.cache
?????文件??????22016??2017-08-25?08:55??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Debug\DAL.dll
?????文件??????52736??2017-08-25?08:55??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Debug\DAL.pdb
?????文件????????711??2017-08-20?20:42??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6756??2017-08-21?20:45??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件??????13388??2014-08-25?09:22??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Debug\ResolveAssemblyReference.cache
?????文件???????2283??2015-08-13?22:38??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Release\DAL.csproj.FileListAbsolute.txt
?????文件???????5359??2015-08-13?22:38??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Release\DAL.csprojResolveAssemblyReference.cache
?????文件??????20480??2015-08-13?22:38??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Release\DAL.dll
?????文件??????54784??2015-08-13?22:38??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Release\DAL.pdb
?????文件???????6932??2015-08-13?22:32??學(xué)員管理系統(tǒng)\StudentManager\DAL\obj\Release\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????1333??2017-05-17?19:15??學(xué)員管理系統(tǒng)\StudentManager\DAL\Properties\AssemblyInfo.cs
............此處省略390個(gè)文件信息
評(píng)論
共有 條評(píng)論