Пример #1
0
        public RoomsUI()
        {
            BusinessLayer.DAO roomData = new BusinessLayer.DAO();

            InitializeComponent();
            RoomsList.DataContext = roomData.getRooms();
        }
        private void okbutton_Click(object sender, RoutedEventArgs e)
        {
            BusinessLayer.DAO          reqdata = new BusinessLayer.DAO();
            DataLayer.Entities.Request req     = new DataLayer.Entities.Request();
            req.roomId      = int.Parse(Roomnumber.Text);
            req.service     = (string)ServiceTypes.SelectedItem;
            req.status      = "NEW";
            req.description = descrptext.Text.ToString();

            reqdata.addRequest(req);
            this.Close();
        }