how to call click event of class file from user control by using c#
<p>I had created one user control and one class file, The user control contain save button. When user click save button then i want call the Insert() using ItemClickedEventHandler from infocore class file please help me.</p>

<p>C#: User Control</p>

<pre><code>public partial class toolbar : UserControl
{
    public delegate void ItemClickedEventHandler(System.Object sender, ItemClickEventArgs     e);
    public toolbar()
    {
        InitializeComponent();
        inf = new IAToolBar.infocore();
    }
    public event ItemClickedEventHandler ItemClicked;


    public class ItemClickEventArgs
    {
        public string flag;
        public ItemClickEventArgs(string flg)
        {
            flag = flg;
        }
    }

    private void btnsave_Click(object sender, EventArgs e)
    {
        if (ItemClicked != null)
        {
            ItemClicked(sender, new ItemClickEventArgs("Save"));
        }
    }
}
</code></pre>

<p>C#: infocore.cs</p>

<pre><code>public void Insert(System.Windows.Forms.Form f, e)
{
connection.Open();
try
{
query = "INSERT INTO " + f.Tag.ToString().Trim() + " (" + queryfields + ") VALUES (" + formvalues + ") ";
MySqlCommand cmd = new MySqlCommand(query, connection);
cmd.ExecuteNonQuery();
MessageBox.Show("Save Sucessfully", "Inventory Accountancy", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString(), "Inventory Accountancy", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
connection.Close();
}
}
</code></pre>
