Example #1
0
        public void BrokedRoom(BrokedRoomDTO room)
        {
            try
            {
                string          connectionString = ConfigurationManager.ConnectionStrings["ConnectToSQL"].ConnectionString;
                IRoomRepository repository       = new RoomRepository(connectionString);

                NewRoom newRoom = new NewRoom();
                newRoom.Fio               = room.Fio;
                newRoom.NumberPhone       = room.NumberPhone;
                newRoom.Email             = room.Email;
                newRoom.DescriptionRommId = room.DescriptionRommId;
                newRoom.DateFrom          = room.DateFrom;
                newRoom.DateTo            = room.DateTo;
                newRoom.Reserve           = room.Reserve;

                repository.BrokedRoom(newRoom);
            }
            catch (Exception e)
            {
                Exception baseException = e.GetBaseException();
                throw new FaultException(e.Message);
            }
        }