private void save_file(IdoItemWrapper row, LoadCollectionResponseWrapper response)
 {
     var ido = row["CollectionName"].ToString();
     var writer = File.CreateText(string.Format("IDO{0}Builder.cs", ido));
     writer.Write(get_file_text(ido, response.Records.First()).Replace("[", "{").Replace("]", "}"));
     writer.Close();
 }
 private void save_file(DataRow row, LoadCollectionResponseWrapper response)
 {
     var ido = row["CollectionName"].ToString();
     var method = row["MethodName"].ToString();
     var writer = File.CreateText(string.Format("IDO{0}.{1}MethodCallBuilder.cs", ido, method));
     writer.Write(get_file_text(ido, method, response.Records.First()).Replace("[", "{").Replace("]", "}"));
     writer.Close();
 }
        private IdoItemWrapper get_first_child_with_children(LoadCollectionResponseWrapper resp)
        {
            var records = resp.Records;
            var num = 0;
            var found = false;
            IEnumerable<IdoItemWrapper>  children  = null;
            foreach (var record in records)
            {
                children = record.Records;
                return children.Find(wrapper => wrapper.Records.Count() > 0);
            }

            return null;
        }
        public UpdateCollectionRequestData GetUpdateCollectionRequest( 
            IIdoCommandBuilder builder, LoadCollectionResponseWrapper loadData)
        { 
            var request = new UpdateCollectionRequestData()
                              {
                                  IDOName = builder.GetIDOName(), 
                                  RefreshAfterUpdate = true, 
                                  LinkBy = builder.GetLinkBy()
                              };
            var action = GetUpdateActionFromBuilder(builder);

            request.Items.AddRange(get_update_items(builder, loadData.Records, action));
            return request;
        }
 public void  print_file_to_screen(IdoItemWrapper row, LoadCollectionResponseWrapper response)
 { 
     var ido = row["CollectionName"].ToString();
     Console.WriteLine(get_file_text(ido, response.Records.Find(r => r.GetValue("CollectionName").ToString() == ido)).Replace("[", "{").Replace("]", "}"));
 }