public AddReservation(int id, DateTime resDate, UserPanel w) { InitializeComponent(); loggedUserID = id; date = resDate; w2 = w; for (int i = 1; i <= 16; i++) { ComboBoxRoom.Items.Add(i); //Dodaje pokoje do comboBoxa } }
private void Button_Click(object sender, RoutedEventArgs e) { Database Sql = new Database(); if (Sql.getUserData(BoxLogin.Text, BoxPassword.Password) == null) { LabelError.Visibility = Visibility.Visible; } else { string[] loggedUser = Sql.getUserData(BoxLogin.Text, BoxPassword.Password); UserPanel w2 = new UserPanel(loggedUser); w2.Show(); this.Close(); } }
public EditReservation(string[] reservation, int id, DateTime x, UserPanel w) { loggedUserID = id; date = x; w2 = w; resData = reservation; InitializeComponent(); TextName.Text = reservation[1]; TextSurname.Text = reservation[2]; TextPhone.Text = reservation[3]; for (int i = 1; i <= 16; i++) { ComboBoxRoom.Items.Add(i); //Dodaje pokoje do comboBoxa } Database sql = new Database(); sql.removeReservation(reservation); }