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 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("--"); }
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); 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 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("--"); } }