Пример #1
0
        public static Workstation CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Workstation entity = new rt.srz.model.srz.Workstation();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Name                     = "T";
            entity.UecReaderName            = "Test Test ";
            entity.UecCerticateType         = default(Byte);
            entity.SmardCardReaderName      = "Test Test ";
            entity.SmardCardTokenReaderName = "Test Test ";

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                var          all       = organisationManager.GetAll(1);
                Organisation entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = OrganisationTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.PointDistributionPolicy = entityRef;
            }

            return(entity);
        }
Пример #2
0
        public static SertificateUec CreateNew(int depth = 0)
        {
            rt.srz.model.srz.SertificateUec entity = new rt.srz.model.srz.SertificateUec();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Key         = new System.Byte[] {};
            entity.Version     = default(Int16);
            entity.IsActive    = true;
            entity.InstallDate = System.DateTime.Now;

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Type = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Smo = null;
            }

            using (rt.srz.business.manager.IWorkstationManager workstationManager = ObjectFactory.GetInstance <IWorkstationManager>())
            {
                entity.Workstation = null;
            }

            return(entity);
        }
Пример #3
0
        public static RangeNumber CreateNew(int depth = 0)
        {
            rt.srz.model.srz.RangeNumber entity = new rt.srz.model.srz.RangeNumber();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.RangelFrom = 1;
            entity.RangelTo   = 19;
            entity.ChangeDate = System.DateTime.Now;

            using (rt.srz.business.manager.IRangeNumberManager rangeNumberMemberManager = ObjectFactory.GetInstance <IRangeNumberManager>())
            {
                entity.Parent = null;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                var          all       = organisationManager.GetAll(1);
                Organisation entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = OrganisationTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Smo = entityRef;
            }

            using (rt.srz.business.manager.ITemplateManager templateManager = ObjectFactory.GetInstance <ITemplateManager>())
            {
                entity.Template = null;
            }

            return(entity);
        }
Пример #4
0
        public static Setting CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Setting entity = new rt.srz.model.srz.Setting();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Name        = "Test Test ";
            entity.ValueString = "Test Test ";
            entity.UserId      = new Guid("01000000-0000-0000-0000-000000000000");

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Organisation = null;
            }

            using (rt.srz.business.manager.IWorkstationManager workstationManager = ObjectFactory.GetInstance <IWorkstationManager>())
            {
                entity.Workstation = null;
            }

            return(entity);
        }
Пример #5
0
        public static Batch CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Batch entity = new rt.srz.model.srz.Batch();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.FileName = "Test Test Test Test Test Test Test Test Test Test Test Test Tes";
            entity.Number   = default(Int16);

            using (rt.srz.business.manager.IConceptManager concept1Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.CodeConfirm = null;
            }

            using (rt.srz.business.manager.IConceptManager concept2Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = concept2Manager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Subject = entityRef;
            }

            using (rt.srz.business.manager.IConceptManager concept3Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = concept3Manager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Type = entityRef;
            }

            using (rt.srz.business.manager.IPeriodManager periodManager = ObjectFactory.GetInstance <IPeriodManager>())
            {
                entity.Period = null;
            }

            using (rt.srz.business.manager.IOrganisationManager organisation1Manager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Receiver = null;
            }

            using (rt.srz.business.manager.IOrganisationManager organisation2Manager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Sender = null;
            }

            return(entity);
        }
Пример #6
0
        public static In1 CreateNew(int depth = 0)
        {
            rt.srz.model.srz.In1 entity = new rt.srz.model.srz.In1();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Number      = default(Int16);
            entity.PolisSeria  = "Te";
            entity.PolisNumber = "Test Test Te";
            entity.DateFrom    = System.DateTime.Now;
            entity.DateTo      = System.DateTime.Now;
            entity.DateStop    = System.DateTime.Now;

            using (rt.srz.business.manager.IQueryResponseManager queryResponseManager = ObjectFactory.GetInstance <IQueryResponseManager>())
            {
                var           all       = queryResponseManager.GetAll(1);
                QueryResponse entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = QueryResponseTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.QueryResponse = entityRef;
            }

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.PolisType = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                var          all       = organisationManager.GetAll(1);
                Organisation entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = OrganisationTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Smo = entityRef;
            }

            return(entity);
        }
