Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/23/08 00:28:11 (16 years ago)
Author:
gkronber
Message:
  • implemented operator to store a whole scope as an result item into the cedma-db.
  • worked on AgentListView to display results as sub-nodes of agents.

(ticket #191)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.DB/Database.cs

    r393 r394  
    323323          cnn.Open();
    324324          using(DbCommand c = cnn.CreateCommand()) {
    325             c.CommandText = "Select id, ParentAgentId, name, status, ControllerAgent, rawdata from Agent";
     325            c.CommandText = "Select id, name, status, ControllerAgent, rawdata from Agent where ParentAgentId isnull";
    326326            using(DbDataReader r = c.ExecuteReader()) {
    327327              while(r.Read()) {
    328328                AgentEntry agent = new AgentEntry();
     329                agent.ParentAgentId = null;
    329330                agent.Id = r.GetInt32(0);
    330                 agent.ParentAgentId = r.IsDBNull(1) ? null : new Nullable<long>(r.GetInt32(1));
    331                 agent.Name = r.IsDBNull(2)?"-":r.GetString(2);
    332                 agent.Status = (ProcessStatus)Enum.Parse(typeof(ProcessStatus), r.GetString(3));
    333                 agent.ControllerAgent = r.GetBoolean(4);
    334                 agent.RawData = (byte[])r.GetValue(5);
     331                agent.Name = r.IsDBNull(1)?"-":r.GetString(1);
     332                agent.Status = (ProcessStatus)Enum.Parse(typeof(ProcessStatus), r.GetString(2));
     333                agent.ControllerAgent = r.GetBoolean(3);
     334                agent.RawData = (byte[])r.GetValue(4);
    335335                agents.Add(agent);
    336336              }
Note: See TracChangeset for help on using the changeset viewer.