public void Next() { time = 0; timeWait = 0; if (++current < sors.Count) { QueryBD.champ.Update(sors[current], current + 1 < sors.Count ? sors[current + 1] : null); EndFight.Content = sors[current].Start; if (current + 1 < sors.Count) { BeginNextFight.Content = sors[current + 1].Start; } UpdateRules(); } else if (current == 0) { MessageBox.Show("Соревнований нет", "Внимание"); QueryBD.Navigate2(QueryBD.selectRun); } else { MessageBox.Show("Конец", "Внимание"); QueryBD.Navigate2(QueryBD.selectRun); } }
public MainWindow() { InitializeComponent(); QueryBD.window = this; gr.Children.Add(QueryBD.fr); QueryBD.Navigate(QueryBD.log); }
void GU_Click(object o, RoutedEventArgs e) { if (QueryBD.гручастник == null) { QueryBD.гручастник = new ГруппаУчастников(); } QueryBD.Navigate(QueryBD.гручастник); }
void Uch_Click(object o, RoutedEventArgs e) { if (QueryBD.участник == null) { QueryBD.участник = new Участники(); } QueryBD.Navigate(QueryBD.участник); }
void Reg_Click(object sender, RoutedEventArgs e) { if (QueryBD.reg == null) { QueryBD.reg = new Registration(); } QueryBD.Navigate(QueryBD.reg); }
void Button_Click(object o, RoutedEventArgs e) { QueryBD.user = null; QueryBD.tat = null; QueryBD.гручастник = null; QueryBD.участник = null; QueryBD.Navigate(QueryBD.log); }
void WindowCtrl_Click(object o, RoutedEventArgs e) { if (QueryBD.wCtrl == null) { QueryBD.wCtrl = new WIndowCtrl(); } QueryBD.Navigate(QueryBD.wCtrl); }
void Reset_Click(object sender, RoutedEventArgs e) { if (QueryBD.res == null) { QueryBD.res = new Reset(); } QueryBD.Navigate(QueryBD.res); }
void Tat_Click(object o, RoutedEventArgs e) { if (QueryBD.tat == null) { QueryBD.tat = new Татами(); } QueryBD.Navigate(QueryBD.tat); }
public WIndowCtrl() { InitializeComponent(); grFrame.Children.Add(QueryBD.fr2); if (QueryBD.selectRun == null) { QueryBD.selectRun = new SelectRunChampionat(); } QueryBD.Navigate2(QueryBD.selectRun); }
void Edit_Click(object o, RoutedEventArgs e) { if (Uch.SelectedItem != null) { QueryBD.ModeУчастник(Uch.SelectedItem as participants); } else { MessageBox.Show("Выберите участника для модификации"); } }
void Button_Click(object o, RoutedEventArgs e) { if (Tat.SelectedItem != null) { if (QueryBD.sorev == null) { QueryBD.sorev = new SorevnovanieShow(); } QueryBD.Navigate2(QueryBD.sorev); QueryBD.sorev.Update(Tat.SelectedItem as ChampionatConfig); } }
void Reset_Click(object sender, RoutedEventArgs e) { if (Login.Text == "" || Password.Password == "" || TryPassword.Password == "" || Password.Password != TryPassword.Password) { Error.Content = "Error: Entry login, password, email, trypassword, password != trypassword"; return; } var users = QueryBD.bd.User.Where(u => u.Login == Login.Text && u.Email == Email.Text); if (users.Count() == 0) { Error.Content = "Error: неверные данные."; return; } QueryBD.user = users.First(); QueryBD.user.Password = QueryBD.GetMd5Hash(Password.Password); QueryBD.bd.SaveChanges(); QueryBD.Navigate(QueryBD.log); }
void Login_Click(object o, RoutedEventArgs e) { if (login.Text == "" || Password.Password == "") { return; } var pass = QueryBD.GetMd5Hash(Password.Password); if (QueryBD.bd.User.Where(u => u.Login == login.Text && u.Password == pass).Count() != 0) { if (QueryBD.mainctrl == null) { QueryBD.mainctrl = new MainCtrl(); } QueryBD.Navigate(QueryBD.mainctrl); } }
void Reg_Click(object sender, RoutedEventArgs e) { if (Login.Text == "" || Email.Text == "" || Password.Password == "" || TryPassword.Password == "" || Password.Password != TryPassword.Password) { Error.Content = "Error: Entry login, email, password, trypassword, password != trypassword"; return; } if (QueryBD.bd.User.Where(u => u.Login == Login.Text).Count() != 0) { Error.Content = "Error: такой логин существует."; return; } QueryBD.user = new User() { Login = Login.Text, Email = Email.Text, Password = QueryBD.GetMd5Hash(Password.Password) }; QueryBD.bd.User.Add(QueryBD.user); QueryBD.bd.SaveChanges(); QueryBD.Navigate(QueryBD.log); }
void Login_Click(object sender, RoutedEventArgs e) => QueryBD.Navigate(QueryBD.log);
void Add_Click(object sender, RoutedEventArgs e) => QueryBD.ModeУчастник(null);
void Back_Click(object o, RoutedEventArgs e) => QueryBD.Back();