protected int GetStatusText() { int state; Model.CCOM.Topic_relation model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + GetAdminInfo_CCOM().User_id); if (model == null) { state = 2; //未选 } else if (model.Accept_state == 0) { state = 3; //已选,可换 } else if (model.Accept_state == 1) { state = 1; //已选,不可换 } else if (model.Accept_state == 2) { state = 3; } else { state = 1; } return(state); }
protected String GetScore(long userId) { var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId); if (relation_model == null) { return("--"); } var model = new BLL.CCOM.Proposal().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); if (model == null) { return("--"); } if (model.Result == 0) { return("未审核"); } if (model.Result == 1) { return("已通过"); } if (model.Result == 2) { return("未通过"); } return("--"); }
protected void Page_Load(object sender, EventArgs e) { studentID = 0; if (GetAdminInfo_CCOM().Role_id == 3) { studentID = GetAdminInfo_CCOM().User_id; } else { studentID = long.Parse(DESEncrypt.Decrypt(MyRequest.GetQueryString("studentID"))); } this.MyUserID.Text = studentID.ToString(); if (!Page.IsPostBack) { if (studentID == 0) { JscriptMsg("传输参数不正确!", "back", "Error"); return; } string ht = ""; Model.CCOM.Topic_relation model = new Model.CCOM.Topic_relation(); model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + studentID + "and Accept_state=1"); if (model == null) { ht = " <div class=\"content\" align=\"center\"><h3>您尚无选题<h3></div>"; this.print_div.InnerHtml = ht; } else { AddSubmitButton(); ShowInfo(); } } }
protected void btnSubmit_Error(object sender, EventArgs e) { BLL.CCOM.Topic_relation bll = new BLL.CCOM.Topic_relation(); for (int i = 0; i < topicrelation.Length; i++) { try { Model.CCOM.Topic_relation model = bll.GetModel(" Topic_relation_id=" + topicrelation[i]); if (model != null) { model.Accept_state = 2; if (bll.Update(model)) { BLL.CCOM.Topic topic_bll = new BLL.CCOM.Topic(); Model.CCOM.Topic topic_model = topic_bll.GetModel(model.Topic_id); topic_model.Selected_state = false; topic_bll.Update(topic_model); JscriptMsg("审核成功啦!", "TeacherChoose.aspx?fun_id=" + get_fun_id("CCOM/TopicManage/TeacherChoose.aspx"), "Success"); } else { JscriptMsg("审核失败", "TeacherChoose.aspx?fun_id=" + get_fun_id("CCOM/TopicManage/TeacherChoose.aspx"), "Success"); } } } catch { continue; } } }
private string DoAction() { string DataList = this.txtDataList.InnerText; string Anguage = this.txtAnguage.InnerText; string Environmental = this.txtEnvironmental.InnerText; string LineCount = this.txtLineCount.InnerText; string LineHand = this.txtLineHand.InnerText; if (DataList == "") { return("请添加验收资料清单"); } if (Anguage == "") { return("请添加源语言/开发环境"); } if (Environmental == "") { return("请添加运行环境/系统配置"); } if (LineCount == "") { return("请添加总代码行数/字节数(KB)"); } if (LineHand == "") { return("请添加手工编写代码行数"); } long Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + UserID).Topic_relation_id; var software_model = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + Topic_relation_id); if (software_model != null) { software_model.Data_list = DataList; software_model.anguage = Anguage; software_model.Environmental = Environmental; software_model.Line_count = LineCount; software_model.Line_hand = LineHand; if (!new BLL.CCOM.Software_accept().Update(software_model)) { return("更新软件验收表异常"); } } else { Model.CCOM.Software_accept soft_model = new Model.CCOM.Software_accept(); soft_model.Data_list = DataList; soft_model.anguage = Anguage; soft_model.Environmental = Environmental; soft_model.Line_count = LineCount; soft_model.Line_hand = LineHand; soft_model.Topic_relation_id = Topic_relation_id; if (new BLL.CCOM.Software_accept().Add(soft_model) == 0) { return("添加软件验收表异常"); } } return(""); }
protected void Page_Load(object sender, EventArgs e) { UserID = 0; UserID = GetAdminInfo_CCOM().User_id; if (!Page.IsPostBack) { if (UserID == 0) { JscriptMsg("传输参数不正确!", "back", "Error"); return; } string ht = ""; Model.CCOM.Topic_relation model = new Model.CCOM.Topic_relation(); model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + GetAdminInfo_CCOM().User_id + "and Accept_state=1"); if (model == null) { ht = " <div class=\"content\" align=\"center\"><h3>您尚无选题<h3><table class=\"table table-striped table-bordered dataTable\"></table></div>"; this.print_div.InnerHtml = ht; btnSubmit.Visible = false; //JscriptMsg("您尚无选题!", "back", "Error"); //return; } else { ShowInfo(); } } }
protected String GetURL(long userId) { var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId); if (relation_model == null) { return("--"); } var model = new BLL.CCOM.Proposal().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); if (model == null) { return("--"); } var rs_models = new BLL.CCOM.Reply_student().GetModelList(" User_id=" + userId); foreach (var rs_model in rs_models) { long group_id = rs_model.Group_id; if (new BLL.CCOM.Reply_group().GetModel(group_id).Group_type == 2) { return("<a href=\"ProposalReview.aspx?userId=" + DESEncrypt.Encrypt(userId.ToString()) + "&groupid=" + DESEncrypt.Encrypt(group_id.ToString()) + "&fun_id=<%=DESEncrypt.Encrypt(\"15\") %>开题评审表</a>"); break; } } return("--"); }
protected int ShowInfo() { Model.CCOM.User_information model = GetAdminInfo_CCOM(); long _id = model.User_id; int score_t = -1, score_c = -1, score_s = -1; BLL.CCOM.User_information user_bll = new BLL.CCOM.User_information(); Model.CCOM.User_information user_model = user_bll.GetModel(_id); if (user_model == null) { InnerRedirect(MyEnums.RediirectErrorEnum.ParameterError); } var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + _id); if (relation_model == null) { return(-1); } var comment_model = new BLL.CCOM.Comment().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); try { score_t = (int)comment_model.Teacher_score; } catch { score_t = -1; } try { score_c = (int)comment_model.Reply_score; } catch { score_c = -1; } try { var soft_model = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); score_s = (int)soft_model.Conclusion; } catch { score_s = -1; } if (score_c >= 0 && score_s >= 0 && score_t >= 0) { return(1); } else { return(0); } }
protected String GetTeacher(long userId) { try { var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId); return(new BLL.CCOM.User_information().GetModel(relation_model.Teacher_id).User_realname); } catch { return("--"); } }
protected String GetTopic(long userId) { try { var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId); return(new BLL.CCOM.Topic().GetModel(relation_model.Topic_id).Topic_name); } catch { return("--"); } }
public void ShowInfo() { // Model.CCOM.View_User user_model = new BLL.CCOM.View_User().GetModel(" User_id=" + UserID); var group_model = new BLL.CCOM.Reply_group().GetModel(" Group_id=" + Group_id); var leader_model = new BLL.CCOM.View_User().GetModel(" User_id=" + group_model.User_id); long Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + UserID).Topic_relation_id; var comment_model = new BLL.CCOM.Comment().GetModel(" Topic_relation_id=" + Topic_relation_id); // PageTitle = user_model.User_realname + "的答辩评语表"; this.txtTeacherComment.Disabled = true; this.txtTeacherScore.Disabled = true; string score = "--"; if (comment_model != null) { score = comment_model.Reply_score.ToString(); } reviewTr = "<tr><td class=\"firstTab\">" + leader_model.User_realname + "</td><td class=\"otherTab\">" + GetTitle(leader_model.User_id) + "</td><td class=\"otherTab\">主席</td><td class=\"otherTab\">" + score + "</td></tr>"; var rcs = new BLL.CCOM.Reply_commission().GetModelList(" Group_id=" + Group_id); foreach (var rc in rcs) { var u_model = new BLL.CCOM.View_User().GetModel(" User_id=" + rc.User_id); var mark_table_model = new BLL.CCOM.View_Mark_table().GetModel(" Teacher_id=" + rc.User_id + " and Student_id=" + UserID); score = "--"; if (mark_table_model != null) { score = mark_table_model.Score.ToString(); } reviewTr += "<tr><td class=\"firstTab\">" + u_model.User_realname + "</td><td class=\"otherTab\">" + GetTitle(u_model.User_id) + "</td><td class=\"otherTab\">成员</td><td class=\"otherTab\">" + score + "</td></tr>"; } if (comment_model != null) { this.txtTeacherComment.InnerText = comment_model.Teacher_comment; this.txtTeacherScore.Value = comment_model.Teacher_score.ToString(); this.txtProblem.InnerText = comment_model.problem; this.txtReviewComment.InnerText = comment_model.Comment_content; this.txtScore.Value = comment_model.Reply_score.ToString(); } if (GetAdminInfo_CCOM().User_id != leader_model.User_id) { var mark_table_model = new BLL.CCOM.View_Mark_table().GetModel(" Teacher_id=" + GetAdminInfo_CCOM().User_id + "and student_id=" + UserID); score = ""; if (mark_table_model != null) { score = mark_table_model.Score.ToString(); } this.txtScore.Value = score; this.txtProblem.Disabled = true; this.txtReviewComment.Disabled = true; } }
public void ShowInfo() { Model.CCOM.Homework work_model = new BLL.CCOM.Homework().GetModel(Homework_id); this.type.InnerText = new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name; if (work_model.DatumType_id == 1)//周志 { this.fileTR.Visible = false; this.logTRcontent.Visible = true; this.logTRproblem.Visible = true; this.logTRplan.Visible = true; this.logTRstarttime.Visible = true; this.logTRendtime.Visible = true; Model.CCOM.Week_log week_model = new BLL.CCOM.Week_log().GetModel(CheckId); Model.CCOM.Topic_relation rela_model = new BLL.CCOM.Topic_relation().GetModel(week_model.Topic_relation_id); this.name.InnerText = new BLL.CCOM.User_information().GetModel(rela_model.Student_id).User_realname; this.time.InnerText = week_model.Submit_time.ToString("yyyy年MM月dd日 ddd HH:mm"); this.txtAdvice.InnerText = week_model.Advice; this.txtStarttime.InnerText = week_model.Start_time.ToString("yyyy-MM-dd"); this.txtEndtime.InnerText = week_model.End_time.ToString("yyyy-MM-dd"); this.lbContent.InnerText = week_model.Work_condition; this.lbProblem.InnerText = week_model.Problem; this.lbPlan.InnerText = week_model.Work_plan; } else //其他 { this.fileTR.Visible = true; this.logTRcontent.Visible = false; this.logTRproblem.Visible = false; this.logTRplan.Visible = false; this.logTRstarttime.Visible = false; this.logTRendtime.Visible = false; Model.CCOM.Datum datum_model = new BLL.CCOM.Datum().GetModel(CheckId); Model.CCOM.Topic_relation rela_model = new BLL.CCOM.Topic_relation().GetModel(datum_model.Topic_relation_id); this.name.InnerText = new BLL.CCOM.User_information().GetModel(rela_model.Student_id).User_realname; this.time.InnerText = datum_model.Submit_time.ToString("yyyy年MM月dd日 ddd HH:mm"); this.txtAdvice.InnerText = datum_model.Tutor_advice; //this.file.InnerHtml = "<p><a href='" + // "/home/news/Attach.aspx?id=" + DESEncrypt.Encrypt(datum_model.Datum_id.ToString()) + // ("&address=") + (HttpUtility.UrlEncode(datum_model.File_path)) + // ("&name=") + (HttpUtility.UrlEncode(datum_model.File_name)) + // ("' target='_blank' >") + // (datum_model.File_name) + // ("</a>") + // (OnlineViewHelper.GetOnlineViewWrapLink(datum_model.File_path, datum_model.File_name)) + ("</p>"); this.lbtnDownLoad.Text = datum_model.File_name; } }
private string DoAction() { string RunStatus = this.txtRunStatus.InnerText; string Feature = this.txtFeature.InnerText; string Score = this.txtScore.Value; if (RunStatus == "") { return("请添加软件运行状况"); } if (Feature == "") { return("请添加软件特点及应用情况"); } if (Score == "") { return("请添加验收结论(最后须给出定量的百分制结论)"); } int sc = int.Parse(Score); long Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + UserID).Topic_relation_id; var software_model = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + Topic_relation_id); if (software_model != null) { software_model.Run_status = RunStatus; software_model.Feature = Feature; software_model.Conclusion = sc; software_model.Time = DateTime.Now; if (!new BLL.CCOM.Software_accept().Update(software_model)) { return("更新验收结果异常"); } } else { Model.CCOM.Software_accept soft_model = new Model.CCOM.Software_accept(); soft_model.Run_status = RunStatus; soft_model.Feature = Feature; soft_model.Conclusion = sc; soft_model.Topic_relation_id = Topic_relation_id; soft_model.Time = DateTime.Now; if (new BLL.CCOM.Software_accept().Add(soft_model) == 0) { return("添加验收结果异常"); } } return(""); }
protected String GetSoftwareScore(long userId) { int score; try { var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId); var model = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); score = (int)model.Conclusion; } catch { return("--"); } return(score.ToString()); }
protected void Page_Load(object sender, EventArgs e) { relationID = 0; studentID = 0; if (GetAdminInfo_CCOM().Role_id == 3) { studentID = GetAdminInfo_CCOM().User_id; this.btnSubmit.Visible = false; } else { studentID = long.Parse(DESEncrypt.Decrypt(MyRequest.GetQueryString("studentID"))); } string ht = ""; Model.CCOM.Topic_relation model = new Model.CCOM.Topic_relation(); model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + studentID + "and Accept_state=1"); if (model != null) { relationID = model.Topic_relation_id; } if (!Page.IsPostBack) { if (studentID == 0) { JscriptMsg("传输参数不正确!", "back", "Error"); return; } //if(GetAdminInfo_CCOM().Role_id != 3) //{ // JscriptMsg("只有学生用户才可以提交材料!", "back", "Error"); // return; //} if (model == null) { ht = " <div class=\"content\" align=\"center\"><h3>该学生尚无选题<h3><table class=\"table table-striped table-bordered dataTable\"></table></div>"; this.print_div.InnerHtml = ht; } else { ShowInfo(); } } }
public void Bind_Data() { BLL.CCOM.Teach_week week_bll = new BLL.CCOM.Teach_week(); List <university.Model.CCOM.Teach_week> week_models = week_bll.GetModelList(""); string ht = ""; foreach (university.Model.CCOM.Teach_week week_model in week_models) { if (week_model != null) { ht += "<li id=\"section-1\" class=\"mainTab\">"; ht += "<hr style=\"height:10px;border:none;border-top:10px groove skyblue;\" />"; ht += "<div class=\"content\">"; ht += "<div class=\"span4\">"; ht += "<h3 class=\"sectionname\"><span>" + GetDateString(week_model.Start_time) + " - " + GetDateString(week_model.End_time) + "</span></h3><hr /></div>"; ht += "<div class=\"span6\" style=\"padding:22px 0;\">"; ht += "</div><ul class=\"span12\">"; BLL.CCOM.Homework work_bll = new BLL.CCOM.Homework(); List <university.Model.CCOM.Homework> work_models = work_bll.GetModelList(" Week_id=" + week_model.TeachWeek_id); foreach (university.Model.CCOM.Homework work_model in work_models) { if (work_model.DatumType_id == 2)//如果类型是提交开题报告 { ht += "<li class=\"fileTab\"><div><div class=\"mod-indent-outer\"><div class=\"mod-indent\"></div><div><div class=\"activityinstance\">"; ht += "<a href=\"StudentSubmit.aspx?homeworkId=" + work_model.Homework_id + "&fun_id=<%=DESEncrypt.Encrypt(\"15\") %><img src=\"/images/sendfile.png\"/> 提交" + (new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name) + "</a>"; ht += "</div></div></div></div></li>"; } else { ht += "<li class=\"fileTab\"><div><div class=\"mod-indent-outer\"><div class=\"mod-indent\"></div><div><div class=\"activityinstance\">"; ht += "<a href=\"StudentSubmit.aspx?homeworkId=" + work_model.Homework_id + "&fun_id=<%=DESEncrypt.Encrypt(\"15\") %><img src=\"/images/sendfile.png\"/> 提交" + (new BLL.CCOM.Datum_type().GetModel(work_model.DatumType_id).DatumType_name) + "</a>"; ht += "</div></div></div></div></li>"; } } ht += "</ul></div></li>"; } } Model.CCOM.Topic_relation model = new Model.CCOM.Topic_relation(); model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + GetAdminInfo_CCOM().User_id + "and Accept_state=1"); if (model == null) { ht = " <div class=\"content\" align=\"center\"><h3>您尚无选题<h3></div>"; } this.week_list.InnerHtml = ht; }
/// <summary> /// 取得用户口头答辩成绩 /// 返回-1表示没有该生对应的口头答辩成绩 /// </summary> public float GetUser_CommentScore(long userid) { var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userid + " and Accept_state=1"); if (relation_model == null) { return(-1); } var comment_model = new BLL.CCOM.Comment().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); if (comment_model == null) { return(-1); } if (comment_model.Reply_score == null) { return(-1); } int score = (int)comment_model.Reply_score; int number = 1; var reply_students = new BLL.CCOM.Reply_student().GetModelList(" User_id=" + userid); foreach (var reply_student in reply_students) { long group_id = reply_student.Group_id; if (new BLL.CCOM.Reply_group().GetModel(group_id).Group_type == 0)//筛选出口头答辩组 { var mark_scores = new BLL.CCOM.Mark_table().GetModelList(" Rs_id=" + reply_student.Rs_id); foreach (var mark_score in mark_scores) { if (mark_score.Score != null) { score += (int)mark_score.Score; number++; } } } } return(score / number); }
private string DoAction() { string opinion = this.txtOpinion.InnerText; string result = this.ddlresult.SelectedValue; if (opinion == "") { return("请添加评审意见"); } if (result == "0") { return("请添加评审结果"); } long Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + UserID).Topic_relation_id; var proposal_model = new BLL.CCOM.Proposal().GetModel(" Topic_relation_id=" + Topic_relation_id); if (proposal_model == null)//添加评审意见 { Model.CCOM.Proposal p_model = new Model.CCOM.Proposal(); p_model.Topic_relation_id = Topic_relation_id; p_model.Review = opinion; p_model.Result = int.Parse(result); if (new BLL.CCOM.Proposal().Add(p_model) == 0) { return("添加评审结果异常"); } } else//更新评审意见 { proposal_model.Review = opinion; proposal_model.Result = int.Parse(result); if (!new BLL.CCOM.Proposal().Update(proposal_model)) { return("更新评审结果异常"); } } return(""); }
public void ShowInfo() { Model.CCOM.View_User user_model = new BLL.CCOM.View_User().GetModel(" User_id=" + UserID); long Group_id = GetGroupId(UserID); if (Group_id == 0) { this.print_div.InnerHtml = " <div class=\"content\" align=\"center\"><h3>您尚未被分配到任何软件验收组<h3><table class=\"table table-striped table-bordered dataTable\"></table></div>";; btnSubmit.Visible = false; return; } var group_model = new BLL.CCOM.Reply_group().GetModel(" Group_id=" + Group_id); var leader_model = new BLL.CCOM.View_User().GetModel(" User_id=" + group_model.User_id); PageTitle = user_model.User_realname + "的软件验收表"; this.txtRunStatus.Disabled = true; this.txtFeature.Disabled = true; this.txtScore.Disabled = true; this.lblName.InnerText = user_model.User_realname; this.lblNumber.InnerHtml = user_model.User_number; var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + UserID); if (relation_model != null) { this.lblTeacher.InnerText = new BLL.CCOM.User_information().GetModel(relation_model.Teacher_id).User_realname; this.lblTitle.InnerText = new BLL.CCOM.Topic().GetModel(relation_model.Topic_id).Topic_name; } else { return; } string leader_title = "--"; var leader_tutor_model = new BLL.CCOM.Tutor().GetModel(" User_id=" + leader_model.User_id); if (leader_tutor_model != null) { if (leader_tutor_model.Title_id != null) { leader_title = new BLL.CCOM.Title().GetModel((int)leader_tutor_model.Title_id).Title_name; } else { leader_title = "--"; } } reviewTr = "<tr><td style=\"text-align:center;\">组长</td><td style=\"text-align:center;\">" + leader_model.User_realname + "</td><td style=\"text-align:center;\">" + leader_title + "</td><td colspan=\"3\" style=\"text-align:center;\">" + leader_model.Agency_name + "</td></tr>"; var rcs = new BLL.CCOM.Reply_commission().GetModelList(" Group_id=" + Group_id); foreach (var rc in rcs) { var u_model = new BLL.CCOM.View_User().GetModel(" User_id=" + rc.User_id); string title = "--"; var tutor_model = new BLL.CCOM.Tutor().GetModel(" User_id=" + rc.User_id); if (tutor_model != null) { if (tutor_model.Title_id != null) { title = new BLL.CCOM.Title().GetModel((int)tutor_model.Title_id).Title_name; } else { title = "--"; } } reviewTr += "</tr><td style=\"text-align:center;\">组员</td><td style=\"text-align:center;\">" + u_model.User_realname + "</td><td style=\"text-align:center;\">" + title + "</td><td colspan=\"3\" style=\"text-align:center;\">" + u_model.Agency_name + "</td></tr>"; } var software_model = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); if (software_model != null) { if (software_model.Time != null) { this.lblTime.InnerText = software_model.Time.Value.ToString("yyyy年MM月dd日 HH:mm:ss"); } this.txtDataList.InnerText = software_model.Data_list; this.txtAnguage.InnerText = software_model.anguage; this.txtEnvironmental.InnerText = software_model.Environmental; this.txtLineCount.InnerText = software_model.Line_count; this.txtLineHand.InnerText = software_model.Line_hand; this.txtRunStatus.InnerText = software_model.Run_status; this.txtFeature.InnerText = software_model.Feature; this.txtScore.Value = software_model.Conclusion.ToString(); } }
protected string UpdateTopicState() { JsonData data = new JsonData(); string id = MyRequest.GetString("ID"); string myid = MyRequest.GetString("MYID"); string msg = ""; try { var bll = new BLL.CCOM.Topic(); var m = bll.GetModel("Topic_id=" + id); Boolean isOn = m.Selected_state == true; m.Selected_state = isOn ^ true; Model.CCOM.Topic_relation rela_model; rela_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + myid); if (rela_model == null) { rela_model = new Model.CCOM.Topic_relation(); rela_model.Student_id = Int64.Parse(myid); rela_model.Teacher_id = m.Teacher_id; rela_model.Topic_id = m.Topic_id; rela_model.Apply_time = DateTime.Now; rela_model.Accept_state = 0; long rela_id = (new BLL.CCOM.Topic_relation()).Add(rela_model); if (rela_id != 0) { if (bll.Update(m) == false) { new BLL.CCOM.Topic_relation().Delete(rela_id); msg = "修改发生异常!"; } } else { msg = "选题发生异常!"; } } else { Model.CCOM.Topic last_model = new BLL.CCOM.Topic().GetModel(rela_model.Topic_id); last_model.Selected_state = false; bll.Update(last_model); rela_model.Student_id = Int64.Parse(myid); rela_model.Teacher_id = m.Teacher_id; rela_model.Topic_id = m.Topic_id; rela_model.Apply_time = DateTime.Now; rela_model.Accept_state = 0; if (new BLL.CCOM.Topic_relation().Update(rela_model)) { if (bll.Update(m) == false) { new BLL.CCOM.Topic_relation().Delete(rela_model.Topic_relation_id); msg = "修改发生异常!"; } } else { msg = "选题发生异常!"; } } } catch { msg = "修改发生异常!"; } if (msg == "") { data["msg"] = "修改成功"; data["code"] = 1; } else { data["msg"] = msg; data["code"] = 0; } return(data.ToJson()); }
protected string AddStudent() { JsonData data = new JsonData(); string Group_id = MyRequest.GetString("GroupID"); string User_id = MyRequest.GetString("StudentID"); string msg = ""; if (Tools.CheckParams(Group_id + User_id)) { msg = "传输异常,存在非法字符!"; } else { try { long userid = long.Parse(User_id); long groupid = long.Parse(Group_id); //判断学生是否已经选题 var topic_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userid + " and Accept_state=1"); if (topic_model == null) { msg = "该同学尚未选择毕设题目!"; } BLL.CCOM.Reply_student bll = new BLL.CCOM.Reply_student(); Model.CCOM.Reply_student model = bll.GetModel(" Group_id=" + groupid + " and User_id=" + userid); if (msg == "") { if (model != null) { msg = "学生已在该答辩组中"; } else { bool isIn = true; var student_models = new BLL.CCOM.Reply_student().GetModelList(" User_id=" + User_id); var group_model = new BLL.CCOM.Reply_group().GetModel(long.Parse(Group_id)); Model.CCOM.Reply_group other_model = null;; foreach (Model.CCOM.Reply_student student_model in student_models) { if (new BLL.CCOM.Reply_group().GetModel(student_model.Group_id).Group_type.Equals(group_model.Group_type)) { isIn = false; other_model = new BLL.CCOM.Reply_group().GetModel(student_model.Group_id); break; } } if (isIn) { model = new Model.CCOM.Reply_student(); model.Group_id = groupid; model.User_id = userid; if (bll.Add(model) <= 0) { msg = "添加失败"; } } else { string name = new BLL.CCOM.User_information().GetModel(userid).User_realname; msg = "学生" + name + "已在" + other_model.Group_name + "答辩组中"; } } } } catch (Exception) { msg = "添加发生异常!"; } } if (msg == "") { data["msg"] = "添加成功"; data["code"] = 1; } else { data["msg"] = msg; data["code"] = 0; } return(data.ToJson()); }
protected string ImportDataItem(DataSet ds, ref int success, ref int error)//基础数据 { string result = ""; BLL.CCOM.User_information stu_bll = new BLL.CCOM.User_information(); Model.CCOM.User_information stu_model = new Model.CCOM.User_information(); BLL.CCOM.Topic topic_bll = new BLL.CCOM.Topic(); Model.CCOM.Topic topic_model = new Model.CCOM.Topic(); BLL.CCOM.Topic_relation rela_bll = new BLL.CCOM.Topic_relation(); Model.CCOM.Topic_relation rela_model = new Model.CCOM.Topic_relation(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string checkmsg = null; #region 添加学生信息========================== //学号 string number = ds.Tables[0].Rows[i]["学号"].ToString().Trim(); if (!ValidDFValue(number, true, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,学号" + checkmsg + "<br/>"; error++; continue; } else if (stu_bll.GetModel(" User_number='" + number + "'") != null) { stu_model = stu_bll.GetModel(" User_number='" + number + "'"); } else if (number != "") { stu_model.User_number = number; } //姓名 string name = ds.Tables[0].Rows[i]["姓名"].ToString().Trim(); if (!ValidDFValue(name, true, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,姓名" + checkmsg + "<br/>"; error++; continue; } else if (name != "") { stu_model.User_realname = name; } //性别 //string gender = ds.Tables[0].Rows[i]["性别"].ToString().Trim(); //if (!ValidDFValue(gender, true, "男|女", ref checkmsg)) //{ // result += "×第" + (i + 1).ToString() + "行数据更新失败,性别" + checkmsg + "<br/>"; // error++; // continue; //} //else if (gender == "男") //{ // stu_model.User_gender = false; //} //else if (gender == "女") //{ // stu_model.User_gender = true; //} //机构 stu_model.User_gender = false; string angency = ds.Tables[0].Rows[i]["行政班"].ToString().Trim(); if (!ValidDFValue(angency, true, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,所在班号" + checkmsg + "<br/>"; error++; continue; } BLL.CCOM.Agency agency_bll = new BLL.CCOM.Agency(); Model.CCOM.Agency agency_model = new Model.CCOM.Agency(); agency_model = agency_bll.GetModel(" Agency_name='" + angency + "'"); if (agency_model == null) { result += "×第" + (i + 1).ToString() + "行数据更新失败,所在班号不存在<br/>"; error++; continue; } stu_model.Agency_id = agency_model.Agency_id; stu_model.Role_id = 3; stu_model.User_password = DESEncrypt.MD5Encrypt(number); if (stu_bll.GetModel(" User_number='" + number + "'") == null) { stu_model.User_id = stu_bll.Add(stu_model); if (stu_model.User_id == 0) { result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>"; error++; continue; } else { BLL.CCOM.User_information user_bll = new BLL.CCOM.User_information(); Model.CCOM.User_information user_model = user_bll.GetModel("User_number='" + number + "'"); BLL.CCOM.Student student_bll = new BLL.CCOM.Student(); Model.CCOM.Student student_model = new Model.CCOM.Student(); student_model.User_id = user_model.User_id; student_model.Period_id = 4; student_bll.Add(student_model); } } else { if (!stu_bll.Update(stu_model)) { result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>"; error++; continue; } } #endregion #region 更新导师信息========================== var tea_model = new Model.CCOM.Tutor(); //姓名 string tea_name = ds.Tables[0].Rows[i]["指导教师"].ToString().Trim(); if (!ValidDFValue(tea_name, true, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,指导教师" + checkmsg + "<br/>"; error++; continue; } else if (tea_name != "") { var tea_user_model = new BLL.CCOM.User_information().GetModel(" User_realname='" + tea_name + "'"); if (tea_user_model == null) { result += "×第" + (i + 1).ToString() + "行数据更新失败,指导教师" + tea_name + "不存在<br/>"; error++; continue; } tea_model = new BLL.CCOM.Tutor().GetModel(" User_id=" + tea_user_model.User_id); string title_name = ds.Tables[0].Rows[i]["职称"].ToString().Trim(); if (!ValidDFValue(title_name, true, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,职称" + checkmsg + "<br/>"; error++; continue; } else if (title_name != "") { var title_model = new BLL.CCOM.Title().GetModel(" Title_name='" + title_name + "'"); if (title_model == null) { result += "×第" + (i + 1).ToString() + "行数据更新失败,职称" + title_name + "不存在<br/>"; error++; continue; } tea_model.Title_id = title_model.Title_id; if (!new BLL.CCOM.Tutor().Update(tea_model)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,更新导师信息失败<br/>"; error++; continue; } } } #endregion #region 导入选题信息========================== string topic_name = ds.Tables[0].Rows[i]["毕业设计题目"].ToString().Trim(); if (!ValidDFValue(topic_name, true, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,题目名称" + checkmsg + "<br/>"; error++; continue; } else if (topic_name != "") { topic_model.Topic_name = topic_name; } string Topic_nature = ds.Tables[0].Rows[i]["题目性质"].ToString().Trim(); if (!ValidDFValue(Topic_nature, false, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,题目性质" + checkmsg + "<br/>"; error++; continue; } else if (Topic_nature != "") { topic_model.Topic_nature = Topic_nature; } string Topic_source = ds.Tables[0].Rows[i]["题目来源"].ToString().Trim(); if (!ValidDFValue(Topic_source, false, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,题目来源" + checkmsg + "<br/>"; error++; continue; } else if (Topic_source != "") { topic_model.Topic_source = Topic_source; } string Topic_content = ds.Tables[0].Rows[i]["题目详情"].ToString().Trim(); if (!ValidDFValue(Topic_content, false, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,题目详情" + checkmsg + "<br/>"; error++; continue; } else if (Topic_content != "") { topic_model.Topic_content = Topic_content; } string Topic_task = ds.Tables[0].Rows[i]["任务书"].ToString().Trim(); if (!ValidDFValue(Topic_task, false, "", ref checkmsg)) { result += "×第" + (i + 1).ToString() + "行数据更新失败,任务书" + checkmsg + "<br/>"; error++; continue; } else if (Topic_task != "") { topic_model.Topic_task = Topic_task; } topic_model.Selected_state = true; topic_model.Check_state = 1; topic_model.Teacher_id = tea_model.User_id; topic_model.Company = "软件学院"; topic_model.Topic_id = topic_bll.Add(topic_model); if (topic_model.Topic_id == 0) { result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>"; error++; continue; } #endregion #region 题对应关系信息========================== if (rela_bll.GetModel(" Student_id=" + stu_model.User_id) != null && rela_bll.GetModel(" Student_id=" + stu_model.User_id).Accept_state != 2) { result += "×第" + (i + 1).ToString() + "行学生选题对应关系更新异常,该学生已经在系统有选题记录!<br/>"; error++; continue; } rela_model.Student_id = stu_model.User_id; rela_model.Teacher_id = tea_model.User_id; rela_model.Topic_id = topic_model.Topic_id; rela_model.Accept_state = 1; rela_model.Apply_time = DateTime.Now; rela_model.Topic_relation_id = rela_bll.Add(rela_model); if (rela_model.Topic_relation_id == 0) { result += "×第" + (i + 1).ToString() + "行数据更新异常<br/>"; error++; continue; } else { success++; } #endregion } return(result); }
protected void Page_Load(object sender, EventArgs e) { user_info = GetAdminInfo_CCOM(); //用户信息 if (user_info.Role_id != 3) //用户不为学生时,只显示欢迎界面 { this.someWhat.InnerHtml = "<div style=\"font-family: 仿宋; text-align: center; font-size:20px; margin-top: 50px; \">欢迎您使用毕业设计管理系统!</ div > "; } if (GetStatusText() == 1 || GetStatusText() == 3)//题目选择 { this.bt1.InnerHtml = "<a href=\" /AdminMetro/CCOM/TopicManage/StudentChoose.aspx?fun_id=F10BCF0BC92D37DB\" class=\"btn\" style=\" margin-left:105px; margin-top: 20px; background-color: #888; \">题目选择</a>" + " <a href=\" /AdminMetro/CCOM/DatumManage/StudentSubmitList.aspx\" class=\"btn\" style=\" margin-left:200px; margin-top: 20px;\">开题报告</a>" + "<a href=\" /AdminMetro/CCOM/ScoreManage/MySoftwarePage.aspx\" class=\"btn\" style=\" margin-left:210px; margin-top: 20px;\">提交答辩</a>" + "<a href=\" /AdminMetro/CCOM/ScoreManage/MyScore.aspx\" class=\"btn\" style=\" margin-left:210px; margin-top: 20px;\">查看评分</a> "; } //int homeworkId = MyRequest.GetQueryInt("homeworkId"); //Model.CCOM.Week_log log_model = new BLL.CCOM.Week_log().GetModel(" Homework_id=" + homeworkId); var user_model = HttpContext.Current.Session[MyKeys.SESSION_ADMIN_INFO] as Model.CCOM.User_information;//获得userid Model.CCOM.View_Datum model_1 = new BLL.CCOM.View_Datum().GetModel("User_id=" + user_model.User_id.ToString()); if (model_1 != null) { this.bt1.InnerHtml = "<a href=\" /AdminMetro/CCOM/TopicManage/StudentChoose.aspx?fun_id=F10BCF0BC92D37DB\" class=\"btn\" style=\" margin-left:105px; margin-top: 20px; background-color: #888; \">题目选择</a>" + " <a href=\" /AdminMetro/CCOM/DatumManage/StudentSubmitList.aspx\" class=\"btn\" style=\" margin-left:200px; margin-top: 20px;background-color: #888; \">开题报告</a>" + "<a href=\" /AdminMetro/CCOM/ScoreManage/MySoftwarePage.aspx\" class=\"btn\" style=\" margin-left:210px; margin-top: 20px;\">提交答辩</a>" + "<a href=\" /AdminMetro/CCOM/ScoreManage/MyScore.aspx\" class=\"btn\" style=\" margin-left:210px; margin-top: 20px;\">查看评分</a> "; } var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + GetAdminInfo_CCOM().User_id); if (relation_model != null) { var software_model = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); if (software_model != null) { if (software_model.Data_list != "") { this.bt1.InnerHtml = "<a href=\" /AdminMetro/CCOM/TopicManage/StudentChoose.aspx?fun_id=F10BCF0BC92D37DB\" class=\"btn\" style=\" margin-left:105px; margin-top: 20px;background-color: #888; \">题目选择</a>" + " <a href=\" /AdminMetro/CCOM/DatumManage/StudentSubmitList.aspx\" class=\"btn\" style=\" margin-left:200px; margin-top: 20px;background-color: #888; \">开题报告</a>" + "<a href=\" /AdminMetro/CCOM/ScoreManage/MySoftwarePage.aspx\" class=\"btn\" style=\" margin-left:210px; margin-top: 20px;background-color: #888;\">提交答辩</a>" + "<a href=\" /AdminMetro/CCOM/ScoreManage/MyScore.aspx\" class=\"btn\" style=\" margin-left:210px; margin-top: 20px;\">查看评分</a> "; } } } if (ShowInfo() == 1) { this.bt1.InnerHtml = "<a href=\" /AdminMetro/CCOM/TopicManage/StudentChoose.aspx?fun_id=F10BCF0BC92D37DB\" class=\"btn\" style=\" margin-left:105px; margin-top: 20px;background-color: #888; \">题目选择</a>" + " <a href=\" /AdminMetro/CCOM/DatumManage/StudentSubmitList.aspx\" class=\"btn\" style=\" margin-left:200px; margin-top: 20px;background-color: #888; \">开题报告</a>" + "<a href=\" /AdminMetro/CCOM/ScoreManage/MySoftwarePage.aspx\" class=\"btn\" style=\" margin-left:210px; margin-top: 20px;background-color: #888;\">提交答辩</a>" + "<a href=\" /AdminMetro/CCOM/ScoreManage/MyScore.aspx\" class=\"btn\" style=\" margin-left:210px; margin-top: 20px;background-color: #888;\">查看评分</a> "; } //跳转去申报 by zc 20150915 不要删除 string fromurl = Utils.GetCookie("FromUrl"); Utils.WriteCookie("FromUrl", "", -1); //清除这个cookie if (fromurl != "") { JscriptReponse("window.location='" + fromurl + "'"); return; } BindDeskTop(); // BindChannel(); }
private string DoAction() { var group_model = new BLL.CCOM.Reply_group().GetModel(" Group_id=" + Group_id); //var leader_model = new BLL.CCOM.View_User().GetModel(" User_id=" + group_model.User_id); string score = this.txtScore.Value; if (GetAdminInfo_CCOM().User_id != group_model.User_id) { if (score == "") { return("请添加给定的成绩"); } int sc = int.Parse(score); var student_model = new BLL.CCOM.Reply_student().GetModel(" Group_id=" + Group_id + "and User_id=" + UserID); var comment_model = new BLL.CCOM.Reply_commission().GetModel(" Group_id=" + Group_id + "and User_id=" + GetAdminInfo_CCOM().User_id); var mark_model = new BLL.CCOM.Mark_table().GetModel(" Rs_id=" + student_model.Rs_id + " and Rc_id=" + comment_model.Rc_id); if (mark_model != null) { mark_model.Score = sc; mark_model.Mark_date = DateTime.Now; if (!new BLL.CCOM.Mark_table().Update(mark_model)) { return("更新成绩异常"); } } else { Model.CCOM.Mark_table mk_model = new Model.CCOM.Mark_table(); mk_model.Rc_id = comment_model.Rc_id; mk_model.Rs_id = student_model.Rs_id; mk_model.Score = sc; mk_model.Mark_date = DateTime.Now; if (new BLL.CCOM.Mark_table().Add(mk_model) == 0) { return("添加成绩异常"); } } } else { string problem = this.txtProblem.InnerText; string comment = this.txtReviewComment.InnerText; if (problem == "") { return("请添加答辩中提出的主要问题及回答的简要情况"); } if (comment == "") { return("请添加答辩委员会(小组)的评语"); } if (score == "") { return("请添加给定的成绩"); } int sc = int.Parse(score); long Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + UserID).Topic_relation_id; var comment_model = new BLL.CCOM.Comment().GetModel(" Topic_relation_id=" + Topic_relation_id); if (comment_model != null) { comment_model.problem = problem; comment_model.Comment_content = comment; comment_model.Reply_score = sc; if (!new BLL.CCOM.Comment().Update(comment_model)) { return("更新评语异常"); } } else { Model.CCOM.Comment com_model = new Model.CCOM.Comment(); com_model.problem = problem; com_model.Comment_content = comment; com_model.Reply_score = sc; com_model.Topic_relation_id = Topic_relation_id; if (new BLL.CCOM.Comment().Add(com_model) == 0) { return("添加评语异常"); } } } return(""); }
public void ShowInfo() { Model.CCOM.View_User user_model = new BLL.CCOM.View_User().GetModel(" User_id=" + UserID); var group_model = new BLL.CCOM.Reply_group().GetModel(" Group_id=" + Group_id); var leader_model = new BLL.CCOM.View_User().GetModel(" User_id=" + group_model.User_id); if (GetAdminInfo_CCOM().User_id != leader_model.User_id) { this.txtOpinion.Disabled = true; this.ddlresult.Enabled = false; this.btnSubmit.Visible = false; } this.lblName.InnerText = user_model.User_realname; this.lblNumber.InnerHtml = user_model.User_number; var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + UserID); if (relation_model != null) { this.lblTeacher.InnerText = new BLL.CCOM.User_information().GetModel(relation_model.Teacher_id).User_realname; var topic_model = new BLL.CCOM.Topic().GetModel(relation_model.Topic_id); this.lblTitle.InnerText = topic_model.Topic_name; this.lblNature.InnerText = topic_model.Topic_nature; this.lblSource.InnerText = topic_model.Topic_source; } else { return; } string leader_title = "--"; var leader_tutor_model = new BLL.CCOM.Tutor().GetModel(" User_id=" + leader_model.User_id); if (leader_tutor_model != null) { if (leader_tutor_model.Title_id != null) { leader_title = new BLL.CCOM.Title().GetModel((int)leader_tutor_model.Title_id).Title_name; } else { leader_title = "--"; } } reviewTr = "<tr><td style=\"text-align:center;\">组长</td><td style=\"text-align:center;\">" + leader_model.User_realname + "</td><td style=\"text-align:center;\">" + leader_title + "</td><td colspan=\"3\" style=\"text-align:center;\">" + leader_model.Agency_name + "</td></tr>"; var rcs = new BLL.CCOM.Reply_commission().GetModelList(" Group_id=" + Group_id); foreach (var rc in rcs) { var u_model = new BLL.CCOM.View_User().GetModel(" User_id=" + rc.User_id); string title = "--"; var tutor_model = new BLL.CCOM.Tutor().GetModel(" User_id=" + rc.User_id); if (tutor_model != null) { if (tutor_model.Title_id != null) { title = new BLL.CCOM.Title().GetModel((int)tutor_model.Title_id).Title_name; } else { title = "--"; } } reviewTr += "</tr><td style=\"text-align:center;\">组员</td><td style=\"text-align:center;\">" + u_model.User_realname + "</td><td style=\"text-align:center;\">" + title + "</td><td colspan=\"3\" style=\"text-align:center;\">" + u_model.Agency_name + "</td></tr>"; } var proposal_model = new BLL.CCOM.Proposal().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); if (proposal_model != null) { this.txtOpinion.InnerText = proposal_model.Review; this.ddlresult.SelectedValue = proposal_model.Result.ToString(); } }
protected void ShowInfo() { int score_t = -1, score_c = -1, score_s = -1; BLL.CCOM.User_information user_bll = new BLL.CCOM.User_information(); Model.CCOM.User_information user_model = user_bll.GetModel(_id); if (user_model == null) { InnerRedirect(MyEnums.RediirectErrorEnum.ParameterError); } //真实姓名 if (user_model.User_realname == null) { txt_User_realname.Text = "请填写真实姓名"; } else { this.txt_User_realname.Text = user_model.User_realname; } this.txt_User_number.Text = user_model.User_number; var relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + _id); if (relation_model == null) { return; } var comment_model = new BLL.CCOM.Comment().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); try { score_t = (int)comment_model.Teacher_score; this.txtTeacherScore.Text = comment_model.Teacher_score.ToString(); } catch { this.txtTeacherScore.Text = "未评分"; } try { score_c = (int)comment_model.Reply_score; float sc = GetUser_CommentScore(_id); if (sc != -1) { this.txtCommentScore.Text = sc.ToString(); } else { this.txtCommentScore.Text = "未评分"; } this.lblComment.HRef = "CommentPage.aspx?userId=" + DESEncrypt.Encrypt(_id.ToString()); } catch { this.txtCommentScore.Text = "未评分"; } try { var soft_model = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id); score_s = (int)soft_model.Conclusion; this.txtScoftwareScore.Text = soft_model.Conclusion.ToString(); this.lblSoft.HRef = "SoftwarePage.aspx?userId=" + DESEncrypt.Encrypt(_id.ToString()); } catch { this.txtScoftwareScore.Text = "未评分"; } if (score_c >= 0 && score_s >= 0 && score_t >= 0) { var model = new BLL.CCOM.Comput_score().GetModel(1); decimal score = 0; if (model.Ratio_software == 0) { score = score_t * model.Ratio_teacher + (int)((score_s < score_c ? score_s : score_c) * model.Ratio_review); } else { score = score_t * model.Ratio_teacher + (int)((score_s > score_c ? score_s : score_c) * model.Ratio_review); } this.txtScore.Text = score.ToString(); } }
protected String GetStudentStatus(long userId, long Group_id) { Model.CCOM.Reply_group model = new BLL.CCOM.Reply_group().GetModel(Group_id); try { if (model.Group_type == 0) { //口头答辩 var group_model = new BLL.CCOM.Reply_group().GetModel(" Group_id=" + Group_id); if (GetAdminInfo_CCOM().User_id != group_model.User_id) //组员 { var mark_table_model = new BLL.CCOM.View_Mark_table().GetModel(" Teacher_id=" + GetAdminInfo_CCOM().User_id); if (mark_table_model != null) { return("<b style=\"color: green;\">已评分</b>"); } else { return("<b style=\"color: red;\">未评分</b>"); } } else { long Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId).Topic_relation_id; var comment_model = new BLL.CCOM.Comment().GetModel(" Topic_relation_id=" + Topic_relation_id); if (comment_model != null && comment_model.Reply_score != null) { return("<b style=\"color: green;\">已评分</b>"); } else { return("<b style=\"color: red;\">未评分</b>"); } } } else if (model.Group_type == 1) //软件验收 { long Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId).Topic_relation_id; var software_model = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + Topic_relation_id); if (software_model != null && software_model.Conclusion != null) { return("<b style=\"color: green;\">已评分</b>"); } else { return("<b style=\"color: red;\">未评分</b>"); } } else if (model.Group_type == 2) //开题评审 { long Topic_relation_id = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId).Topic_relation_id; var proposal_model = new BLL.CCOM.Proposal().GetModel(" Topic_relation_id=" + Topic_relation_id); if (proposal_model != null && proposal_model.Result > 0) { if (proposal_model.Result == 1) { return("<b style=\"color: green;\">已通过</b>"); } else if (proposal_model.Result == 2) { return("<b style=\"color: red;\">未通过</b>"); } else { return(""); } } else { return("<b>未审核</b>"); } } else { return(""); } } catch { return("--"); } }