示例#1
0
        /// <summary>
        /// Sets the summary.
        /// </summary>
        /// <param name="codeReview">The code review.</param>
        public void SetSummary(CodeReview codeReview)
        {
            try
            {
                _codeReview = codeReview;

                txtProject.Text = codeReview.ProjectName;
                txtProjectCode.Text = codeReview.ProjectCode;
                txtWorkProductName.Text = codeReview.WorkProductName;
                txtWorkProductVersion.Text = codeReview.WorkProductVersion;
                txtWorkProductSize.Text = codeReview.WorkProductSize;
                dtWorkProductReleaseDateForReview.Text = codeReview.WorkProductReleaseDateForReview;

                txtReviewedBy.Text = codeReview.ReviewedBy;
                dtReviewedDate.Text = codeReview.ReviewedDate;
                UIHelper.SelectByString(cmbStatus, codeReview.ReviewStatus);
                txtReviewActionTakenBy.Text = codeReview.ReviewActionTakenBy;
                dtReviewActionTakenDate.Text = codeReview.ReviewActionTakenDate;
                txtReviewPreparationEffort.Text = codeReview.ReviewPreparationEffort;
                txtReviewEffort.Text = codeReview.ReviewEffort;
                txtReworkEffort.Text = codeReview.ReworkEffrot;

                CalculateReviewEfficiency(codeReview);
            }
            catch (Exception ex)
            {
                Utils.HandleException(ex);
            }
        }
示例#2
0
 /// <summary>
 /// Calculates the review efficiency.
 /// </summary>
 /// <param name="codeReview">The code review.</param>
 private void CalculateReviewEfficiency(CodeReview codeReview)
 {
     try
     {
         double reviewEfficiency = ((double.Parse(txtReviewEffort.Text) +
                                     double.Parse(txtReviewPreparationEffort.Text)) * 100 /
                                    codeReview.Reviews.Count);
         reviewEfficiency = Math.Round(reviewEfficiency, 2);
         txtReviewEfficiency.Text = Convert.ToString(reviewEfficiency);
     }
     catch (Exception)
     {
         txtReviewEfficiency.Text = "";
     }
 }