예제 #1
0
        protected void btnSub_Click(object sender, EventArgs e)
        {
            CY.CSTS.Core.Business.JointReviewScoreTable jrst;
            CY.CSTS.Core.Business.JointReviewExperts jre = getNew();
            if (jre != null)
            {
                CY.CSTS.Core.Business.JointReviewScoreTable jrt = gettable(jrId, jre.Id);
                if (jrt == null)
                {
                    jrst = new CY.CSTS.Core.Business.JointReviewScoreTable();
                }
                else
                {
                    jrst = jrt;
                }

                jrst.Joi_Id = jrId;
                if (jre != null)
                {
                    jrst.JointReviewExpertsID = jre.Id;
                }
                else
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script type='text/javascript'>alert('参数错误');</script>");
                    btnScore.Visible = false; btnScore1.Visible = false;
                }
                try
                {
                    if (tbscore1.Value == null || tbscore1.Value == "")
                    {
                        jrst.NeedUtilization = 0;
                    }
                    else
                    {
                        jrst.NeedUtilization = int.Parse(tbscore1.Value);
                    }

                    if (tbscore2.Value == null || tbscore2.Value == "")
                    {
                        jrst.NeedDevelopment = 0;
                    }
                    else
                    {
                        jrst.NeedDevelopment = int.Parse(tbscore2.Value);
                    }

                    if (tbscore3.Value == null || tbscore3.Value == "")
                    {
                        jrst.NeedExpected = 0;
                    }
                    else
                    {
                        jrst.NeedExpected = int.Parse(tbscore3.Value);
                    }

                    if (tbscore4.Value == null || tbscore4.Value == "")
                    {
                        jrst.SharingForm = 0;
                    }
                    else
                    {
                        jrst.SharingForm = int.Parse(tbscore4.Value);
                    }

                    if (tbscore5.Value == null || tbscore5.Value == "")
                    {
                        jrst.ApplicabilityPerformance = 0;
                    }
                    else
                    {
                        jrst.ApplicabilityPerformance = int.Parse(tbscore5.Value);
                    }

                    if (tbscore6.Value == null || tbscore6.Value == "")
                    {
                        jrst.ApplicabilityConfiguration = 0;
                    }
                    else
                    {
                        jrst.ApplicabilityConfiguration = int.Parse(tbscore6.Value);
                    }

                    if (tbscore7.Value == null || tbscore7.Value == "")
                    {
                        jrst.ManagementStaffing = 0;
                    }
                    else
                    {
                        jrst.ManagementStaffing = int.Parse(tbscore7.Value);
                    }

                    if (tbscore8.Value == null || tbscore8.Value == "")
                    {
                        jrst.ManagementComplementary = 0;
                    }
                    else
                    {
                        jrst.ManagementComplementary = int.Parse(tbscore8.Value);
                    }

                    if (tbscore9.Value == null || tbscore9.Value == "")
                    {
                        jrst.Budget = 0;
                    }
                    else
                    {
                        jrst.Budget = int.Parse(tbscore9.Value);
                    }

                    if (tbscore10.Value == null || tbscore10.Value == "")
                    {
                        jrst.BudgetImplementation = 0;
                    }
                    else
                    {
                        jrst.BudgetImplementation = int.Parse(tbscore10.Value);
                    }

                    if (tbTotle.Value == null || tbTotle.Value == "")
                    {
                        jrst.TotalScore = 0;
                    }
                    else
                    {
                        jrst.TotalScore = int.Parse(tbTotle.Value);
                    }
                    jrst.Save();
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script type='text/javascript'>alert('提交成功');</script>");
                }
                catch (Exception ex)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "<script type='text/javascript'>alert('分数格式错误');</script>");
                }
            }
        }
예제 #2
0
 protected CY.CSTS.Core.Business.JointReviewScoreTable gettable(Guid jrid, Guid jreid)
 {
     CY.CSTS.Core.Business.JointReviewScoreTable jrt = new CY.CSTS.Core.Business.JointReviewScoreTable();
     string sqlwhere = "[Joi_Id]='" + jrid + "' and [JointReviewExpertsID]='" + jreid + "'";
     IList<CY.CSTS.Core.Business.JointReviewScoreTable> jrtList = CY.CSTS.Core.Business.JointReviewScoreTable.SelectJointReviewScoreTableDynamic(sqlwhere, "");
     if (jrtList.Count != 0 && jrtList != null)
     {
         jrt = jrtList[0];
     }
     else
     {
         jrt = null;
     }
     return jrt;
 }