Пример #1
0
        public void AddSelectedMallInMap(MallModel item)
        {
            var elements = new ObservableCollection <MapElement>();

            MapIcon mapIcon    = new MapIcon();
            var     bdPosition = new Geopoint(new BasicGeoposition()
            {
                Latitude  = Double.Parse(item.lat),
                Longitude = Double.Parse(item.lon)
            });

            mapIcon.Location = bdPosition;//LocationManager.TransformFromWorldlToMars(bdPosition);
            mapIcon.Title    = item.name;
            mapIcon.Image    = TappedIcon;
            mapIcon.NormalizedAnchorPoint = new Point(0.5, 0.5);
            elements.Add(mapIcon);

            MapElements = elements;
            MapCenter   = new Geopoint(new BasicGeoposition()
            {
                Latitude = Double.Parse(item.lat), Longitude = Double.Parse(item.lon)
            });
            MapZoomLevel = 14;

            SelectedMallItem       = item;
            SelectedItemVisibility = Visibility.Visible;
        }
Пример #2
0
        public HttpResponseMessage GerAttributeGroupInfo(MallModel model)
        {
            string Result = string.Empty;

            try
            {
                //请求中包含的固定参数
                model.SOURCE      = ParametersFilter.FilterSqlHtml(model.SOURCE, 24);
                model.CREDENTIALS = ParametersFilter.FilterSqlHtml(model.CREDENTIALS, 24);
                model.ADDRESS     = HttpHelper.IPAddress();
                model.TERMINAL    = ParametersFilter.FilterSqlHtml(model.TERMINAL, 1);
                model.INDEX       = ParametersFilter.FilterSqlHtml(model.INDEX, 24);
                model.METHOD      = ParametersFilter.FilterSqlHtml(model.METHOD, 24);

                model.DATA = ParametersFilter.StripSQLInjection(model.DATA);

                //返回结果
                Result = ApiHelper.HttpRequest(username, password, Url, model);

                ///写日志
                string RequestAction = "api/" + username + "/" + HttpContext.Current.Request.RequestContext.RouteData.Values["action"].ToString() + ":";
                LogHelper.LogResopnse(RequestAction + Result);
            }
            catch (Exception ex)
            {
                LogHelper.LogError(ex.ToString());
            }

            HttpResponseMessage Respend = new HttpResponseMessage {
                Content = new StringContent(Result, Encoding.GetEncoding("UTF-8"), "application/json")
            };

            return(Respend);
        }
Пример #3
0
        public string Mall_Select(MallModel mallModel)
        {
            BaseDL bdl = new BaseDL();

            mallModel.Sqlprms = new SqlParameter[0];
            return(bdl.SelectJson("Mall_Select", mallModel.Sqlprms));
        }
Пример #4
0
        public ActionResult Mall(MallModel model)
        {
            if (ModelState.IsValid)
            {
                MallConfigInfo mallConfigInfo = BMAConfig.MallConfig;

                mallConfigInfo.IsGuestSC            = model.IsGuestSC;
                mallConfigInfo.SCSubmitType         = model.SCSubmitType;
                mallConfigInfo.GuestSCCount         = model.GuestSCCount;
                mallConfigInfo.MemberSCCount        = model.MemberSCCount;
                mallConfigInfo.SCExpire             = model.SCExpire;
                mallConfigInfo.OSNFormat            = model.OSNFormat;
                mallConfigInfo.OnlinePayExpire      = model.OnlinePayExpire;
                mallConfigInfo.ReceiveExpire        = model.ReceiveExpire;
                mallConfigInfo.BroHisCount          = model.BroHisCount;
                mallConfigInfo.MaxShipAddress       = model.MaxShipAddress;
                mallConfigInfo.FavoriteProductCount = model.FavoriteProductCount;
                mallConfigInfo.FavoriteStoreCount   = model.FavoriteStoreCount;

                BMAConfig.SaveMallConfig(mallConfigInfo);
                Emails.ResetMall();
                SMSes.ResetMall();
                AddMallAdminLog("修改商城设置");
                return(PromptView(Url.Action("mall"), "修改商城设置成功"));
            }
            return(View(model));
        }
