Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/26/11 23:53:57 (13 years ago)
Author:
mjesner
Message:

#1499 result page, styling, functionality (add/remove) for post actions

Location:
branches/WebApplication/MVC2/HLWebOKBQueryPlugin/Models
Files:
1 added
1 edited

Legend:

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

    r6253 r6303  
    88using HLWebOKBQueryPlugin.Helpers;
    99
    10 namespace HLWebPluginHost.Models {
     10namespace HLWebOKBQueryPlugin.Models
     11{
    1112    public class QueryModel {
    1213
    1314        public String SelectedSubMenu { get; set; }
     15        private long[] runs;
     16
     17
    1418
    1519        public IList<Filter> QueryFilterGetAll() {
     
    4145        }
    4246
     47
     48        public long[] Runs
     49        {
     50            get
     51            {
     52                return this.runs;
     53            }
     54            set
     55            {
     56                this.runs = value;
     57            }
     58
     59        }
     60
     61
     62        public IList<RunCollectionData> RunCollection
     63        {
     64            get
     65            {
     66                QueryServiceClient client = Query.GetClientFactory();
     67                if (client != null)
     68                {
     69                    IList<RunCollectionData> runCollection = new List<RunCollectionData>();
     70
     71                    IList<Run> runList = client.GetRuns(runs, false).ToList<Run>();
     72
     73                    foreach (Run r in runList)
     74                        runCollection.Add(new RunCollectionData(r));
     75
     76                    return runCollection;
     77                }
     78                return new List<RunCollectionData>();
     79            }
     80        }
     81
    4382        // just 4 testing
    44         public IList<RunCollectionData> getTestRuns() {
     83        //public IList<RunCollectionData> getTestRuns() {
    4584
    46             QueryServiceClient client = Query.GetClientFactory();
     85        //    QueryServiceClient client = Query.GetClientFactory();
    4786
    48             if (client != null) {
    49                 IList<RunCollectionData> runs = new List<RunCollectionData>();
     87        //    if (client != null) {
     88        //        IList<RunCollectionData> runs = new List<RunCollectionData>();
    5089
    51                 //long[] runIds = client.GetRunIds(new Filter());
    52                 //if (runIds.Length < cnt) cnt = runIds.Length;
     90        //        //long[] runIds = client.GetRunIds(new Filter());
     91        //        //if (runIds.Length < cnt) cnt = runIds.Length;
    5392
    54                 long[] getRuns = new long[2] { 1, 2 };
     93        //        long[] getRuns = new long[2] { 1, 2 };
    5594
    56                 IList<Run> runList = client.GetRuns(getRuns, false).ToList<Run>();
     95        //        IList<Run> runList = client.GetRuns(getRuns, false).ToList<Run>();
    5796
    58                 foreach (Run r in runList)
    59                     runs.Add(new RunCollectionData(r));
     97        //        foreach (Run r in runList)
     98        //            runs.Add(new RunCollectionData(r));
    6099
    61                 return runs;
    62             }
    63             return new List<RunCollectionData>();
    64         }
     100        //        return runs;
     101        //    }
     102        //    return new List<RunCollectionData>();
     103        //}
    65104
    66105    }
Note: See TracChangeset for help on using the changeset viewer.