コード例 #1
0
        private void SetUpViolationCode()
        {
            List <ViolationCode> violationCodeList = new List <ViolationCode>();

            _agencyViolationCode = new ViolationCode();
            _agencyViolationCode = _agencyViolationCode.CreateUcrCode(Guid.Empty, 123, "code", "violationDescription", true, "ucrcode", "ucrCategory", "statutecode",
                                                                      "statutedescription", "violationhierarchy", "type", "leveldegree", "statecode", "nciccode", null, null, true, true, false, true, true, true,
                                                                      "statutedefinition", new CodeValue("code", "description"));
            violationCodeList.Add(_agencyViolationCode);
            _unitOfWorkAdmin.Setup(mock => mock.GetEntityQuery <ViolationCode>(It.IsAny <TrackingMode>()))
            .Returns(violationCodeList.AsQueryable());
        }
コード例 #2
0
ファイル: RMSSystem.cs プロジェクト: sanjaybxl/inform
        /// <summary>
        /// Create a Violation Code
        /// </summary>

        /// <returns></returns>
        public ViolationCode CreateViolationCode(Guid agencyId, long classicId, string code, string violationDescription, bool reportable, string ucrCode,
                                                 string ucrCategory, string statuteCode, string statuteDescription, string violationHierarchy, string type, string levelOrDegree,
                                                 string stateCode, string ncicCode, DateTime?effectiveDate, DateTime?repealDate, bool inactive, bool incident, bool citation,
                                                 bool arrest, bool warrant, bool jail, string statuteDefinition, CodeValue filter)
        {
            // Create the new Ucr Code
            var violationCode = new ViolationCode(agencyId, classicId, code, violationDescription, reportable, ucrCode,
                                                  ucrCategory, statuteCode, statuteDescription, violationHierarchy, type, levelOrDegree,
                                                  stateCode, ncicCode, effectiveDate, repealDate, inactive, incident, citation,
                                                  arrest, warrant, jail, statuteDefinition, filter);

            ViolationCodeCollection.Add(violationCode);
            return(violationCode);
        }