freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

用csharp語言和sql設(shè)計(jì)簡單教務(wù)管理系統(tǒng)(編輯修改稿)

2025-09-04 02:13 本頁面
 

【文章內(nèi)容簡介】 { using (SqlConnection con = ()) { if ( == ) { ()。 } try { string sql = Insert into TTable(tname,tno,tsex,tage,tdep) Values(@tname,@tno,@tsex,@tage,@tdep)。//查詢語句同學(xué)也可以參考教材上的例子編括寫 SqlCommand cmd = new SqlCommand(sql, con)。 SqlParameter p1 = new SqlParameter(@tname, st[0])。 SqlParameter p2 = new SqlParameter(@tno, st[1])。 SqlParameter p3 = new SqlParameter(@tsex, st[2])。 SqlParameter p4 = new SqlParameter(@tage, st[3])。 SqlParameter p5 = new SqlParameter(@tdep, st[4])。 (p1)。 (p2)。 (p3)。 (p4)。 (p5)。 ()。 (信息添加成功!)。 } catch (Exception ex) { (錯(cuò)誤: + , 錯(cuò)誤提示, , )。 } finally { if ( == ) { ()。 ()。 } } } } public DataSet GetData(string st) { DataSet ds = new DataSet(TTable)。 using (SqlConnection con = ()) { if ( == ) { ()。 } try { string sql = Select * From TTable。 SqlDataAdapter sqlda = new SqlDataAdapter(sql, con)。 (ds)。 } catch (Exception ex) { (錯(cuò)誤: + , 錯(cuò)誤提示, , )。 } finally { if ( == ) { ()。 ()。 } } } return ds。 } public void Delete(string id) { using (SqlConnection con = ()) { if ( == ) { ()。 } try { string sql = Delete From TTable Where tno= + 39。 + id + 39。 SqlCommand d = new SqlCommand(sql, con)。 ()。 } catch (Exception ex) { (錯(cuò)誤: + , 錯(cuò)誤提示, , )。 } finally { if ( == ) { ()。 ()。 } } } } public void Updata(String[] st, string id) { using (SqlConnection con = ()) { if ( == ) { ()。 } try { string sql = Update TTable set tname=@tname,tno=@tno,tsex=@tsex,tage=@tage,tdep=@tdep where tno = + 39。 + id + 39。 SqlCommand cmd = new SqlCommand(sql, con)。 SqlParameter p1 = new SqlParameter(@tname, st[0])。 SqlParameter p2 = new SqlParameter(@tno, st[1])。 SqlParameter p3 = new SqlParameter(@tsex, st[2])。 SqlParameter p4 = new SqlParameter(@tage, st[3])。 SqlParameter p5 = new SqlParameter(@tdep, st[4])。 (p1)。 (p2)。 (p3)。 (p4)。 (p5) ()。 } catch (Exception ex) { (錯(cuò)誤: + , 錯(cuò)誤提示, , )。 } finally { if ( == ) { ()。 ()。 } } } } }}(4) Program類代碼using System。using 。using 。using 。using ConsoleApplication2。namespace WindowsFormsApplication2{ static class Program { /// summary /// 應(yīng)用程序的主入口點(diǎn)。 /// /summary [STAThread] static void Main() { ()。 (false)。 (new login())。 } }}(五)登錄界面 login 1)窗體截圖 圖29 登錄窗體2) 代碼using System。using 。using 。using 。using 。using 。using 。using 。using 。namespace ConsoleApplication2{ public partial class login : Form { string str =@Data Source = .\sqlexpress。Initial Catalog = EducationManageSystem。User ID=sa。Password=123456。 SqlConnection conn = new SqlConnection()。 bool bl = false。 public login() { InitializeComponent()。 } private void button1_Click(object sender, EventArgs e) { if (bl ==true ) {this .Close()。 } = str。 string sql = 。 if ( == true) //學(xué)生登錄 { sql = exec login_stu 39。 + + 39。,39。 + + 39。 (歡迎您以學(xué)生身份登錄教務(wù)管理系統(tǒng)!)。 mainform mfm = new mainform()。 ()。 SqlCommand cmd = new SqlCommand(sql, conn)。 //執(zhí)行sql語句 ()。 int count1 = (int)()。 //返回由存儲(chǔ)過程返回的結(jié)果(個(gè)數(shù)) if (count1 0) { stuform mainform = new stuform()。 = 。 = 。 //參數(shù)傳遞 ()。 ()。
點(diǎn)擊復(fù)制文檔內(nèi)容
語文相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1