Beispiel #1
0
        public async Task <ActionResult> GetListAsync(int index, int rows, string order)
        {
            Domain.Segments.Hub hub  = new Domain.Segments.Hub();
            Domain.Resp         resp = await hub.GetListAsync(index, rows, order, Domain.Segments.Segment.SegmentState.Enabled);

            return(Pack(resp));
        }
        public async Task <ActionResult> GetListAsync(int index, int rows, string search, string state)
        {
            if (string.IsNullOrWhiteSpace(search))
            {
                search = "";
            }
            Domain.Segments.Segment.SegmentState s = Domain.Segments.Segment.SegmentState.NotSelected;
            if (Enum.TryParse(typeof(Domain.Segments.Segment.SegmentState), state, true, out object result))
            {
                s = (Domain.Segments.Segment.SegmentState)result;
            }

            Domain.Segments.Hub hub  = new Domain.Segments.Hub();
            Domain.Resp         list = await hub.GetListAsync(index, rows, search, s);

            return(Pack(list));
        }