public DefinitionRow AddDefinitionRow(string Location, string ParameterType, string Title, string Source, string TagInfo) { DefinitionRow rowDefinitionRow = ((DefinitionRow)(this.NewRow())); rowDefinitionRow.ItemArray = new object[] { Location, ParameterType, Title, Source, TagInfo }; this.Rows.Add(rowDefinitionRow); return(rowDefinitionRow); }
public DefinitionRowChangeEvent(DefinitionRow row, DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void RemoveDefinitionRow(DefinitionRow row) { this.Rows.Remove(row); }
public void AddDefinitionRow(DefinitionRow row) { this.Rows.Add(row); }
internal static string Create(CodeDefinition codeDefinition, DataContainer dataContainer) { var code = codeDefinition.FormattedCode(); foreach (var placeholder in code.RegexValues(CodePatterns.IdPlaceholder)) { var id = placeholder.RegexFirst(CodePatterns.Id); var codeChildDefinition = Def.CodeDefinitionCollection .FirstOrDefault(o => o.Id == id); if (codeChildDefinition != null) { Def.SetCodeDefinitionOption(placeholder, codeChildDefinition); var codeChildCollection = new List <string>(); switch (codeChildDefinition.RepeatType) { case "DefinitionFile": DefinitionFile.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "DefinitionRow": DefinitionRow.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "DefinitionColumn": DefinitionColumn.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "BaseModel": BaseModel.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "BaseItemModel": BaseItemModel.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "Table": Table.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "Column": Column.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "Join": Join.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "Form": Form.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; case "Display": Display.SetCodeCollection( codeChildDefinition, codeChildCollection, dataContainer); break; default: switch (dataContainer.Type) { case "DefinitionFile": DefinitionFile.SetCodeCollection_Default( codeChildDefinition, codeChildCollection, dataContainer); break; case "Table": Column.SetCodeCollection_Default( codeChildDefinition, codeChildCollection, dataContainer); break; default: break; } break; } code = CodeChildCollection( code, placeholder, codeChildDefinition, codeChildCollection); codeChildDefinition.RestoreBySavedMemory(); } else { Consoles.Write( DisplayAccessor.Displays.Get("DefinitionNotFound").Params( id, DefinitionFiles.CodeDefinitionFileName), Consoles.Types.Error, abort: true); } } ReplaceCode(ref code, dataContainer.TableName); return(code); }