Пример #7
0
        public static Organisation CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Organisation entity = new rt.srz.model.srz.Organisation();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.IsActive            = true;
            entity.IsOnLine            = true;
            entity.Code                = "123";
            entity.FullName            = "Test Test ";
            entity.ShortName           = "Test Test ";
            entity.Inn                 = "Test Tes";
            entity.Ogrn                = "Test Test Test T";
            entity.Postcode            = "Te";
            entity.LastName            = "Test Test ";
            entity.FirstName           = "Test Test ";
            entity.MiddleName          = "Test Test ";
            entity.Phone               = "Test Test ";
            entity.Fax                 = "Test Test ";
            entity.EMail               = "Test Test ";
            entity.Website             = "Test Test ";
            entity.LicenseData         = "Test Test ";
            entity.LicenseNumber       = "Test";
            entity.DateLicensing       = System.DateTime.Now;
            entity.DateExpiryLicense   = System.DateTime.Now;
            entity.IsSubordination     = true;
            entity.DateIncludeRegister = System.DateTime.Now;
            entity.DateExcludeRegister = System.DateTime.Now;
            entity.HasActivePolicy     = true;
            entity.DateNotification    = System.DateTime.Now;
            entity.CountInsured        = 45;
            entity.DateLastEdit        = System.DateTime.Now;
            entity.Okato               = "Tes";
            entity.TimeRunFrom         = System.DateTime.Now;
            entity.TimeRunTo           = System.DateTime.Now;
            entity.Address             = "Test Test ";

            using (rt.srz.business.manager.IOidManager oidManager = ObjectFactory.GetInstance <IOidManager>())
            {
                var all       = oidManager.GetAll(1);
                Oid entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = OidTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Oid = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationMember1Manager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Parent = null;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationMember2Manager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.ChangedRow = null;
            }

            using (rt.srz.business.manager.IConceptManager concept1Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.CauseRegistration = null;
            }

            using (rt.srz.business.manager.IConceptManager concept2Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.CauseExclusion = null;
            }

            return(entity);
        }
Пример #8
0
        public static SearchKeyType CreateNew(int depth = 0)
        {
            rt.srz.model.srz.SearchKeyType entity = new rt.srz.model.srz.SearchKeyType();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.Code                 = "123";
            entity.Name                 = "Test Test Test Test Test Test Test Test Test";
            entity.IsActive             = true;
            entity.FirstName            = true;
            entity.LastName             = true;
            entity.MiddleName           = true;
            entity.Birthday             = true;
            entity.Birthplace           = true;
            entity.Snils                = true;
            entity.DocumentType         = true;
            entity.DocumentSeries       = true;
            entity.DocumentNumber       = true;
            entity.Okato                = true;
            entity.PolisType            = true;
            entity.PolisSeria           = true;
            entity.PolisNumber          = true;
            entity.FirstNameLength      = default(Int16);
            entity.LastNameLength       = default(Int16);
            entity.MiddleNameLength     = default(Int16);
            entity.BirthdayLength       = default(Int16);
            entity.AddressStreet        = true;
            entity.AddressStreetLength  = default(Int16);
            entity.AddressHouse         = true;
            entity.AddressRoom          = true;
            entity.AddressStreet2       = true;
            entity.AddressStreetLength2 = default(Int16);
            entity.AddressHouse2        = true;
            entity.AddressRoom2         = true;
            entity.DeleteTwinChar       = true;
            entity.IdenticalLetters     = "Test Test ";
            entity.Recalculated         = true;
            entity.Enp       = true;
            entity.MainEnp   = true;
            entity.Weight    = 76;
            entity.Insertion = true;

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.OperationKey = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.Tfoms = null;
            }

            return(entity);
        }
        public static MedicalInsurance CreateNew(int depth = 0)
        {
            rt.srz.model.srz.MedicalInsurance entity = new rt.srz.model.srz.MedicalInsurance();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.PolisSeria    = "Test Test Test Te";
            entity.PolisNumber   = "Test Test Test Test";
            entity.DateFrom      = System.DateTime.Now;
            entity.DateTo        = System.DateTime.Now;
            entity.IsActive      = true;
            entity.DateStop      = System.DateTime.Now;
            entity.Enp           = "T";
            entity.StateDateFrom = System.DateTime.Now;
            entity.StateDateTo   = System.DateTime.Now;

            using (rt.srz.business.manager.IInsuredPersonManager insuredPersonManager = ObjectFactory.GetInstance <IInsuredPersonManager>())
            {
                entity.InsuredPerson = null;
            }

            using (rt.srz.business.manager.IConceptManager conceptManager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = conceptManager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.PolisType = entityRef;
            }

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                var          all       = organisationManager.GetAll(1);
                Organisation entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = OrganisationTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Smo = entityRef;
            }

            using (rt.srz.business.manager.IStatementManager statementManager = ObjectFactory.GetInstance <IStatementManager>())
            {
                var       all       = statementManager.GetAll(1);
                Statement entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = StatementTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Statement = entityRef;
            }

            return(entity);
        }
