protected void Page_Load(object sender, EventArgs e) { Student student = (Student)Session["loginuser"]; string stuAccount = student.StuAccount; TitleRecordBll titleRecordBll = new TitleRecordBll(); PathBll pathBll = new PathBll(); TitleRecord titleRecord = titleRecordBll.getRtId(stuAccount); int titleRecordId = titleRecord.TitleRecordId; OpenReport openReport = titleRecordBll.getState(titleRecordId); Path path = pathBll.getState(titleRecordId, 0); openState = openReport.state; state = path.state; }
protected void Page_Load(object sender, EventArgs e) { TitleRecordBll trbll = new TitleRecordBll(); student = (Student)Session["loginuser"]; stuAccount = student.StuAccount; stuName = student.RealName; profession = student.profession.ProName; dsTR = trbll.GetByAccount(stuAccount); if (dsTR == null) { opinion = "暂未选题"; } else { for (int i = 0; i < dsTR.Tables[0].Rows.Count; i++) { string stuaccount = dsTR.Tables[0].Rows[i]["stuAccount"].ToString(); if (stuaccount == stuAccount) { title = dsTR.Tables[0].Rows[0]["title"].ToString(); teaName = dsTR.Tables[0].Rows[0]["teaName"].ToString(); planId = Convert.ToInt32(dsTR.Tables[0].Rows[0]["planId"].ToString()); titleRecordId = Convert.ToInt32(dsTR.Tables[0].Rows[0]["titleRecordId"].ToString()); break; } } OpenReport openReport = trbll.getState(titleRecordId); state = openReport.state; or = orbll.Select(titleRecordId); open = orbll.Select(titleRecordId); if (open == null) { opinion = "教师未回复,请耐心等待"; } else { opinion = open.teacherOpinion; deanOpinion = open.deanOpinion; } } Result result = orbll.isOpenReport(stuAccount, planId); if (result == Result.记录存在) { insert(); } }