protected void LinkButtonyxck_Click(object sender, EventArgs e)//允许学生查看作业 { if (ListBoxzuoye.SelectedIndex >= 0 && ListBoxbanji.SelectedIndex >= 0) { string yxck = LinkButtonyxck.CommandArgument.ToString(); string zuoyeid = ListBoxzuoye.SelectedValue; string banjiid = ListBoxbanji.SelectedValue; if (ZuoyeInfo.SetZuoyeYunxuChakan(int.Parse(zuoyeid), int.Parse(banjiid), yxck)) { ScriptManager.RegisterClientScriptBlock(this, typeof(string), "", "<script language='javascript'>alert('" + yxck + "学生查看作业,成功!');</script>", false); BindZuoye(); } else { ScriptManager.RegisterClientScriptBlock(this, typeof(string), "", "<script language='javascript'>alert('" + yxck + "学生查看作业,成功!');</script>", false); } } else { ScriptManager.RegisterClientScriptBlock(this, typeof(string), "zyxx", "<script language='javascript'>alert('请选择班级、作业!');</script>", false); } }