public IActionResult Delete([FromBody] Hasta model)
        {
            service.Delete(model);
            ServiceResponse <Hasta> response = new ServiceResponse <Hasta>()
            {
                entity       = model,
                IsSuccessful = true
            };

            return(Ok(response));
        }
Beispiel #2
0
 private void btnHastaSil_Click(object sender, EventArgs e)
 {
     if (_secilenHasta != null)
     {
         var result = _hastaService.Delete(_secilenHasta.HastaID);
         if (result.IsSucceed)
         {
             MessageBox.Show(result.SuccessMessage, "İşlem Gerçekleştirildi!", MessageBoxButtons.OK,
                             MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show(string.Join("\n", result.ErrorMessage), "İşlem Gerçekleştirilemedi!",
                             MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         HastaListesiDoldur();
     }
 }