Ejemplo n.º 1
0
        public List <DateDC> Post([FromBody] DateDC dateDC)
        {
            if (dateDC == null)
            {
                return(new List <DateDC>());
            }

            switch (dateDC.event_key)
            {
            case "search": {
                return(DatesManager.dates_search(_context, dateDC));
            }

            case "new_pending_date":
            {
                return(DatesManager.date_newPending(_context, dateDC));
            }

            case "update":
            {
                return(DatesManager.dates_update(_context, dateDC));
            }

            default:
                break;
            }

            return(new List <DateDC>());
        }
Ejemplo n.º 2
0
        public bool DatesAreSorted(bool ascendent)
        {
            var orderDates = this.GetDatesFromDateColumn();

            var orderedDates = DatesManager.SortDates(orderDates, ascendent);

            try
            {
                CollectionAssert.AreEqual(orderedDates.ToList(), orderDates.ToList());
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }