Ejemplo n.º 1
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            order ordr = new order(myName);

            ordr.Show();

            myLogin lgnref = new myLogin();
            string  name   = lgnref.Get_login_username();
            //Console.WriteLine(name);
        }
Ejemplo n.º 2
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     progressBar1.Value = progressBar1.Value + 1;
     if (progressBar1.Value >= 100)
     {
         myLogin lgn = new myLogin();
         this.Hide();
         lgn.Show();
         timer1.Enabled       = true;
         progressBar1.Visible = false;
         timer1.Enabled       = false;
     }
 }
Ejemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            const string message = "Confirm Logout";
            const string caption = "User Log Out";
            var          result  = MessageBox.Show(message, caption,
                                                   MessageBoxButtons.YesNo,
                                                   MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                myLogin usrlgn = new myLogin();
                usrlgn.Show();
                this.Close();
            }
        }
Ejemplo n.º 4
0
        public Options(string bannerName)
        {
            InitializeComponent();
            UserBanner.Text = bannerName;
            myName          = giveName(bannerName);


            //string SelectAdmin = "Admin";

            myLogin lgn = new myLogin();

            string OptionsUserName = lgn.Get_login_username();

            MySqlConnection connect = new MySqlConnection("server = localhost; database = mega; username = root; password=;");

            string query = "select* from LoginPage where username = '******' ";


            MySqlDataAdapter data = new MySqlDataAdapter(query, connect);

            DataTable DT = new DataTable();

            data.Fill(DT);


            if (DT.Rows[0][3].ToString().Trim() == "Admin")

            {
                ManagePicture.Show();
                ManageLabel.Show();
            }
            else
            {
                ManagePicture.Hide();
                ManageLabel.Hide();
            }
        }