示例#1
0
        public static UserAction CreateNew(int depth = 0)
        {
            rt.srz.model.srz.UserAction entity = new rt.srz.model.srz.UserAction();


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

            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.Event = entityRef;
            }

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

            return(entity);
        }
示例#2
0
        public static MessageStatement CreateNew(int depth = 0)
        {
            rt.srz.model.srz.MessageStatement entity = new rt.srz.model.srz.MessageStatement();

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

            entity.Version = 48;

            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.IMessageManager messageManager = ObjectFactory.GetInstance <IMessageManager>())
            {
                entity.Message = null;
            }

            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);
        }
示例#3
0
        public static SearchKey CreateNew(int depth = 0)
        {
            rt.srz.model.srz.SearchKey entity = new rt.srz.model.srz.SearchKey();

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

            entity.KeyValue = new System.Byte[] {};

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

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

            using (rt.srz.business.manager.IQueryResponseManager queryResponseManager = ObjectFactory.GetInstance <IQueryResponseManager>())
            {
                entity.QueryResponse = null;
            }

            using (rt.srz.business.manager.ISearchKeyTypeManager searchKeyTypeManager = ObjectFactory.GetInstance <ISearchKeyTypeManager>())
            {
                entity.KeyType = null;
            }

            using (rt.srz.business.manager.IStatementManager statementManager = ObjectFactory.GetInstance <IStatementManager>())
            {
                entity.Statement = 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);
        }
示例#5
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);
        }