Пример #1
0
        public ActionResult GetData()
        {
            heper     = new AcessDBHelper();
            currentDt = heper.QueryData(heper.SelectJYSINfo("Exchange"));

            var item = new List <MapItem>();

            for (int i = 0; i < currentDt.Rows.Count; i++)
            {
                var mapinfo = GetMapItemInfo(currentDt.Rows[i], currentDt.Rows.Count - i);
                if (!item.Select(_ => _.City).Contains(mapinfo.City) && !item.Select(_ => _.Loc).Contains(mapinfo.Loc))
                {
                    item.Add(mapinfo);
                }
            }

            return(Json(item));
        }
Пример #2
0
        public ActionResult SubUnits(string id, string exchangeName)
        {
            var item = new List <SubUnit>();

            var result = heper.QueryData(heper.QuerySubUnit("Unit1113", id));

            for (int i = 0; i < result.Rows.Count; i++)
            {
                var unitmodel = GetUnitInfo(result.Rows[i]);

                if (!item.Select(_ => _.UnitName).Contains(unitmodel.UnitName))
                {
                    item.Add(unitmodel);
                }
            }

            ViewBag.Title = exchangeName;
            ViewBag.Info  = SelectExchangeInfo(id);

            return(View(item));
        }