public Room Update(Room item) { string[] temp = new string[7]; temp[0] = item.GetId().ToString(); temp[1] = ((int)item.Type).ToString(); temp[2] = item.Name; temp[3] = ""; foreach (ItemCount ic in item.ItemCount) { temp[3] += ic.GetId() + " "; } temp[3] = temp[3].Trim(); temp[4] = ""; temp[5] = ""; temp[6] = ""; if (item.Type == RoomType.stationary) { StationaryRoom statRoom = item as StationaryRoom; temp[4] = statRoom.Capacity.ToString(); foreach (Patient p in statRoom.Patient) { temp[5] += p.GetId().ToString() + " "; } temp[5] = temp[5].Trim(); temp[6] = statRoom.stationaryRoomPatientsState.GetId().ToString(); } if (Persistence.EditEntry(path, temp)) { return(item); } else { return(null); } }
public List <StationaryRoomPatientsState> GetAllByRoom(StationaryRoom room) { List <string[]> ids = Persistence.ReadEntryByKey(path, room.GetId().ToString(), 1); List <StationaryRoomPatientsState> srps = new List <StationaryRoomPatientsState>(); foreach (string[] s in ids) { srps.Add(Read(uint.Parse(s[0]))); } return(srps); }
public List <StationaryRoomPatientsState> GetAllStationaryRoomPatientsState(StationaryRoom stationaryRoom) { return(StationaryRoomPatientsStateRepository.GetInstance().GetAllByRoom(stationaryRoom)); }
public List <StationaryRoomPatientsState> GetAllStationaryRoomPatientsState(StationaryRoom stationaryRoom) { return(iRoomAndInventoryService.GetAllStationaryRoomPatientsState(stationaryRoom)); }