protected void LoadSchools(int entriesToAdd)
        {
            var schoolRepository = new RepositoryWithTypedId <School, string>();

            for (int i = 0; i < entriesToAdd; i++)
            {
                var validEntity = CreateValidEntities.School(i + 1);
                schoolRepository.EnsurePersistent(validEntity);
            }
        }
Example #2
0
        public void LoadRoles(int entriesToAdd)
        {
            var roleRepository = new RepositoryWithTypedId <Role, string>();

            for (int i = 0; i < entriesToAdd; i++)
            {
                var validEntity = CreateValidEntities.Role(i + 1);
                roleRepository.EnsurePersistent(validEntity);
            }
        }
Example #3
0
        public void LoadShippingTypes(int entriesToAdd)
        {
            var shippingTypeRepository = new RepositoryWithTypedId <ShippingType, string>();

            for (int i = 0; i < entriesToAdd; i++)
            {
                var validEntity = CreateValidEntities.ShippingType(i + 1);
                validEntity.SetIdTo((i + 1).ToString(System.Globalization.CultureInfo.InvariantCulture));
                shippingTypeRepository.EnsurePersistent(validEntity);
            }
        }
Example #4
0
        public void LoadCommodity(int entriesToAdd)
        {
            var commodityRepository = new RepositoryWithTypedId <Commodity, string>();

            for (int i = 0; i < entriesToAdd; i++)
            {
                var validEntity = CreateValidEntities.Commodity(i + 1);
                validEntity.SetIdTo((i + 1).ToString(System.Globalization.CultureInfo.InvariantCulture));
                commodityRepository.EnsurePersistent(validEntity);
            }
        }
Example #5
0
        public void LoadBuildings(int entriesToAdd)
        {
            var buildingRepository = new RepositoryWithTypedId <Building, string>();
            var offset             = buildingRepository.Queryable.Count();

            for (int i = offset; i < entriesToAdd; i++)
            {
                var validEntity = CreateValidEntities.Building(i + 1);
                validEntity.SetIdTo((i + 1).ToString(System.Globalization.CultureInfo.InvariantCulture));
                buildingRepository.EnsurePersistent(validEntity);
            }
        }
Example #6
0
        public void LoadSubAccounts(int entriesToAdd)
        {
            var subAccountRepository = new RepositoryWithTypedId <SubAccount, Guid>();

            for (int i = 0; i < entriesToAdd; i++)
            {
                var validEntity = CreateValidEntities.SubAccount(i + 1);
                validEntity.AccountNumber = (i + 1).ToString(CultureInfo.InvariantCulture);
                validEntity.SetIdTo(Guid.NewGuid());
                subAccountRepository.EnsurePersistent(validEntity);
            }
        }
Example #7
0
        public void LoadOrderTypes()
        {
            var orderTypeRepository = new RepositoryWithTypedId <OrderType, string>();
            var record = new OrderType(OrderType.Types.DepartmentalPurchaseOrder);

            record.Name = record.Id;
            orderTypeRepository.EnsurePersistent(record);
            record      = new OrderType(OrderType.Types.DepartmentalRepairOrder);
            record.Name = record.Id;
            orderTypeRepository.EnsurePersistent(record);
            record      = new OrderType(OrderType.Types.OrderRequest);
            record.Name = record.Id;
            orderTypeRepository.EnsurePersistent(record);
            record      = new OrderType(OrderType.Types.PurchaseRequest);
            record.Name = record.Id;
            orderTypeRepository.EnsurePersistent(record);
            record      = new OrderType(OrderType.Types.PurchasingCard);
            record.Name = record.Id;
            orderTypeRepository.EnsurePersistent(record);
            record      = new OrderType(OrderType.Types.UcdBuyOrder);
            record.Name = record.Id;
            orderTypeRepository.EnsurePersistent(record);
        }
Example #8
0
        public void LoadOrderStatusCodes()
        {
            var orderStatusCodeRepository = new RepositoryWithTypedId <OrderStatusCode, string>();
            var orderStatusCodes          = new List <OrderStatusCode>();
            var orderStatusCode           = new OrderStatusCode();

            orderStatusCode.Name             = "Account Manager";
            orderStatusCode.Level            = 3;
            orderStatusCode.IsComplete       = false;
            orderStatusCode.KfsStatus        = false;
            orderStatusCode.ShowInFilterList = true;
            orderStatusCode.SetIdTo("AM");
            orderStatusCodes.Add(orderStatusCode);

            orderStatusCode                  = new OrderStatusCode();
            orderStatusCode.Name             = "Approver";
            orderStatusCode.Level            = 2;
            orderStatusCode.IsComplete       = false;
            orderStatusCode.KfsStatus        = false;
            orderStatusCode.ShowInFilterList = true;
            orderStatusCode.SetIdTo("AP");
            orderStatusCodes.Add(orderStatusCode);

            orderStatusCode                  = new OrderStatusCode();
            orderStatusCode.Name             = "Conditional Approval";
            orderStatusCode.Level            = 2;
            orderStatusCode.IsComplete       = false;
            orderStatusCode.KfsStatus        = false;
            orderStatusCode.ShowInFilterList = false;
            orderStatusCode.SetIdTo("CA");
            orderStatusCodes.Add(orderStatusCode);

            orderStatusCode                  = new OrderStatusCode();
            orderStatusCode.Name             = "Complete-Not Uploaded KFS";
            orderStatusCode.Level            = 5;
            orderStatusCode.IsComplete       = true;
            orderStatusCode.KfsStatus        = false;
            orderStatusCode.ShowInFilterList = false;
            orderStatusCode.SetIdTo("CN");
            orderStatusCodes.Add(orderStatusCode);

            orderStatusCode                  = new OrderStatusCode();
            orderStatusCode.Name             = "Complete";
            orderStatusCode.Level            = 5;
            orderStatusCode.IsComplete       = true;
            orderStatusCode.KfsStatus        = false;
            orderStatusCode.ShowInFilterList = true;
            orderStatusCode.SetIdTo("CP");
            orderStatusCodes.Add(orderStatusCode);

            orderStatusCode                  = new OrderStatusCode();
            orderStatusCode.Name             = "Purchaser";
            orderStatusCode.Level            = 4;
            orderStatusCode.IsComplete       = false;
            orderStatusCode.KfsStatus        = false;
            orderStatusCode.ShowInFilterList = true;
            orderStatusCode.SetIdTo("PR");
            orderStatusCodes.Add(orderStatusCode);


            orderStatusCode                  = new OrderStatusCode();
            orderStatusCode.Name             = "Requester";
            orderStatusCode.Level            = 1;
            orderStatusCode.IsComplete       = false;
            orderStatusCode.KfsStatus        = false;
            orderStatusCode.ShowInFilterList = false;
            orderStatusCode.SetIdTo("RQ");
            orderStatusCodes.Add(orderStatusCode);

            foreach (var statusCode in orderStatusCodes)
            {
                orderStatusCodeRepository.EnsurePersistent(statusCode);
            }
        }