Ejemplo n.º 1
0
        public void InitData()
        {
            if (_enterprises == null)
            {
                Enterprise env = new Enterprise();

                _enterprises = new List <Enterprise>();
                for (int i = 0; i < 100; i++)
                {
                    _enterprises.Add(env.Generator());
                }
            }

            if (_activities == null)
            {
                Activity activity = new Activity();

                _activities = new List <Activity>();
                for (int i = 0; i < 100; i++)
                {
                    _activities.Add(activity.Generator());
                }
            }

            if (_products == null)
            {
                Product product = new Product();

                _products = new List <Product>();
                for (int i = 0; i < 100; i++)
                {
                    _products.Add(product.Generator());
                }
            }
        }
Ejemplo n.º 2
0
        public EnterpriseDetail Generator()
        {
            EnterpriseDetail enterpriseDetail = new EnterpriseDetail();

            Enterprise enterprise = new Enterprise();

            enterpriseDetail.Enterprise = enterprise.Generator();

            Product        product   = new Product();
            List <Product> _products = new List <Product>();

            _products.Add(product.Generator());
            _products.Add(product.Generator());
            _products.Add(product.Generator());
            _products.Add(product.Generator());
            enterpriseDetail._products = _products;


            Catalog        catalog   = new Catalog();
            List <Catalog> _catalogs = new List <Catalog>();

            _catalogs.Add(catalog.Generator());
            _catalogs.Add(catalog.Generator());
            _catalogs.Add(catalog.Generator());
            _catalogs.Add(catalog.Generator());
            enterpriseDetail._catalogs = _catalogs;

            Activity        activity    = new Activity();
            List <Activity> _activities = new List <Activity>();

            _activities.Add(activity.Generator());
            _activities.Add(activity.Generator());
            _activities.Add(activity.Generator());
            _activities.Add(activity.Generator());
            enterpriseDetail._activities = _activities;

            Video        video   = new Video();
            List <Video> _videos = new List <Video>();

            _videos.Add(video.Generator());
            //_videos.Add(video.Generator());
            enterpriseDetail._videos = _videos;

            return(enterpriseDetail);
        }