protected void Insert(AbstractComponent abstrComp) { base.Insert(abstrComp); RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@InstanceId", abstrComp.InstanceId, DbType.Int32); //throw new NotImplementedException("What to do with ParentComponentId?"); //if (abstrComp.ParentComponent != null) // insertAction.AddParameter("@ParentComponentId", abstrComp.ParentComponent.InstanceId, DbType.Int32); //else // insertAction.AddParameter("@ParentComponentId", null, DbType.Int32); insertAction.AddParameter("@TopVal", abstrComp.Top.Value, DbType.Int32); insertAction.AddParameter("@TopUnit", (int)abstrComp.Top.Unit, DbType.Int32); insertAction.AddParameter("@LeftVal", abstrComp.Left.Value, DbType.Int32); insertAction.AddParameter("@LeftUnit", (int)abstrComp.Left.Unit, DbType.Int32); insertAction.AddParameter("@HeightVal", abstrComp.Height.Value, DbType.Int32); insertAction.AddParameter("@HeightUnit", (int)abstrComp.Height.Unit, DbType.Int32); insertAction.AddParameter("@WidthVal", abstrComp.Width.Value, DbType.Int32); insertAction.AddParameter("@WidthUnit", (int)abstrComp.Width.Unit, DbType.Int32); this.ExecuteCommand(insertAction); }
protected void Insert(Binding binding) { RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@ImplementationId", binding.ImplementationId, DbType.Int32); insertAction.AddParameter("@BindablePointId", binding.BindablePointId, DbType.Int32); this.ExecuteCommand(insertAction); binding.BindingId = insertAction.InsertedIdentity; }
protected void Insert(Instance instance) { RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@ClassDefinitionId", instance.ClassDefinitionId, DbType.Int32); insertAction.AddParameter("@InstanceName", instance.InstanceName, DbType.String); this.ExecuteCommand(insertAction); instance.InstanceId = insertAction.InsertedIdentity; }
protected void Insert(BindablePoint bindPoint) { RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@BindablePointId", bindPoint.BindablePointId, DbType.Int32); insertAction.AddParameter("@BindablePointDefinitonId", bindPoint.BindablePointDefinitionId, DbType.Int32); insertAction.AddParameter("@InstanceId", bindPoint.InstanceId, DbType.Int32); insertAction.AddParameter("@Active", bindPoint.Active, DbType.Boolean); this.ExecuteCommand(insertAction); bindPoint.BindablePointId = insertAction.InsertedIdentity; }
protected void Insert(PlugLocation plugLoc) { RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@PlugLocationName", plugLoc.PlugLocationName, DbType.String); insertAction.AddParameter("@PlugLocationDescription", plugLoc.PlugLocationDescription, DbType.String); insertAction.AddParameter("@PlugLocationPath", plugLoc.PlugLocationPath, DbType.String); insertAction.AddParameter("@PlugId", plugLoc.PlugId, DbType.Int32); this.ExecuteCommand(insertAction); plugLoc.PlugLocationId = insertAction.InsertedIdentity; }
protected void Insert(PlugIn plug) { RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@PlugName", plug.PlugName, DbType.String); insertAction.AddParameter("@PlugFriendlyName", plug.PlugFriendlyName, DbType.String); insertAction.AddParameter("@PlugDescription", plug.PlugDescription, DbType.String); insertAction.AddParameter("@PlugVersion", plug.PlugVersion, DbType.String); insertAction.AddParameter("@Active", plug.Active, DbType.Boolean); this.ExecuteCommand(insertAction); plug.PlugId = insertAction.InsertedIdentity; }
protected void Insert(PlugFile plugFile) { RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@PlugFileName", plugFile.PlugFileName, DbType.String); insertAction.AddParameter("@RelativeIncomingPath", plugFile.RelativeIncomingPath, DbType.String); insertAction.AddParameter("@DestinationLocationId", plugFile.DestinationLocationId, DbType.Int32); insertAction.AddParameter("@PlugId", plugFile.PlugId, DbType.Int32); this.ExecuteCommand(insertAction); plugFile.PlugFileId = insertAction.InsertedIdentity; }
protected void Insert(BindablePointDefinition bindPointDef) { RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@ClassDefinitionId", bindPointDef.ClassDefinitionId, DbType.Int32); insertAction.AddParameter("@BindablePointName", bindPointDef.BindablePointName, DbType.String); insertAction.AddParameter("@BindablePointFriendlyName", bindPointDef.BindablePointFriendlyName, DbType.String); insertAction.AddParameter("@BindablePointDescription", bindPointDef.BindablePointDescription, DbType.String); insertAction.AddParameter("@InterfaceId", bindPointDef.InterfaceId, DbType.Int32); this.ExecuteCommand(insertAction); bindPointDef.BindablePointDefinitionId = insertAction.InsertedIdentity; }
protected void Insert(ClassDefinition classDef) { RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@ClassName", classDef.ClassName, DbType.String); insertAction.AddParameter("@ClassDefinitionDescription", classDef.ClassDefinitionDescription, DbType.String); insertAction.AddParameter("@Active", classDef.Active, DbType.Boolean); insertAction.AddParameter("@FileId", classDef.FileId, DbType.Int32); insertAction.AddParameter("@PlugId", classDef.PlugId, DbType.Int32); this.ExecuteCommand(insertAction); classDef.ClassDefinitionId = insertAction.InsertedIdentity; }
protected void Insert(StaticContent rootCont) { base.Insert(rootCont); RawSqlInsertAction insertAction = new RawSqlInsertAction(); insertAction.CommandText = _insertCommandText; insertAction.AddParameter("@InstanceId", rootCont.InstanceId, DbType.Int32); insertAction.AddParameter("@ParentInstanceId", rootCont.ParentContent.InstanceId, DbType.Int32); insertAction.AddParameter("@ContentFriendlyName", rootCont.ContentFriendlyName, DbType.String); insertAction.AddParameter("@ContentDescription", rootCont.ContentDescription, DbType.String); insertAction.AddParameter("@ContentImageSrc", rootCont.ContentImageSrc, DbType.String); this.ExecuteCommand(insertAction); }