public async void SortDueDateUpCommandExecute()
        {
            await ClosePopup();

            var tempRecords = _dealList.OrderBy(c => c.decisionDueDate).ToList();//ascending order

            DealList.Clear();
            foreach (var item in tempRecords)
            {
                DealList.Add(item);
            }
            _isStopVisible = false;
            var dealDueUp = DealList.FirstOrDefault();

            MessagingCenter.Send <object, DealsMainModel>(this, "DealsSortDueUp", dealDueUp);
        }
        public async void SortClosingDownCommandExecute()
        {
            await ClosePopup();

            var tempRecords = _dealList.OrderByDescending(c => c.estimatedClosingDate).ToList();//Descending order

            DealList.Clear();
            foreach (var item in tempRecords)
            {
                DealList.Add(item);
            }
            IsStopVisible = false;
            var dealClosingDown = DealList.FirstOrDefault();

            MessagingCenter.Send <object, DealsMainModel>(this, "DealsSortClosingDown", dealClosingDown);
        }
        public async void SortClearCommandExecute()
        {
            await ClosePopup();

            var tempRecords = _dealList.OrderBy(c => c.dealId).ToList();

            DealList.Clear();

            foreach (var item in tempRecords)
            {
                DealList.Add(item);
            }
            IsStopVisible = false;
            var dealClear = DealList.FirstOrDefault();

            MessagingCenter.Send <object, DealsMainModel>(this, "DealsSortClear", dealClear);
        }
Ejemplo n.º 4
0
 public void PrepareDeal(string AssetCode, string AccountNo)
 {
     DealList.Add(new DealItem()
     {
         AccNo = "123456", Asset = AssetCode, Side = "Авах", State = -1
     });
     DealList.Add(new DealItem()
     {
         AccNo      = AccountNo,
         Asset      = AssetCode,
         Side       = "Зарах",
         State      = 0,
         Qty        = 100,
         MatchID    = 213214,
         ID         = 2,
         Price      = 30,
         TotalPrice = 3000, Fee = 30, DealTime = DateTime.Now
     });
 }