Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/29/11 10:53:02 (14 years ago)
Author:
msammer
Message:

#1446 Changed RunCollectionTable for using it in the MVC-pluginhost. Changes for using real Run-objects in the table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models/QueryModel.cs

    r5919 r6076  
    1111    public class QueryModel {
    1212
    13        public String SelectedSubMenu { get; set; }
     13        public String SelectedSubMenu { get; set; }
    1414
    15        public IList<Filter> QueryFilterGetAll() {
    16            QueryServiceClient client = Query.GetClientFactory();
     15        public IList<Filter> QueryFilterGetAll() {
     16            QueryServiceClient client = Query.GetClientFactory();
    1717
    18            IList<Filter> filterList = new List<Filter>();
     18            IList<Filter> filterList = new List<Filter>();
    1919
    20            if (client != null) {
    21                Filter[] filters = client.GetFilters();
    22                foreach (Filter f in filters) {
    23                    filterList.Add(f);
     20            if (client != null) {
     21                Filter[] filters = client.GetFilters();
     22                foreach (Filter f in filters) {
     23                    filterList.Add(f);
    2424
    25                }
    26            }
     25                }
     26            }
    2727
    28            return filterList;
    29        }
     28            return filterList;
     29        }
    3030
     31        // just 4 testing
     32        public IList<RunCollectionData> getTestRuns() {
     33
     34            QueryServiceClient client = Query.GetClientFactory();
     35
     36            if (client != null) {
     37                IList<RunCollectionData> runs = new List<RunCollectionData>();
     38
     39                //long[] runIds = client.GetRunIds(new Filter());
     40                //if (runIds.Length < cnt) cnt = runIds.Length;
     41
     42                long[] getRuns = new long[2]{1,2};
     43
     44                IList<Run> runList = client.GetRuns(getRuns, false).ToList<Run>();
     45
     46                foreach (Run r in runList)
     47                    runs.Add(new RunCollectionData(r));
     48
     49                return runs;
     50            }
     51            return new List<RunCollectionData>();
     52        }
    3153    }
    3254}
Note: See TracChangeset for help on using the changeset viewer.