Exemplo n.º 1
0
        private void room_Info_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var    selRoom  = room_Info.SelectedItem;
            string gender   = Sex;
            string _selRoom = ((RoomItem)selRoom).room_Numb;
            string _fplaces = ((RoomItem)selRoom).Fplaces_Con;

            if (SetFamily.IsChecked == true)
            {
                gender = "c";
            }
            if (Convert.ToInt32(_fplaces) != 0)
            {
                Common_Functions.update_RoomInfo(globalConnection, _selRoom, gender);
                Common_Functions.update_StudentRoomInfo(globalConnection, _selRoom, studentID);
                Common_Functions.update_OtherLivingRoomInfo(globalConnection, _selRoom, studentID);
                //room_Info.ItemsSource = RoomItem.getItems(globalConnection, Sex);
                parentLabel.Content = _selRoom;
                this.Close();
            }
            else
            {
                MessageBox.Show("В выбранной комнате нет свободных мест, выберете другую комнату");
            }
        }
Exemplo n.º 2
0
        private void Accept_Click(object sender, RoutedEventArgs e)
        {
            var    selRoom  = room_Info.SelectedItem;
            string gender   = Sex;
            string _selRoom = ((RoomItem)selRoom).room_Numb;

            if (SetFamily.IsChecked == true)
            {
                gender = "c";
            }
            Common_Functions.update_RoomInfo(globalConnection, _selRoom, gender);
            Common_Functions.update_StudentRoomInfo(globalConnection, _selRoom, studentID);
            //room_Info.ItemsSource = RoomItem.getItems(globalConnection, Sex);
            parentLabel.Content = _selRoom;
            this.Close();
        }