/// <summary> /// 返回一个学生选题主页面 /// </summary> /// <returns></returns> public ActionResult Index() { var bll = new StudentBll(); string account = Session["account"].ToString(); long thesisid = bll.QueryThesisId(account); List <string> list = bll.QueryTeacherOpinionBll(account, thesisid); PersonalThesis thesis = bll.QueryThesisInfo(account); thesis = thesis ?? new PersonalThesis(-1, "", "", "", ""); int[] weight = bll.QueryThesisStatus(thesisid); int passWeight = Convert.ToInt32(HttpContext.Application["pastWeight"]); #region 论题状态判断 string thesisStatus = ""; if (weight[0] < 1) { thesisStatus = "暂时没有课题信息"; } else if (weight[0] > 0 && weight[1] < passWeight) { thesisStatus = "课题审核中"; } else if (weight[1] >= passWeight) { thesisStatus = "课题审核通过"; } else if (weight[0] == passWeight && weight[1] < passWeight) { thesisStatus = "审核不通过"; } #endregion ViewBag.status = thesisStatus; ViewBag.thesisInfo = thesis; ViewBag.advertise = list; ViewBag.username = bll.GetName(account); ViewBag.sno = account; return(View()); }