private void btnAdd_Click(object sender, EventArgs e)
 {
     using (ItemDetailsView frmItemDetailsView = new ItemDetailsView(this))
     {
         DialogResult result = frmItemDetailsView.ShowDialog();
         if (result == DialogResult.OK)
         {
             BindDataSource();
             this.ParentForm.ValidateChildren();
         }
     }
 }
        private void btnEdit_Click(object sender, EventArgs e)
        {
            OrderItem orderItem = OrderItems.Where(o => o.id.Equals(this.SelectedItemID)).FirstOrDefault();

            if (orderItem != null)
            {
                using (ItemDetailsView frmItemDetailsView = new ItemDetailsView(this, orderItem))
                {
                    DialogResult result = frmItemDetailsView.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        BindDataSource();
                        this.ParentForm.ValidateChildren();
                    }
                }
            }
        }