public DeleteApartmentResponse DeleteApartment(DeleteApartmentRequest request)
        {
            AdministrationServiceDAO adminDAO = new AdministrationServiceDAO();
            bool result = adminDAO.DeleteApartment(request.apartment);

            return(new DeleteApartmentResponse(result));
        }
Пример #2
0
        public DeleteApartmentResponse DeleteApartment(DeleteApartmentRequest request)
        {
            AdministrationServiceDAO adminDAO = new AdministrationServiceDAO();
            bool result = adminDAO.DeleteApartment(request.id);

            if (result)
            {
                return(new DeleteApartmentResponse(result));
            }
            else
            {
                ThrowNotFoundException(request.id);
                return(null);
            }
        }
Пример #3
0
        public string RemoveApartment(string id)
        {
            AdministrationServiceDAO adminDAO = new AdministrationServiceDAO();

            Response response = new Response();

            if (adminDAO.DeleteApartment(Convert.ToInt32(id)))
            {
                response.status = "ok";
            }
            else
            {
                response.status = "not_found";
            }
            return(JsonConvert.SerializeObject(response));
        }