Exemplo n.º 1
0
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            _TypeRoom = txtBlockType.Text;
            _DateFrom = rrDateFrom.Text;
            _DateTo   = rrDateTo.Text;
            _Fio      = txtFio.Text;
            _Tel      = txtTel.Text;
            _Email    = txtEmail.Text;
            _Cost     = txtBlockCost.Text;
            BrokedRoomDTO brokedRoom = new BrokedRoomDTO();

            brokedRoom.Fio               = _Fio;
            brokedRoom.NumberPhone       = _Tel;
            brokedRoom.Email             = _Email;
            brokedRoom.DescriptionRommId = _IDRecord;
            brokedRoom.DateFrom          = _DateFrom;
            brokedRoom.DateTo            = _DateTo;
            brokedRoom.Reserve           = 1;
            HotelServiceClient broked = new HotelServiceClient();

            broked.BrokedRoom(brokedRoom);
            Close();
        }
Exemplo n.º 2
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);
            }
        }
Exemplo n.º 3
0
 private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     _TypeRoom = txtBlockType.Text;
     _DateFrom = rrDateFrom.Text;
     _DateTo = rrDateTo.Text;
     _Fio = txtFio.Text;
     _Tel = txtTel.Text;
     _Email = txtEmail.Text;
     _Cost = txtBlockCost.Text;
     BrokedRoomDTO brokedRoom = new BrokedRoomDTO();
     brokedRoom.Fio = _Fio;
     brokedRoom.NumberPhone = _Tel;
     brokedRoom.Email = _Email;
     brokedRoom.DescriptionRommId = _IDRecord;
     brokedRoom.DateFrom = _DateFrom;
     brokedRoom.DateTo = _DateTo;
     brokedRoom.Reserve = 1;
     HotelServiceClient broked = new HotelServiceClient();
     broked.BrokedRoom(brokedRoom);
     Close();
 }