Exemplo n.º 1
0
        public List <Product> GetProducts(int themeId)
        {
            TheDataSource theDataSource = TheDataSource.Instance;

            string sql = "SELECT p.* "
                         + " FROM product p"
                         + " LEFT JOIN theme_prod_ref ptr ON p.prod_id = ptr.prod_id"
                         + " WHERE p.status = 1 AND ptr.theme_id = "
                         + themeId + " "
                         + " ORDER BY ptr.ordering DESC";
            var results  = theDataSource.SelectList(sql);
            var products = new List <Product>();

            for (int i = 0; i < results.Count; i++)
            {
                Product product = new Product();
                product.Pro_id = Convert.ToInt16(results[i]["prod_id"]);
                product.Ent_id = Convert.ToInt16(results[i]["com_id"]);
                product.Name   = results[i]["name"].ToString();
                product.Image  = results[i]["image"].ToString();
                //product.ProductDetails = GetProductDetails(product.Pro_id);
                products.Add(product);
            }

            return(products);
        }
Exemplo n.º 2
0
        public List <Activity> GetActivities(int themeId)
        {
            TheDataSource theDataSource = TheDataSource.Instance;

            string sql = " SELECT a.* "
                         + " FROM activity a"
                         + " LEFT JOIN theme_act_ref atr ON a.act_id = atr.act_id"
                         + " WHERE a.status = 1 AND atr.theme_id = "
                         + themeId
                         + " ORDER BY atr.ordering DESC";
            var results    = theDataSource.SelectList(sql);
            var activities = new List <Activity>();

            for (int i = 0; i < results.Count; i++)
            {
                Activity activity = new Activity();
                activity.Id     = Convert.ToInt16(results[i]["act_id"]);
                activity.Ent_id = Convert.ToInt16(results[i]["com_id"]);
                activity.Name   = results[i]["name"].ToString();
                activity.Image  = results[i]["image"].ToString();
                //activity.ActivityDetails = GetActivityDetails(activity.Id);
                activities.Add(activity);
            }

            return(activities);
        }
Exemplo n.º 3
0
        public List <Enterprise> GetEnterprises(int themeId)
        {
            TheDataSource theDataSource = TheDataSource.Instance;

            string sql = "SELECT c.* "
                         + " FROM company c"
                         + " LEFT JOIN theme_com_ref ctr ON c.com_id = ctr.com_id"
                         + " WHERE c.status = 1 AND ctr.theme_id = "
                         + themeId + " "
                         + " ORDER BY ctr.ordering DESC";
            var results = theDataSource.SelectList(sql);

            Debug.Log("GetEnterprises : " + sql);

            var enterprises = new List <Enterprise>();

            for (int i = 0; i < results.Count; i++)
            {
                Enterprise enterprise = new Enterprise();
                enterprise.Ent_id      = Convert.ToInt16(results[i]["com_id"]);
                enterprise.Name        = results[i]["name"].ToString();
                enterprise.IsCustom    = false;
                enterprise.Logo        = results[i]["logo"].ToString();
                enterprise.Description = results[i]["description"].ToString();
                //enterprise.Business_card = row[17].ToString();
                //enterprise.EnvCards = GetEnvCards(enterprise.Ent_id);
                enterprises.Add(enterprise);
            }

            return(enterprises);
        }
Exemplo n.º 4
0
        private IDaoSubService _daoSubService;  // 次实现数据层索引


        /// <summary>
        /// 初始化
        /// </summary>
        public void Init(MagicWallManager manager)
        {
            _theDataSource = TheDataSource.Instance;
            _manager       = manager;

            _enterprises = new List <Enterprise>();
            _activities  = new List <Activity>();
            _products    = new List <Product>();

            _enterpriseIndex = 0;
            _activityIndex   = 0;
            _productIndex    = 0;


            //// 初始化显示的数据
            //_enterprises = GetEnterprises();
            //_activities = GetActivities();
            //_products = GetProducts();
        }
Exemplo n.º 5
0
        private void Init()
        {
            // 设置项目最高帧率(对编辑器无效)
            Application.targetFrameRate = 60;
            _isLimitFps = true;

            // 识别屏幕状态
            RecognizeScreenType();


            // 初始化数据连接服务
            TheDataSource theDataSource = TheDataSource.Instance;

            // 初始化 Global Data
            _globalData.Init(this);

            // 设置 Dotween 插件
            DOTween.logBehaviour = LogBehaviour.ErrorsOnly;

            ResetMainPanel();      //主面板归位

            PanelOffsetX     = 0f; // 清理两个panel偏移量
            PanelBackOffsetX = 0f;
            PanelOffsetY     = 0f; // 清理两个panel偏移量


            // 初始化场景管理器
            _magicSceneManager.Init(this,
                                    OnSceneEnterLoop,
                                    OnStartSceneCompleted);

            // 初始化背景管理器, 此时对象池完成
            _backgroundManager.Init(this);

            // 初始化实体管理器
            Debug.Log("init agent manager");
            _agentManager.Init(this);
            Debug.Log("init agent manager end");


            //  初始化操作模块
            _operateMode.Init(this);

            // 初始化操作卡片管理器
            _operateCardManager.Init(this);

            // 初始化音乐服务
            _musicManager.Init();

            _musicManager.Play();

            // 初始化kinect
            if (_openKinect)
            {
                _kinectManager.Init(this);
            }

            _useKinect = false;


            //// 初始化定制服务
            //if (managerConfig.IsCustom)
            //{
            //    infoPanelAgent.Init(this);
            //}

            _hasInit = true;

            _udpManager?.Init();

            //StartCoroutine(ExchangeScene(switchTime));
        }