private void Sell_FormClosing(object sender, FormClosingEventArgs e)
{
if (this.DialogResult == false)
{
if (dgvProducts.Rows != null )
{
e.Cancel = (MessageBox.Show("do u really want to close?", "attention", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes);
}
}
}