123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- using System.Windows.Threading;
- namespace HotelCalifornia
- {
- /// <summary>
- /// Логика взаимодействия для Variant.xaml
- /// </summary>
- public partial class Variant : Window
- {
- public Variant()
- {
- InitializeComponent();
- //Таймер на обновление времени
- DispatcherTimer timer = new DispatcherTimer();
- timer.Tick += new EventHandler(Update_Timer_Tick);
- timer.Interval = new TimeSpan(0, 0, 1);
- timer.Start();
- }
- //Вывод даты и время в textblock
- private void Update_Timer_Tick(object sender, EventArgs e)
- {
- timetxt.Text = DateTime.Now.ToString();
- }
- //Перетаскивание окна
- private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
- {
- try
- {
- DragMove();
- }
- catch
- {
- }
- }
- //Выход из приложения
- private void Close(object sender, RoutedEventArgs e)
- {
- Application.Current.Shutdown();
- }
-
- //Возврат к окну авторизации
- private void Back(object sender, RoutedEventArgs e)
- {
- MainWindow mainWindow = new MainWindow();
- this.Close();
- mainWindow.Show();
- }
- //Переход к окну клиентов
- private void KlientGO_Click(object sender, RoutedEventArgs e)
- {
- Client client = new Client();
- client.idadmintxt.Text = idadmintxt.Text;
- this.Close();
- client.Show();
- }
- //Переход к окну комнат
- private void RoomGO_Click(object sender, RoutedEventArgs e)
- {
- Room room = new Room();
- room.idadmintxt.Text = idadmintxt.Text;
- this.Close();
- room.Show();
- }
- //Свернуть окно
- private void WindMin_Click(object sender, RoutedEventArgs e)
- {
- this.WindowState = WindowState.Minimized;
- }
- //Переход к окну отчетов
- private void ReportGO_Click(object sender, RoutedEventArgs e)
- {
- Report report = new Report();
- report.idadmintxt.Text = idadmintxt.Text;
- this.Close();
- report.Show();
- }
- //Переход к окну заселения
- private void ZaselenieGO_Click(object sender, RoutedEventArgs e)
- {
- ClientRoom clientRoom = new ClientRoom();
- clientRoom.idadmintxt.Text = idadmintxt.Text;
- this.Close();
- clientRoom.Show();
- }
- //Переход к окну резервирования
- private void RezervirovanieGO_Click(object sender, RoutedEventArgs e)
- {
- Rezerv rezerv = new Rezerv();
- rezerv.idadmintxt.Text = idadmintxt.Text;
- this.Close();
- rezerv.Show();
- }
- }
- }
|