Beispiel #1
0
        //[HttpPost]
        // Düzenleye tıklandığında inputları doldurmaya yarayan controller
        public ActionResult UpdateMarketName(int ID)
        {
            MarketDTO marketVerileri = service.MarketService.Update(ID);


            return(Json(marketVerileri, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        public void  Edit(MarketDTO market)
        {
            Market m = Find((int)market.ID);

            m.MarketName     = market.MarketName;
            m.ComissionPrice = market.CommisionPrice;
            Save();
        }
Beispiel #3
0
        public void CreateMarket(MarketDTO marketDTO)
        {
            var mapper = new MapperConfiguration(cfg => cfg.CreateMap <MarketDTO, Market>()).CreateMapper();
            var Market = mapper.Map <MarketDTO, Market>(marketDTO);

            Database.Markets.Create(Market);
            Database.Save();
        }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Market"/> class
        /// </summary>
        /// <param name="market">a <see cref="MarketDTO"/> representing the market</param>
        internal Market(MarketDTO market)
        {
            if (market == null)
            {
                throw new ArgumentNullException(nameof(market));
            }

            Id         = market.Id;
            Specifiers = market.Specifiers;
            Outcomes   = market.Outcomes.ToList().AsReadOnly();
        }
Beispiel #5
0
        public MarketDTO Update(int ID)
        {
            MarketDTO bulunan = (from mar in GetAll()
                                 where mar.ID == ID
                                 select new MarketDTO
            {
                CommisionPrice = (int)mar.ComissionPrice,
                MarketName = mar.MarketName,
                ID = mar.ID,
            }).SingleOrDefault();

            return(bulunan);
        }
Beispiel #6
0
        //Dolan inputları tekrar kaydeden controller
        public ActionResult EditMarketName(MarketDTO gelen)
        {
            MarketDTO market = new MarketDTO()
            {
                CommisionPrice = gelen.CommisionPrice,
                MarketName     = gelen.MarketName,
                ID             = gelen.ID
            };

            service.MarketService.Edit(market);

            return(Json(true, JsonRequestBehavior.AllowGet));
        }
Beispiel #7
0
        public ApplicationSettings()
        {
            ServerUrl          = "https://ciapipreprod.cityindextest9.co.uk/tradingapi";
            StreamingServerUrl = "https://pushpreprod.cityindextest9.co.uk/CITYINDEXSTREAMING";
            UserName           = "******";
            Password           = "******";

            NewsMaxCount = 30;
            NewsCategory = "NEWS.MOCKHEADLINES.UK";

            GraphPeriodSecs = 300;

            PricesToWatch = new MarketDTO[0];
        }
        private void ImageAdd_Click(object sender, MouseButtonEventArgs e)
        {
            var items = AllMarketsGrid.SelectedItems;

            foreach (MarketDTO market in items)
            {
                var newSubscription = new MarketDTO {
                    MarketId = market.MarketId, Name = market.Name
                };

                for (var i = 0; i < _subscriptions.Count; i++)
                {
                    var cur = _subscriptions[i];
                    if (cur.MarketId == newSubscription.MarketId)
                    {
                        _subscriptions.RemoveAt(i);
                        break;
                    }
                }
                _subscriptions.Add(newSubscription);
            }
        }