WebSite3/dean/studentUpdate.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CheckOnWork.Model;
using CheckOnWork.BusinessLogicLayer;
public partial class dean_studentUpdate : System.Web.UI.Page
{
CheckOnWork.BusinessLogicLayer.StudentBLL studentBll = new StudentBLL();
CheckOnWork.BusinessLogicLayer.ProfessionalBLL professionalBll = new ProfessionalBLL();
static CheckOnWork.Model.Student student=new Student();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// 验证当前用户的身份
if (Session["State"].ToString() != "dean")
{
Response.Write("<script type='text/javascript'>alert('您还没有登录!无法访问');self.parent.location.href('../default.aspx') </script>");
}
IList<CheckOnWork.Model.professional> professionalList = professionalBll.GetProfessionByDepartmentId(Convert.ToInt32(Session["departmentId"]));
// 为下拉列表绑定数据
ddlBianHao.DataSource = professionalList;
ddlBianHao.DataTextField = "professionalName";
ddlBianHao.DataBind();
student = studentBll.GetStudentById(Request.QueryString["id"].ToString());
//依据传来的Id值填充各文本控件
txtStudentID.Text = student.studentID;
//id不能改变为只读
txtStudentID.ReadOnly = true;
txtStudentName.Text = student.studentName;
ddlBianHao.Text = professionalBll.GetProfessionalById(student.professionalID).professionalName;
ddlSex.Text = student.studentSex;
txtBirth.Text=student.studentBirthday.ToShortDateString();
txtPhone.Text = student.studentPhone;
}
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
int professionalID = professionalBll.GetProfessionIdByName(ddlBianHao.Text);
//Response.Write(txtStudentID.Text);
//Response.Write(txtStudentName.Text);
//Response.Write(student.studentPwd.ToString());
//Response.Write(professionalID);
//Response.Write(ddlSex.Text);
//Response.Write(Convert.ToDateTime(txtBirth.Text.ToString()));
//Response.Write(txtPhone.Text);
Student Newstudent = new Student(txtStudentID.Text, txtStudentName.Text, student.studentPwd.ToString(), professionalID, ddlSex.Text, Convert.ToDateTime(txtBirth.Text.ToString()), txtPhone.Text);
后面还有 11 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。