private void btnSave_Click(object sender, EventArgs e) { bool btnSave_Click = false; /* SqlConnection con = new SqlConnection(dl.cs); * SqlDataAdapter da = new SqlDataAdapter(" SELECT User_id FROM User_Info WHERE (User_Name = '" + txtUsername.Text + "') AND (User_Password = '******')", con); * DataTable dt = new DataTable(); * int i = da.Fill(dt);*/ if (ConSqlInstance() > 0) { this.Hide(); Createuser cu = new Createuser(); cu.Show(); if (btnSave_Click == true) { Welcome wc = new Welcome(); wc.Show(); } else { MessageBox.Show("Null values, trye again..."); } } else { MessageBox.Show("User Name or Password Not Match"); clear(); } }
private void newUserToolStripMenuItem_Click(object sender, EventArgs e) { Createuser cu = new Createuser(); AuthenticateUser au = new AuthenticateUser(); // cu.Show(); // cu.MdiParent = this; this.Hide(); au.Show(); //Add authentication here }