public IActionResult DeleteOutlet(int Id)
        {
            var outlet = _outletData.GetOutlet(Id);

            if (outlet != null)
            {
                _outletData.DeleteOutlet(outlet);

                return(Ok("{ \"response\":\"deleted\"}"));
            }

            return(NotFound(" { \"response\": \"Outlet with Id: " + Id + " was not found\" }"));
        }
Beispiel #2
0
        public ActionResult Delete(int id)
        {
            int result = 0;

            if (UserRolePermissionForPage.Delete == true)
            {
                result = _iCommonService.GetValidateReference("Outlet", id.ToString());
                if (result > 0)
                {
                    return(RedirectToAction(nameof(Index), new { noDelete = result }));
                }
                else
                {
                    var deletedid = _iOutletService.DeleteOutlet(id);
                    return(RedirectToAction(nameof(Index)));
                }
            }
            else
            {
                return(RedirectToAction("NotFound", "Error"));
            }
        }
Beispiel #3
0
        public bool Delete(int id)
        {
            var response = _outletservice.DeleteOutlet(id);

            return(response);
        }