public IActionResult Delete(int id)
        {
            _InformationService.Delete(id);

            var response = new APIResponseViewModel();

            response.Status  = true;
            response.Message = "IInformation Deleted Sucess";
            return(Ok(response));
        }
Beispiel #2
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (dgwInformations.CurrentRow != null)
     {
         try
         {
             _informationService.Delete(new ELibraryInformation
             {
                 Id = Convert.ToInt32(dgwInformations.CurrentRow.Cells[0].Value)
             });
             MessageBox.Show("Ürün silindi!");
             LoadInformations();
         }
         catch (Exception exception)
         {
             MessageBox.Show(exception.Message);
         }
     }
 }