SQLite Update Table From DataGridView


Node Information
Updates table with the specified name with data present in the specified DataGridView.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Update IN RUN MULTIPLE FALSE FALSE
Database IN Object ONE FALSE FALSE
DataGridView IN DataGridView ONE FALSE FALSE
TableName IN String ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.Database.SQLite
{
    [IsNode("Update Table From DataGridView")]
    public class UpdateTableFromDataGridView : Node
    {
        Port create = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Update");
        Port db = new Port(PortType.IN, typeof(object), AcceptsLinks.ONE, "Database");
        Port tname = new Port(PortType.IN, typeof(string), AcceptsLinks.ONE, "TableName");
        Port lv = new Port(PortType.IN, typeof(System.Windows.Forms.DataGridView), AcceptsLinks.ONE, "DataGridView");
        public UpdateTableFromDataGridView()
        {
            NodeType = KGraph.NodeType.Method;
            Name = "SQLite Update Table From DataGridView";
            Dependency = DependencyLibraries.SQLITE;
            AddPort(create);
            AddPort(db);
            AddPort(lv);
            AddPort(tname);
            Information = "Updates table with the specified name with data present in the specified DataGridView.";
        }
        public override string Code()
        {
            return GetValue(db) + ".UpdateTableFromDataGridView(" + GetValue(tname) + ", " + GetValue(lv) + ");";
        }
    }
}