public SimpleResponse Delete(StaffDto dto) { var response = new SimpleResponse(); try { var model = SimpleMapper.Map <StaffDto, StaffViewModel>(dto); response = iStaffBusiness.Delete(model); } catch (Exception ex) { response.ResponseCode = BusinessResponseValues.InternalError; response.ResponseMessage = "Silme iþleminde hata oluþtu."; SimpleFileLogger.Instance.Error(ex); } return(response); }
public IActionResult DeleteStaff([FromBody] Dictionary <string, object> formData) { string staffid = ""; if (formData.Keys.Contains("staffid") && !string.IsNullOrEmpty(Convert.ToString(formData["staffid"]))) { staffid = Convert.ToString(formData["staffid"]); } _itemBusiness.Delete(staffid); return(Ok()); }
public ActionResult DeletePost(int staffId) { var response = iStaffBusiness.Delete(staffId); if (response.ResponseCode > 0) { return(RedirectToAction("Index")); } else { ModelState.AddModelError(string.Empty, response.ResponseMessage); return(RedirectToAction("Delete", new { staffId })); } }
public IHttpActionResult Delete(int staffId) { var result = iStaffBusiness.Delete(staffId); return(Json(result)); }
public SimpleResponse Delete(int staffId) { var result = iStaffBusiness.Delete(staffId); return(result); }