Пример #5
0
        private void GoToListViewIndex(MallModel mall)
        {
            //mall 参数没有用
            int index = 0;

            foreach (var group in MallGroupList)
            {
                bool flag = false;
                foreach (var m in group.MallList)
                {
                    if (m.id == mall.id)
                    {
                        flag = true;
                        break;
                    }
                    else
                    {
                        index++;
                    }
                }
                if (flag)
                {
                    break;
                }
            }
            SelectedIndex = index;
        }
Пример #6
0
 public AtlasPage_Model(MallModel mall)
 {
     //[{"Floor1": "541797c6ac4711c3332d6cd1",
     //"Floor2": "541797c6ac4711c3332d6cs1"}]
     SelectedMallModel = mall;
     Building          = mall.buildings.FirstOrDefault();
     //Title = Building.name;
 }
Пример #7
0
 public AtlasPage_Model()
 {
     if (IsInDesignMode)
     {
         SelectedMallModel = new MallModel()
         {
             addr     = "某某区  某某路  ",
             desc     = "描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述描述",
             name     = "某某某商场",
             opentime = "20:00 ------ 10:00",
             traffic  = "公交路线"
         };
     }
 }
Пример #8
0
        public ActionResult Mall()
        {
            MallConfigInfo mallConfigInfo = BMAConfig.MallConfig;

            MallModel model = new MallModel();

            model.IsGuestSC            = mallConfigInfo.IsGuestSC;
            model.SCSubmitType         = mallConfigInfo.SCSubmitType;
            model.GuestSCCount         = mallConfigInfo.GuestSCCount;
            model.MemberSCCount        = mallConfigInfo.MemberSCCount;
            model.SCExpire             = mallConfigInfo.SCExpire;
            model.OSNFormat            = mallConfigInfo.OSNFormat;
            model.OnlinePayExpire      = mallConfigInfo.OnlinePayExpire;
            model.ReceiveExpire        = mallConfigInfo.ReceiveExpire;
            model.BroHisCount          = mallConfigInfo.BroHisCount;
            model.MaxShipAddress       = mallConfigInfo.MaxShipAddress;
            model.FavoriteProductCount = mallConfigInfo.FavoriteProductCount;
            model.FavoriteStoreCount   = mallConfigInfo.FavoriteStoreCount;

            return(View(model));
        }
Пример #9
0
        public HttpResponseMessage ShopCommodityOP(MallModel model)
        {
            string Result = string.Empty;

            try
            {
                //请求中包含的固定参数
                model.SOURCE      = ParametersFilter.FilterSqlHtml(model.SOURCE, 24);
                model.CREDENTIALS = ParametersFilter.FilterSqlHtml(model.CREDENTIALS, 24);
                model.ADDRESS     = HttpHelper.IPAddress();
                model.TERMINAL    = ParametersFilter.FilterSqlHtml(model.TERMINAL, 1);
                model.INDEX       = ParametersFilter.FilterSqlHtml(model.INDEX, 24);
                model.METHOD      = ParametersFilter.FilterSqlHtml(model.METHOD, 24);

                //去除参数中的特殊字符
                model.UserAccount     = ParametersFilter.FilterSqlHtml(model.UserAccount, 24);
                model.CommodityNumber = ParametersFilter.FilterSqlHtml(model.CommodityNumber, 64);
                model.Status          = ParametersFilter.FilterSqlHtml(model.Status, 1);
                model.OPStatus        = ParametersFilter.FilterSqlHtml(model.OPStatus, 1);

                //http请求
                Result = ApiHelper.HttpRequest(username, password, Url, model);

                ///写日志
                string RequestAction = "api/" + username + "/" + HttpContext.Current.Request.RequestContext.RouteData.Values["action"].ToString() + ":";
                LogHelper.LogResopnse(RequestAction + Result);
            }
            catch (Exception ex)
            {
                LogHelper.LogError(ex.ToString());
            }

            //返回请求结果
            HttpResponseMessage Respend = new HttpResponseMessage {
                Content = new StringContent(Result, Encoding.GetEncoding("UTF-8"), "application/json")
            };

            return(Respend);
        }
Пример #10
0
 public static void SetScrollToIndex(DependencyObject obj, MallModel value)
 {
     obj.SetValue(ScrollToIndexProperty, value);
 }
        public IHttpActionResult Mall_Select([FromBody] MallModel mallModel)
        {
            MallBL mallBL = new MallBL();

            return(Ok(mallBL.Mall_Select(mallModel)));
        }