Esempio n. 1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (Convert.ToInt32(lblID.Text) <= 0)
            {
                return;
            }

            if (MessageBox.Show(@"Confirm Delete Production Material : " + lblName.Text, @"Delete", MessageBoxButtons.YesNo,
                                MessageBoxIcon.Question) != DialogResult.Yes)
            {
                return;
            }

            if (!_productionMaterialService.Delete(Convert.ToInt32(lblID.Text)))
            {
                return;
            }

            MessageBox.Show(@"Data Deleted Successfully", @"Delete", MessageBoxButtons.OK, MessageBoxIcon.Information);
            grdData.CurrentRow.Delete();
        }