private void btnLogin_Click(object sender, EventArgs e) { dat.SetName(txtUserName.Text); dat.SetPassword(txtPassword.Text); //CHANGE TO EMAIL FOR LOGIN ID!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! var ids = from names in customers let patron = names.Split(',') let ID = patron[0] let age = patron[1] let email = patron[2] let passwords = patron[3] select new { ID, age, email, passwords }; foreach (var names in ids) { if (dat.GetName() == names.ID) { if (dat.GetPassword() == names.passwords) { //dat.PlayHello(); dat.SetEmail(names.email); tickets tix = new tickets(); tix.dat = dat; SoldOutChecker(); if (true == dat.GetSoldOut1()) { tix.lblLowerLevel.Text = "Lower Level all Sold Out"; tix.lblLowerLevel.ForeColor = Color.Red; tix.cbLowerLevel.Visible = false; } if (true == dat.GetSoldOut2()) { tix.lblClubLevel.Text = "Club Level all Sold Out"; tix.lblClubLevel.ForeColor = Color.Red; tix.cbClubLevel.Visible = false; } if (true == dat.GetSoldOut3()) { tix.lblUpperDeck.Text = "Upper Deck all Sold Out"; tix.lblUpperDeck.ForeColor = Color.Red; tix.cbUpperDeck.Visible = false; } tix.ShowDialog(); this.Close(); } else { MessageBox.Show("Incorrect password"); } } else { MessageBox.Show("Incorrect login ID"); } } }
private void BtnSubmit_Click(object sender, EventArgs e) { bool isValidNumber = true; try { dat.SetCardNumber(long.Parse(txtCardNumber.Text)); } catch { //dat.PlaySassyNo(); MessageBox.Show("Invalid age format, please enter numbers only." + "\r\n" + "Try again please!"); isValidNumber = false; } if (isValidNumber == false) { txtCardNumber.Text = ""; } bool isValidCSV = true; try { dat.SetCSV(int.Parse(txtCSV.Text)); } catch { //dat.PlaySassyNo(); MessageBox.Show("Invalid card code format, please enter numbers only." + "\r\n" + "Try again please!"); isValidCSV = false; } if (isValidCSV == false) { txtCSV.Text = ""; } dat.SetCardName(txtCardName.Text); if (isValidNumber == true && isValidCSV == true) { dat.CheckCardData(); } else { tickets tix = new tickets(); tix.OpenConfirm(); } }
public void PageClear() { tickets tix = new tickets(); tix.ClearPage(); }