資源簡介
該學(xué)生簽到信息系統(tǒng)為winform項目,實現(xiàn)了學(xué)生的增刪改查,以及簽到、簽退等功能。包含數(shù)據(jù)庫腳本,用的是sql server 數(shù)據(jù)庫

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Data;
using?System.Data.SqlClient;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
namespace?WindowsFormsProject
{
????public?class?DBhelper
????{
????????private?static?string?GetConStr()
????????{
????????????return?System.Configuration.ConfigurationManager.ConnectionStrings[“conStr“].ConnectionString;
????????}
????????//查詢??select
????????public?static?DataTable?GetData(string?sql)
????????{
????????????DataTable?result?=?new?DataTable();
????????????using?(SqlConnection?sqlcon?=?new?SqlConnection(GetConStr()))
????????????{
????????????????sqlcon.Open();
????????????????using?(SqlDataAdapter?sqlda?=?new?SqlDataAdapter(sql?sqlcon))
????????????????{
????????????????????sqlda.Fill(result);
????????????????}
????????????????sqlcon.Close();
????????????}
????????????return?result;
????????}
????????//執(zhí)行語句?insert?update?delete
????????public?static?bool?SetData(string?sql)
????????{
????????????bool?result?=?false;
????????????using?(SqlConnection?sqlcon?=?new?SqlConnection(GetConStr()))
????????????{
????????????????sqlcon.Open();
????????????????using?(SqlCommand?sqlcom?=?new?SqlCommand(sql?sqlcon))
????????????????{
????????????????????result?=?sqlcom.ExecuteNonQuery()?>?0;
????????????????}
????????????????sqlcon.Close();
????????????}
????????????return?result;
????????}
????????//返回第一行第一列的值
????????public?static?object?GetValue(string?sql)
????????{
????????????object?result?=?null;
????????????using?(SqlConnection?sqlcon?=?new?SqlConnection(GetConStr()))
????????????{
????????????????sqlcon.Open();
????????????????using?(SqlCommand?sqlcom?=?new?SqlCommand(sql?sqlcon))
????????????????{
????????????????????result?=?sqlcom.ExecuteScalar();
????????????????}
????????????????sqlcon.Close();
????????????}
????????????return?result;
????????}
???????
????public?static?bool?ReMemName(string?Name)
????????{
????????????int?len?=?Name.Length;
????????????if?(len?>?1?&&?len?7)
????????????{
????????????????for?(int?i?=?0;?i?????????????????{
????????????????????if?((int)Name[i]?<=?127)
????????????????????{
????????????????????????MessageBox.Show(“請根據(jù)提示規(guī)范輸入姓名!“);
????????????????????????return?true;
????????????????????}
????????????????}
????????????????return?false;
????????????}
????????????MessageBox.Show(“請根據(jù)提示規(guī)范輸入姓名!“);
????????????return?true;
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-11-19?19:28??學(xué)生簽到信息\
?????文件?????1591808??2015-11-19?13:05??學(xué)生簽到信息\attendance.bak
?????文件????????2430??2015-11-19?14:50??學(xué)生簽到信息\attendance.sql
?????目錄???????????0??2016-06-23?18:44??學(xué)生簽到信息\WindowsFormsProject\
?????目錄???????????0??2017-09-04?14:22??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\
?????文件?????????947??2015-07-15?08:33??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject.sln
?????文件???????94208??2016-06-04?16:00??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject.v11.suo
?????文件???????99840??2017-09-04?17:38??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject.v12.suo
?????文件?????????349??2015-11-19?19:13??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\App.config
?????目錄???????????0??2015-11-19?19:28??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\
?????目錄???????????0??2015-11-19?19:28??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\
?????文件???????20139??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\Calmness.ssk
?????文件???????20271??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\CalmnessColor1.ssk
?????文件???????20208??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\CalmnessColor2.ssk
?????文件????????5032??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\DeepCyan.ssk
?????文件????????5037??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\DeepGreen.ssk
?????文件????????4908??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\DeepOrange.ssk
?????文件???????16021??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\DiamondBlue.ssk
?????文件???????16669??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\DiamondGreen.ssk
?????文件???????16211??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\DiamondOlive.ssk
?????文件???????16031??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\DiamondPurple.ssk
?????文件???????15998??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\DiamondRed.ssk
?????文件???????10439??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\Eighteen.ssk
?????文件???????10382??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\EighteenColor1.ssk
?????文件????????9746??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\EighteenColor2.ssk
?????文件???????12591??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\Emerald.ssk
?????文件???????12261??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\EmeraldColor1.ssk
?????文件???????12360??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\EmeraldColor2.ssk
?????文件???????11422??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\EmeraldColor3.ssk
?????文件???????18859??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\GlassBrown.ssk
?????文件???????16097??2010-04-04?21:03??學(xué)生簽到信息\WindowsFormsProject\WindowsFormsProject\bin\Debug\GlassGreen.ssk
............此處省略129個文件信息
評論
共有 條評論