public void RegisterDetention(RegistrationOfDetentionDto registrationOfDetention) { if (registrationOfDetention != null) { dataService.ExecNonQuery("insertEmployee", registrationOfDetention.DetainedEmployee, "employeeID", out int _DetainedEmployeeID); dataService.ExecNonQuery("insertEmployee", registrationOfDetention.DeliveredEmployee, "employeeID", out int _DeliveredEmployeeID); dataService.ExecNonQuery("InsertDeliveryProcedures", "DeliveryProceduresID", out int _DeliveryProceduresID, new SqlParameter("@employeeID", _DeliveredEmployeeID)); dataService.ExecNonQuery("InsertDetentionProcedures", "DetentionProceduresID", out int _DetentionProceduresID, new SqlParameter("@employeeID", _DetainedEmployeeID)); var regist = new RegistrationOfDetention() { PrisonerID = registrationOfDetention.PrisonerID, DateOfDetention = registrationOfDetention.DateOfDetention, DateOfArrival = registrationOfDetention.DateOfArrival, DeliveredProceduresID = _DeliveryProceduresID, DetentionProceduresID = _DetentionProceduresID, PlaceofDetention = registrationOfDetention.PlaceofDetention }; dataService.ExecNonQuery("RegistrationOfDetention", regist); } }
public void RegisterDetention(RegistrationOfDetentionDto registrationOfDetention) { new PrisonerServiceClient() .Execute(client => client.RegisterDetention(registrationOfDetention)); }