Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
 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("--");
     }
 }