//previous button(EntryDeleteView page)
        private void button1_Click(object sender, EventArgs e)
        {
            EntryDeleteView obj = new EntryDeleteView();               //admin(Entry new bus, Delete bus schedule, view customer details, update details)

            obj.Show();
            this.Hide();
        }
Example #2
0
        //log in button
        private void button1_Click(object sender, EventArgs e)
        {
            conn.Open();
            string         query = "select admin_id,password from login where admin_id='" + textBox1.Text + "'and password='******'";
            SqlCommand     cmd   = new SqlCommand(query, conn);
            SqlDataAdapter da    = new SqlDataAdapter(cmd);
            DataTable      dt    = new DataTable();

            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                MessageBox.Show("Login Successfull");
                conn.Close();
                EntryDeleteView obj = new EntryDeleteView();               //admin(Entry new bus, Delete bus schedule, view customer details, seat manage page)

                obj.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("invalid username or password");
                conn.Close();
                ClearData();
            }
        }