Пример #10
0
        public static Statement CreateNew(int depth = 0)
        {
            rt.srz.model.srz.Statement entity = new rt.srz.model.srz.Statement();

            // You may need to maually enter this key if there is a constraint violation.
            entity.Id = System.Guid.NewGuid();

            entity.DateFiling       = System.DateTime.Now;
            entity.HasPetition      = true;
            entity.NumberPolicy     = "Test";
            entity.AbsentPrevPolicy = true;
            entity.IsActive         = true;
            entity.PolicyIsIssued   = true;
            entity.PrzBuffId        = 19;
            entity.PidId            = 31;
            entity.PolisId          = 90;
            entity.IsExportTemp     = true;
            entity.IsExportPolis    = true;
            entity.PrzBuffPolisId   = 9;
            entity.Version          = 16;
            entity.UserId           = new Guid("01000000-0000-0000-0000-000000000000");

            using (rt.srz.business.manager.IOrganisationManager organisationManager = ObjectFactory.GetInstance <IOrganisationManager>())
            {
                entity.PointDistributionPolicy = null;
            }

            using (rt.srz.business.manager.IStatementManager statementMemberManager = ObjectFactory.GetInstance <IStatementManager>())
            {
                entity.PreviousStatement = null;
            }

            using (rt.srz.business.manager.IConceptManager concept1Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                var     all       = concept1Manager.GetAll(1);
                Concept entityRef = null;
                if (all.Count > 0)
                {
                    entityRef = all[0];
                }

                if (entityRef == null && depth < 3)
                {
                    depth++;
                    entityRef = ConceptTests.CreateNew(depth);
                    ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Save(entityRef);
                }

                entity.Status = entityRef;
            }

            using (rt.srz.business.manager.IInsuredPersonDatumManager insuredPersonDatumManager = ObjectFactory.GetInstance <IInsuredPersonDatumManager>())
            {
                entity.InsuredPersonData = null;
            }

            using (rt.srz.business.manager.IInsuredPersonManager insuredPersonManager = ObjectFactory.GetInstance <IInsuredPersonManager>())
            {
                entity.InsuredPerson = null;
            }

            using (rt.srz.business.manager.IConceptManager concept2Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.CauseFiling = null;
            }

            using (rt.srz.business.manager.IConceptManager concept3Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.ModeFiling = null;
            }

            using (rt.srz.business.manager.IConceptManager concept4Manager = ObjectFactory.GetInstance <IConceptManager>())
            {
                entity.FormManufacturing = null;
            }

            using (rt.srz.business.manager.IDocumentManager document1Manager = ObjectFactory.GetInstance <IDocumentManager>())
            {
                entity.DocumentUdl = null;
            }

            using (rt.srz.business.manager.IContactInfoManager contactInfoManager = ObjectFactory.GetInstance <IContactInfoManager>())
            {
                entity.ContactInfo = null;
            }

            using (rt.srz.business.manager.IRepresentativeManager representativeManager = ObjectFactory.GetInstance <IRepresentativeManager>())
            {
                entity.Representative = null;
            }

            using (rt.srz.business.manager.IDocumentManager document2Manager = ObjectFactory.GetInstance <IDocumentManager>())
            {
                entity.ResidencyDocument = null;
            }

            using (rt.srz.business.manager.IaddressManager address1Manager = ObjectFactory.GetInstance <IaddressManager>())
            {
                entity.Address = null;
            }

            using (rt.srz.business.manager.IDocumentManager document3Manager = ObjectFactory.GetInstance <IDocumentManager>())
            {
                entity.DocumentRegistration = null;
            }

            using (rt.srz.business.manager.IaddressManager address2Manager = ObjectFactory.GetInstance <IaddressManager>())
            {
                entity.Address2 = null;
            }

            return(entity);
        }