public async Task <ActionResult> Delete(int id)
        {
            if (id == 0)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            await ubicacionesService.eliminarUbicacion(id);

            TempData["SuccessMessage"] = "Deleted Successfully";
            return(RedirectToAction("Index"));
        }
Example #2
0
        public async Task <ActionResult> ClientePersonaDelete(ClientePersona_dto model)
        {
            if (model == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            await clientesService.eliminarClientePersona(model.ClientePersonaId);

            await clientesService.eliminarCliente(model.Id);

            await ubicacionesService.eliminarUbicacion(model.UbicacionId);

            TempData["SuccessMessage"] = "Deleted Successfully";
            return(RedirectToAction("ClientesPersonas"));
        }