Exemplo n.º 1
0
        /// <summary>
        ///获得评议主题的评议内容ID集合
        /// </summary>
        /// <returns></returns>
        private string GetContentId()
        {
            if (string.IsNullOrEmpty(Get("peer_seq_no")))
            {
                return(string.Empty);
            }

            Dictionary <string, string> param = new Dictionary <string, string>();

            param.Add("SEQ_NO", Get("peer_seq_no"));
            List <Peer_project_list> list = PeerInfoHandleClass.getInstance().GetPeerContentList(param);

            if (list == null)
            {
                return(string.Empty);
            }

            StringBuilder strId = new StringBuilder();

            for (int i = 0; i < list.Count; i++)
            {
                strId.AppendFormat("{0},", list[i].OID);
            }

            return(strId.ToString());
        }
Exemplo n.º 2
0
        /// <summary>
        ///获得评议主题中 评议内容
        /// </summary>
        /// <returns></returns>
        private string GetContent()
        {
            if (string.IsNullOrEmpty(Get("peer_seq_no")))
            {
                return(string.Empty);
            }

            Dictionary <string, string> param = new Dictionary <string, string>();

            param.Add("SEQ_NO", Get("peer_seq_no"));
            List <Peer_project_list> list = PeerInfoHandleClass.getInstance().GetPeerContentList(param);

            if (list == null)
            {
                return(string.Empty);
            }

            StringBuilder strHtml = new StringBuilder();

            for (int i = 0; i < list.Count; i++)
            {
                strHtml.Append("<div class=\"form-group\">");
                strHtml.AppendFormat("<label class=\"col-sm-1 control-label\">{0}、</label>", i + 1);
                strHtml.AppendFormat("<label class=\"col-sm-9 control-label\" style=\"text-align: left;\">{0}</label>", list[i].PEER_CONTENT);
                strHtml.AppendFormat("<div class=\"col-sm-2\">");
                string strID = list[i].OID;
                strHtml.AppendFormat("<input name=\"{0}\" id=\"{0}\" type=\"text\" class=\"form-control\" placeholder=\"评分\" maxlength=\"4\" />", strID);
                strHtml.Append("</div>");
                strHtml.Append("</div>");
            }

            return(strHtml.ToString());
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获得页面数据
        /// </summary>
        /// <param name="model"></param>
        private void GetPageValue(Peer_coun_head model)
        {
            string          strCounId = ComHandleClass.getInstance().ByStuNumberGetCounCode(user.User_Id);
            Basic_coun_info coun      = CounHandleClass.getInstance().GetCounInfo_Obj(strCounId);

            if (coun != null)
            {
                model.COUN_ID         = coun.ENO;
                model.COUN_NAME       = coun.NAME;
                model.COUN_DEPARTMENT = coun.DEPARTMENT;
            }

            Basic_stu_info stu = StuHandleClass.getInstance().GetStuInfo_Obj(user.User_Id);

            if (stu != null)
            {
                model.STU_NAME   = stu.NAME;
                model.STU_NUMBER = stu.NUMBER;
                model.XY         = stu.COLLEGE;
                model.ZY         = stu.MAJOR;
                model.GRADE      = stu.EDULENTH;
                model.CLASS_CODE = stu.CLASS;
            }

            Peer_project_head peer = PeerInfoHandleClass.getInstance().GetPeerInfoHead(Post("hidPeerSeqNo"));

            if (peer != null)
            {
                model.PEER_SEQ_NO = peer.SEQ_NO;
                model.PEER_NAME   = peer.PEER_NAME;
                model.PEER_YEAR   = peer.PEER_YEAR;
            }
            model.OP_TIME = GetDateLongFormater();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 判断是否满足操作条件
        /// </summary>
        /// <returns></returns>
        private string ChkIsCanOp()
        {
            if (string.IsNullOrEmpty(Get("peer_seq_no")))
            {
                return("选择评议主题的单据编号为空,不允许操作!");
            }

            Peer_project_head project_head = PeerInfoHandleClass.getInstance().GetPeerInfoHead(Get("peer_seq_no"));

            if (project_head == null)
            {
                return("选择评议主题信息为空,不允许操作!");
            }

            if (!ProjectSettingHandleClass.getInstance().CheckIsFitApplyDate(project_head.PEER_END, user.User_Role))
            {
                return("该评议主题的评议结束日期已过,无法操作!");
            }

            return(string.Empty);
        }
Exemplo n.º 5
0
        /// <summary>
        /// 保存表体数据
        /// </summary>
        /// <returns></returns>
        private void SaveDataList(string SeqNo, string PeerSeqNo)
        {
            //先删除
            ds.ExecuteTxtNonQuery(string.Format("DELETE FROM PEER_COUN_LIST WHERE SEQ_NO = '{0}' ", SeqNo));
            //再保存
            Dictionary <string, string> param = new Dictionary <string, string>();

            param.Add("SEQ_NO", PeerSeqNo);
            List <Peer_project_list> list = PeerInfoHandleClass.getInstance().GetPeerContentList(param);
            var     inserttrcn            = ImplementFactory.GetInsertTransaction <Peer_coun_list>("Peer_coun_listInsertTransaction");
            decimal decTotalScore         = 0;

            foreach (Peer_project_list temp in list)
            {
                if (temp == null)
                {
                    continue;
                }

                Peer_coun_list notboth = new Peer_coun_list();
                notboth.OID = Guid.NewGuid().ToString();
                ds.RetrieveObject(notboth);
                notboth.SEQ_NO        = SeqNo;
                notboth.CONTENT_ID    = temp.OID;
                notboth.CONTENT_SCORE = Math.Round(cod.ChangeDecimal(Post(temp.OID)), 1);
                decTotalScore        += notboth.CONTENT_SCORE;
                inserttrcn.EntityList.Add(notboth);
            }
            bool res = inserttrcn.Commit();

            if (res)
            {
                decimal decPerScore = decTotalScore / list.Count;
                string  strResult   = PeerCounHandleClass.getInstance().GetPeerResult(decPerScore);
                //更新表头字段
                ds.ExecuteTxtNonQuery(string.Format("UPDATE PEER_COUN_HEAD SET PEER_SCORE = '{0}' ,PEER_RESULT= '{1}' WHERE SEQ_NO = '{2}' ", decPerScore, strResult, SeqNo));
            }
        }