一、概述
最近發佈的小項目或者說是畢設都是Java的居多,爲了滿足廣大C#的愛好學習者,今天決定發佈一個基於C#的學生信息管理系統。在學校管理中將計算機技術、數據庫技術相結合,已成爲現代學校管理信息化的重要標誌之一。學生信息管理是一個必不可少的重要環節。開發系統的意義在於協助學生管理人員對學生信息進行管理,提高學生信息管理工作的質量和效率。
二、開發環境
語言:C#、HTML等
數據庫:SQLServer 2008 R2
開發工具:Visual Studio 2015
三、部分截圖展示
Tips
本系統可分多個角色登錄,按自己需求自我定義,上圖定義了三個角色,一是系統管理員,二是老師,三是學生。每個角色都有不一樣的功能,權屬自我分配即可。好了,介紹就到這裏,要是看了上述截圖被這簡潔、美觀的系統所動心的,可以下載源碼來學習學習,這也有可能是你C#開發的旅程起點!加油!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Web.Application;
using Web.Repository;
using Web.Repository.Domain;
using Web.Application.Extend;
namespace WebApp.Controllers
{
public class LoginController : Controller
{
UserInfoApp app_ = new UserInfoApp();
// GET: Login
public ActionResult Index()
{
return View();
}
public ActionResult CheckLogin(string Account, string password, string code)
{
HandleResult result = new HandleResult();
sysUserInfo resultData = app_.FindItem(Account,password, code);
result.data = resultData;
if (resultData != null)
{
//加載用戶權權限相關信息
AuthUtil.LoadUserAuth(resultData);
WebHelper.WriteCookie("UserId", resultData.Account);
WebHelper.WriteCookie("Account", resultData.RealName);
}
else
{
result.state = 2;
result.message = "不存在用戶,或密碼錯誤! 請重新輸入";
}
return Content(result.ToJson());
}
public ActionResult OutLogin()
{
//清理緩存
Session.Abandon();
Session.Clear();
WebHelper.ClearCookie();
return RedirectToAction("Index", "Login");
}
}
}