コード例 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            int          InventoryId  = Convert.ToInt32(dgvInventory.CurrentRow.Cells["StockInId"].Value);
            string       Batch        = dgvInventory.CurrentRow.Cells["Batch"].Value.ToString();
            DialogResult dialogResult = MessageBox.Show(btnDelete, "Are you really want to Delete Batch:" + Batch, "Confirmation", MessageBoxButtons.OKCancel);

            if (dialogResult == DialogResult.OK)
            {
                StockInService.DeleteInventoryById(InventoryId);
                ResetUIInputtdData();
            }
        }