Пример #1
0
        public virtual storeActivity GetByPosition(int tradeAreaId, int floorNum, float mapX, float mapY, float scaling)
        {
            //存储过程名称
            string        sqlStr   = "dbo.dz_Area_GetStoreByPosition ";
            storeActivity storeAct = null;
            SqlDataReader dr       = SqlSeverProvider.ExecuteReader(sqlStr, CommandType.StoredProcedure);

            if (dr.Read())
            {
                storeAct = new storeActivity
                {
                    storeID    = dr.GetInt32(0),
                    storeCName = dr.GetString(1),
                    storeEName = dr.GetString(2)
                };
            }
            // 根据 storeId 获取活动信息  添加到 storeAct 后 在返回
            ActivityModels activity = _ActivityManager.GetByStoreId(storeAct.storeID);

            storeAct.activityID      = activity.activityID;
            storeAct.activityTitle   = activity.activityTitle;
            storeAct.activityContent = activity.activityContent;

            return(storeAct);
        }
Пример #2
0
        public ActionResult GetStoreByPosition(int tradeAreaId, int floorNum, float mapX, float mapY, float scaling)
        {
            storeActivity storeAct = _StoreManager.GetByPosition(tradeAreaId, floorNum, mapX, mapY, scaling);

            if (storeAct != null)
            {
                return(Json(storeAct, JsonRequestBehavior.AllowGet));
            }
            return(Json("Failed", JsonRequestBehavior.AllowGet));
        }