protected void Page_Load(object sender, EventArgs e) { if (Session["loginModel"] == null) { Response.Write("<script>alert('请重新登录');opener.top.location.href='../../Default.aspx';window.close();</script>"); return; } Id = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(Request.QueryString["Id"])); studentsRotaryInformation2Model = new StudentsRotaryInformation2Model(); studentsRotaryInformation2BLL = new StudentsRotaryInformation2BLL(); studentsRotaryInformation2Model = studentsRotaryInformation2BLL.GetModelById(Id); Name = studentsRotaryInformation2Model.Name; TrainingBaseCode = studentsRotaryInformation2Model.TrainingBaseCode; if (!IsPostBack) { training_base_name.Text = studentsRotaryInformation2Model.TrainingBaseName; training_base_code.Value = studentsRotaryInformation2Model.TrainingBaseCode; professional_base_name.Text = studentsRotaryInformation2Model.ProfessionalBaseName; professional_base_code.Value = studentsRotaryInformation2Model.ProfessionalBaseCode; rotary_dept_name.Text = studentsRotaryInformation2Model.DeptName; rotary_dept_code.Value = studentsRotaryInformation2Model.DeptCode; instructor.Text = studentsRotaryInformation2Model.TeachersRealName; writor.Value = studentsRotaryInformation2Model.RealName; register_date.Text = DateTime.Now.ToString("yyyy-MM-dd"); } }