private void btnAddProduct_Click(object sender, EventArgs e)
        {
            FrmProduct frmProduct = new FrmProduct();

            frmProduct.ShowDialog();
            FillDataGridViewProducsAsync();
        }
 private void btnUpdateProduct_Click(object sender, EventArgs e)
 {
     if (dgvProducts.SelectedRows.Count > 0)
     {
         int idSelectedProduct = Convert.ToInt32(dgvProducts.SelectedRows[0].Cells[0].Value);
         IRepositoryGeneric <Product> repositoryProduct = new RepositoryProduct();
         Product    productToBeChanged = repositoryProduct.SelectById(idSelectedProduct);
         FrmProduct frmProduct         = new FrmProduct(productToBeChanged);
         frmProduct.ShowDialog();
         FillDataGridViewProducsAsync();
     }
     else
     {
         MessageBox.Show("Please select one product first.", "Error", MessageBoxButtons.OK,
                         MessageBoxIcon.Warning);
     }
 }