Exemplo n.º 1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            ((Form)this.TopLevelControl).Hide();
            userParent main = new userParent(this, this.idProduk);

            main.Show();
        }
Exemplo n.º 2
0
        private void bt1_Click_1(object sender, EventArgs e)
        {
            int             count  = 0;
            String          sql    = "select * from PELANGGAN where USERNAME_PELANGGAN='" + Username.Text + "' and PASSWORD_PELANGGAN='" + Password.Text + "';";
            MySqlCommand    cmd    = new MySqlCommand(sql, conn);
            MySqlDataReader reader = cmd.ExecuteReader();

            this.user = Username.Text;
            while (reader.Read())
            {
                count              += 1;
                this.idPelanggan    = reader["ID_PELANGGAN"].ToString();
                this.idPelangganInt = Convert.ToInt32(this.idPelanggan);
            }
            //reader.Close();
            if (count == 1)
            {
                //menuju
                userParent main = new userParent(this, this.idPelanggan);
                //this.Hide();
                main.Show();

                ((Form)this.TopLevelControl).Hide();
            }
            else if (Username.Text == "Username" || Password.Text == "Password" || Username.Text == "")
            {
                MessageBox.Show("Fill Username and Password");
            }
            else
            {
                MessageBox.Show("Incorrect Username or Password");
            }
            reader.Close();
        }
Exemplo n.º 3
0
        private void label3_Click(object sender, EventArgs e)
        {
            ((Form)this.TopLevelControl).Hide();
            userParent main = new userParent(this);

            //this.Hide();
            main.Show();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            flowLayoutPanel1.Controls.Clear();
            panel1.Controls.Clear();

            ((Form)this.TopLevelControl).Hide();
            userParent f2 = new userParent(this, this.idPelanggan, this.idProduk, this.idProduk);

            f2.Show();
        }
Exemplo n.º 5
0
        private void flow_Click(object sender, EventArgs e)
        {
            FlowLayoutPanel pn2 = new FlowLayoutPanel();

            pn2.Width     = 569;
            pn2.Height    = 532;
            pn2.BackColor = Color.LightGray;

            Button button = (Button)sender;

            send = button.Name.ToString();
            Int32.TryParse(send, out id);

            this.idProduk = Convert.ToInt32(send);

            ((Form)this.TopLevelControl).Hide();
            userParent f2 = new userParent(this, this.idPelanggan, this.send);

            f2.Show();
        }