using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using MySQL.Grt;
using MySQL.Utilities;
using MySQL.GUI.Workbench;


namespace MySQL.GUI.Workbench.Plugins
{
  public partial class DbMysqlInsertsEditor : Form
  {
    GridModel insertsModelBE;
    GrtGridModel insertsGridModel;
    MySQLTableEditorBE editorBE;

    public DbMysqlInsertsEditor()
    {
      InitializeComponent();
    }

    public DbMysqlInsertsEditor(MySQLTableEditorBE editorBE)
    {
      InitializeComponent();

      this.editorBE = editorBE;

      insertsModelBE = editorBE.get_inserts_grid();
      insertsGridModel = new GrtGridModel(dataGridView, insertsModelBE);
      editorBE.update_inserts_grid();

      insertsGridModel.UpdateGridView();
    }

    private void okButton_Click(object sender, EventArgs e)
    {
      editorBE.update_from_inserts_grid();
    }
  }
}