Ejemplo n.º 1
0
        protected String GetScore(long userId)
        {
            var model = new BLL.CCOM.Comput_score().GetModel(1);

            try
            {
                int                        score_t = 0, score_s = 0, score_c = 0;
                decimal                    score          = 0;
                var                        relation_model = new BLL.CCOM.Topic_relation().GetModel(" Student_id=" + userId);
                Model.CCOM.Comment         model_c        = new BLL.CCOM.Comment().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id);
                Model.CCOM.Software_accept model_s        = new BLL.CCOM.Software_accept().GetModel(" Topic_relation_id=" + relation_model.Topic_relation_id);
                score_t = (int)model_c.Teacher_score;
                score_c = (int)model_c.Reply_score;
                score_s = (int)model_s.Conclusion;
                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);
                }
                return(score.ToString());
            }
            catch
            {
                return("--");
            }
        }
Ejemplo n.º 2
0
        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("");
        }
Ejemplo n.º 3
0
        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);
            }
        }
        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("");
        }
Ejemplo n.º 5
0
        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());
        }
Ejemplo n.º 6
0
        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();
            }
        }
Ejemplo n.º 7
0
        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();
            }
        }
Ejemplo n.º 8
0
        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();
        }
Ejemplo n.º 9
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("--");
     }
 }