public string CheckValuesForAddDetainee(int detaineeID, int detentionID) { string message = null; if (_detaineeDataProvider.CheckDetaineeInDetention(detaineeID, detentionID)) { message = "[Такой задержанный уже имеется в данном задержании]"; } if (_detaineeDataProvider.GetDetaineeByID(detaineeID) == null) { message += "[Такой задержанный отсутствует в базе данных]"; } if (_detentionDataProvider.GetDetentionByID(detentionID) == null) { message += "[Такое задержание отсутствует в базе данных]"; } return(message); }
/* public ResponseClass<List<Delivery>> GetDeliveries() * { * return _deliveryResponseList.CreateResponse("Delivery list", true, _deliveryDataProvider.GetDeliveries()); * }*/ public string CheckValuesForDelivery(int detaineeID, int detentionID, int employeeID) { string message = null; if (_detaineeDataProvider.GetDetaineeByID(detaineeID) == null) { message += "[Такой задержанный отсутствует в базе данных]"; } if (_detentionDataProvider.GetDetentionByID(detentionID) == null) { message += "[Такое задержание отсутствует в базе данных]"; } if (_employeeDataProvider.GetEmployeeByID(employeeID) == null) { message += "[Такой сотрудник отсутствует в базе данных]"; } return(message); }
public Detention GetDetentionByID(int id) { return(_detentionDataProvider.GetDetentionByID(id)); }