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

正文內(nèi)容

學(xué)生成績管理系統(tǒng)設(shè)計(jì)與開發(fā)畢業(yè)論文(已改無錯(cuò)字)

2023-07-25 17:41:18 本頁面
  

【正文】 鍵代碼如下:(1)按類別搜索,可模糊查詢protected void btnSearch_Click(object sender, EventArgs e) { string str = 。 if(str==) (UpdatePanel1, (), btnSearch_Click, alert(39。請輸入關(guān)鍵字再進(jìn)行查詢!39。), true)。 int i = 。 switch (i) { case 0: GridViewBind()。 break。 case 1: string sqlstrid = select * from UserRole where RoleID like 39。%+ str +%39。 。 DataTable dtid = (sqlstrid)。 = dtid。 ()。 break。 case 2: string sqlstrnamer = select * from UserRole where Name like 39。%+ str +%39。 。 DataTable dtnamer = (sqlstrnamer)。 = dtnamer。 ()。 break。 } if ( == 0) { (UpdatePanel1, (), btnSearch_Click, alert(39。未找到符合條件的用戶!39。), true)。 } }(2)數(shù)據(jù)更新操作,代碼如下:protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { string id = [].()。 string namer = ((TextBox)([].Cells[1].Controls[0])).()。 string des = ((TextBox)([].Cells[2].Controls[0])).()。 string str = update UserRole set Name=39。 + namer + 39。,Description=39。 + des + 39。 where RoleID=39。 + id + 39。 if ((str) 0) { (UpdatePanel1, (), GridView1_RowUpdating, alert(39。更新成功!39。), true)。 = 1。 GridViewBind()。 } else { (UpdatePanel1, (), GridView1_RowUpdating, alert(39。錯(cuò)誤!未能成功更新!39。), true)。 = 1。 GridViewBind()。 } }(3)新增用戶角色,代碼如下:protected void btnadd_Click(object sender, EventArgs e) { string sql1 = select count(*) from UserRole where RoleID=39。 + + 39。 SqlDataReader dr = (sql1)。 ()。 if (dr[0].ToString() == 1) { (UpdatePanel1, (), btnAdd_Click, alert(39。此ID已被注冊,請重新輸入!39。), true)。 } else { string sqlstr = insert into UserRole values(39。 + + 39。,39。 + + 39。,39。 + + 39。)。 int i = (sqlstr)。 if (i 0) { (UpdatePanel1, (), btnAdd_Click, alert(39。添加成功!39。), true)。 ()。//清空文本框 } } ()。 GridViewBind()。 }(4)點(diǎn)擊“編輯”下的“刪除”時(shí),提示“是否刪除?”,代碼如下:script language=JavaScript type=text/javascript function delete_confirm(e) { if ( == 刪除) = confirm(您確定要?jiǎng)h除嗎?)。 } = delete_confirm。 /script 權(quán)限管理模塊系統(tǒng)管理員進(jìn)入該頁面,為不同角色分配權(quán)限,本模塊如圖所示:后臺關(guān)鍵代碼如下: (1) 下拉框發(fā)生變化時(shí),角色名與ID在其下方顯示,因“系統(tǒng)管理員”角色不可刪除,所以在選擇“請選擇角色”和“系統(tǒng)管理員”時(shí),“刪除該角色”按鈕不顯示。 protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (!=請選擇角色) { = 。 = true。 = 。 = true。 bind()。//勾選權(quán)限 if(==系統(tǒng)管理員) = false。 } else { = false。 = 。 = false。 = 。 for (int i = 0。 i = 1。 i++) { CheckBox chk = (CheckBox)([i].FindControl(CheckBox1))。 = false。 } } }(2)刪除該角色,該按鈕前臺代碼OnClientClick=return confirm(39。刪除該角色,會刪除該角色下的所有用戶,您確定要繼續(xù)嗎?39。)后臺代碼如下:protected void btnDelRole_Click(object sender, EventArgs e) { if ( != 系統(tǒng)管理員) { string strRoleID = 。 string sqlstr1 = delete from RoleRight where RoleID=39。 + strRoleID + 39。 int z = (sqlstr1)。 string sqlstr2 = delete from [User] where RoleID=39。 + strRoleID + 39。 int x = (sqlstr2)。 string sqlstr = delete from UserRole where RoleID=39。 + strRoleID + 39。 int i = (sqlstr)。 if (z 0 amp。amp。 x 0 amp。amp。 i 0) { (UpdatePanel1, (), btnDelRole_Click, alert(39。刪除成功!39。), true)。 } else { (UpdatePanel1, (), btnDelRole_Click, alert(39。未能成功刪除該角色!39。), true)。 } } ddlBind()。 = false。 = 。 = false。 = 。 GridViewBind()。 }(3)在初始數(shù)據(jù)綁定時(shí),根據(jù)角色I(xiàn)D,勾選對應(yīng)的“權(quán)限”,以顯示在頁面上,代碼如下:protected void bind() { string sqlstr1 = select ModuleID,TheRight from RoleRight where RoleID=39。 + + 39。 DataTable dt1 = (sqlstr1)。 for (int j = 0。 j 。 j++) { if ([j][TheRight].ToString() ==1) { string strMid = [j][ModuleID].ToString()。 for (int i = 0。 i = 1。 i++) { if ([i].() == strMid) { CheckBox chk = (CheckBox)([i].FindControl(CheckBox1))。 = true。 } } } else { string strMid = [j][ModuleID].ToString()。 for (int i = 0。 i = 1。 i++) { i
點(diǎn)擊復(fù)制文檔內(nèi)容
數(shù)學(xué)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1