Пример #1
0
        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);
        }
Пример #2
0
        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());
        }
Пример #3
0
        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 }));
            }
        }
Пример #4
0
        public IHttpActionResult Delete(int staffId)
        {
            var result = iStaffBusiness.Delete(staffId);

            return(Json(result));
        }
Пример #5
0
        public SimpleResponse Delete(int staffId)
        {
            var result = iStaffBusiness.Delete(staffId);

            return(result);
        }