Ejemplo n.º 1
0
        public async Task ChecProAsync()
        {
            var repo = new EntityDataAccess(ProconnectionString);
            var productsViewParams = new ProductsViewParams();

            productsViewParams.CompanyCode = 35;
            //productsViewParams.Status = 1;
            productsViewParams.Top = 100;
            //productsViewParams.KeySearch = "Pixel 2 XL";

            repo.CommandText = "dbo.GetProducts";
            repo.AddParameter("@CompanyCode", productsViewParams.CompanyCode);
            repo.AddParameter("@BranchCode", productsViewParams.BranchCode);
            repo.AddParameter("@Top", productsViewParams.Top);
            repo.AddParameter("@KeySearch", productsViewParams.KeySearch);
            repo.AddParameter("@CategoryID", productsViewParams.CategoryID);
            repo.AddParameter("@PType", productsViewParams.PType);
            repo.AddParameter("@Status", productsViewParams.Status);
            repo.CommandType = EntityDataAccess.ICommandType.StorePrecedure;
            var ddd = await repo.ExecuteReaderAsync <ProductsListView>();

            Assert.AreEqual(1, ddd);
        }
Ejemplo n.º 2
0
        internal void Initialize(World world)
        {
            TypeManager.Initialize();
            StructuralChange.Initialize();
            EntityCommandBuffer.Initialize();

#if ENABLE_UNITY_COLLECTIONS_CHECKS
            m_Safety = AtomicSafetyHandle.Create();

#if UNITY_2020_1_OR_NEWER
            if (s_staticSafetyId.Data == 0)
            {
                CreateStaticSafetyId();
            }
            AtomicSafetyHandle.SetStaticSafetyId(ref m_Safety, s_staticSafetyId.Data);
#endif

            m_JobMode = false;
#endif
            m_EntityDataAccess = (EntityDataAccess *)UnsafeUtility.Malloc(sizeof(EntityDataAccess), 16, Allocator.Persistent);
            UnsafeUtility.MemClear(m_EntityDataAccess, sizeof(EntityDataAccess));
            EntityDataAccess.Initialize(m_EntityDataAccess, world);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Fills the data.
        /// </summary>
        private void FillData()
        {
            IsDeleteLogFiles = ConfigurationHelper.GetConfigurationValue <bool>(ConfigurationConstants.DeleteLogFiles);
            LogDeleteMonths  = ConfigurationHelper.GetConfigurationValue(ConfigurationConstants.ZipLogDeleteMonths);
            LogDeleteDays    = ConfigurationHelper.GetConfigurationValue(ConfigurationConstants.LogDeleteDays);

            foreach (EntityModel entityModel in EntityDataAccess.GetAllEntities())
            {
                EntityData.Add(new EntityViewModel
                {
                    EntityId         = entityModel.EntityId,
                    EntityName       = entityModel.EntityName,
                    IsInboundActive  = entityModel.IsInboundActive,
                    IsOutboundActive = entityModel.IsOutboundActive
                });

                SchedulerData.Add(new EntityViewModel
                {
                    EntityId     = entityModel.EntityId,
                    EntityName   = entityModel.EntityName,
                    LastSyncTime = entityModel.LastSyncTime,
                });
            }
        }