public Catalog(MainForm main) { InitializeComponent(); configAuth(); this.main = main; fillCatalog(); }
private void loginBTN_Click(object sender, EventArgs e) { if (usernameTB.Text != "" || passwordTB.Text != "") { if (DBConnection.Instance().IsConnect()) { string query = "SELECT * FROM users WHERE email = '" + usernameTB.Text + "' AND password = '******'"; MySqlCommand cmd = new MySqlCommand(query, DBConnection.Instance().GetConnection()); MySqlDataReader reader = cmd.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { DBConnection.Instance().auth = reader.GetString("auth"); } reader.Close(); MainForm form = new MainForm(); this.Hide(); form.Show(); } else { reader.Close(); MessageBox.Show("Kullanıcı adı veya şifre hatalı!"); } } } else MessageBox.Show("bütün alanları doldur."); }
public Members(MainForm main) { InitializeComponent(); configAuth(); this.main = main; fillMemberList(); }
public BorrowingActivity(MainForm main) { InitializeComponent(); this.main = main; configAuth(); fillBorrowingActivity(); }
public EditBook(MainForm main, string isbn) { InitializeComponent(); this.main = main; if (isbn != null) { fillTexts(BooksContainer.Instance().GetBook(isbn)); isbnTB.Enabled = false; } }
public AddBorrowingActivity(MainForm main) { InitializeComponent(); this.main = main; fillMemberList(); fillBooks(); dueDTP.Value = givenDTP.Value.AddDays(21); returnedTB.Text = "False"; returnTB.Text = null; }
public EditMember(MainForm main, string ssn) { InitializeComponent(); this.main = main; if(ssn != null) { fillTexts(MembersContainer.Instance().GetMember(ssn)); ssnTB.Enabled = false; } }
public AddUser(MainForm main) { InitializeComponent(); this.main = main; }