private void buttonDeleteBox_Click(object sender, EventArgs e)
        {
            var data = dataGridViewAllBoxes.CurrentRow.Cells[3].Value.ToString();
            int id   = Int32.Parse(data);

            _boxService.Delete(id);
            RefreshDataGridView();
        }
Example #2
0
 //Delete a box with the specified id
 public ActionResult Delete(int id)
 {
     _service.Delete(id);//Find box if there exists one
     return(RedirectToAction("List"));
 }