Ejemplo n.º 1
0
        private void SaveCategoryRatingGroups()
        {
            try
            {
                CategoryRatingGroup bestQuilifiedGroup = CategoryRatingGroupManager.GetBestQuilifiedGroup(CurrentCRID);
                bestQuilifiedGroup.ScoringRangeGroupTypeName = rtbBQGroupTypeName.Text.Trim();
                bestQuilifiedGroup.RangeMin             = Int32.Parse(rtbBQRangeMin.Text);
                bestQuilifiedGroup.RangeMax             = Int32.Parse(rtbBQRangeMax.Text);
                bestQuilifiedGroup.QualifyingStatements = rtbBQQualifyingStatements.Text.Trim();
                CategoryRatingGroupManager.Update(bestQuilifiedGroup, base.CurrentUserID);

                CategoryRatingGroup wellQuilifiedGroup = CategoryRatingGroupManager.GetWellQuilifiedGroup(CurrentCRID);
                if (wellQuilifiedGroup != null)
                {
                    wellQuilifiedGroup.ScoringRangeGroupTypeName = rtbWQGroupTypeName.Text.Trim();
                    wellQuilifiedGroup.RangeMin             = Int32.Parse(rtbWQRangeMin.Text);
                    wellQuilifiedGroup.RangeMax             = Int32.Parse(rtbWQRangeMax.Text);
                    wellQuilifiedGroup.QualifyingStatements = rtbWQQualifyingStatements.Text.Trim();
                    CategoryRatingGroupManager.Update(wellQuilifiedGroup, base.CurrentUserID);
                }

                CategoryRatingGroup quilifiedGroup = CategoryRatingGroupManager.GetQuilifiedGroup(CurrentCRID);
                quilifiedGroup.ScoringRangeGroupTypeName = rtbQGroupTypeName.Text.Trim();
                quilifiedGroup.RangeMin             = Int32.Parse(rtbQRangeMin.Text);
                quilifiedGroup.RangeMax             = Int32.Parse(rtbQRangeMax.Text);
                quilifiedGroup.QualifyingStatements = rtbQQualifyingStatements.Text.Trim();
                CategoryRatingGroupManager.Update(quilifiedGroup, base.CurrentUserID);
            }
            catch (Exception ex)
            {
                ExceptionBase.HandleException(ex);
            }
        }
Ejemplo n.º 2
0
        private void PopulateCategoryRatingGroups()
        {
            CategoryRatingGroup bestQuilifiedGroup = CategoryRatingGroupManager.GetBestQuilifiedGroup(CurrentCRID);

            if (bestQuilifiedGroup != null)
            {
                rtbBQGroupTypeName.Text        = bestQuilifiedGroup.ScoringRangeGroupTypeName;
                rtbBQRangeMin.Text             = bestQuilifiedGroup.RangeMin.ToString();
                rtbBQRangeMax.Text             = bestQuilifiedGroup.RangeMax.ToString();
                rtbBQQualifyingStatements.Text = bestQuilifiedGroup.QualifyingStatements;
            }

            CategoryRatingGroup wellQuilifiedGroup = CategoryRatingGroupManager.GetWellQuilifiedGroup(CurrentCRID);

            if (wellQuilifiedGroup != null)
            {
                rtbWQGroupTypeName.Text        = wellQuilifiedGroup.ScoringRangeGroupTypeName;
                rtbWQRangeMin.Text             = wellQuilifiedGroup.RangeMin.ToString();
                rtbWQRangeMax.Text             = wellQuilifiedGroup.RangeMax.ToString();
                rtbWQQualifyingStatements.Text = wellQuilifiedGroup.QualifyingStatements;
            }

            CategoryRatingGroup quilifiedGroup = CategoryRatingGroupManager.GetQuilifiedGroup(CurrentCRID);

            if (quilifiedGroup != null)
            {
                rtbQGroupTypeName.Text      = quilifiedGroup.ScoringRangeGroupTypeName;
                rtbQGroupTypeName.Font.Bold = true;

                rtbQRangeMin.Text             = quilifiedGroup.RangeMin.ToString();
                rtbQRangeMax.Text             = quilifiedGroup.RangeMax.ToString();
                rtbQQualifyingStatements.Text = quilifiedGroup.QualifyingStatements;

                if (string.IsNullOrEmpty(quilifiedGroup.QualifyingStatements))
                {
                    JNPackage jnpPackage = new JNPackage(base.CurrentJNPID);
                    Series    series     = new Series(jnpPackage.SeriesID);

                    rtbQQualifyingStatements.Text = CategoryRatingManager.GetMinimumQualification(series.TypeOfWorkID, jnpPackage.HighestAdvertisedGrade);;
                }
            }
        }