Esempio n. 1
0
        // 뒤로가기 모양 눌렀을때 로그인창으로 돌아가기
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            login loginform = new login();

            this.Hide();
            loginform.ShowDialog();
        }
        private void button2_Click(object sender, EventArgs e) //Enable customer options or open staff login window
        {
            if (listBox1.SelectedIndex == 0)
            {
                label2.Text             = "Customer";
                label6.BackColor        = System.Drawing.Color.Lime;
                label7.BackColor        = System.Drawing.Color.Transparent;
                label8.BackColor        = System.Drawing.Color.Transparent;
                CustomerOptions.Enabled = true; SalesRep.Enabled = false; Manager.Enabled = false;
            }
            else if (listBox1.SelectedIndex == 1)
            {
                this.Hide();
                login RepLog = new login();
                RepLog.getUser = "******";
                RepLog.ShowDialog();

                this.Close();
            }
            else if (listBox1.SelectedIndex == 2)
            {
                this.Hide();
                login RepLog = new login();
                RepLog.getUser = "******";
                RepLog.ShowDialog();

                this.Close();
            }
        }
Esempio n. 3
0
        private void logoffToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            login f2 = new login();

            f2.ShowDialog();
            this.Close();
        }
Esempio n. 4
0
        private void button6_Click(object sender, EventArgs e)
        {
            login Login = new login();

            this.Hide();
            Login.ShowDialog();
            this.Close();
        }
Esempio n. 5
0
        private void btn_cancle_Click(object sender, EventArgs e)
        {
            // 로그인폼 이동
            Hide();
            login loginfrom = new login();

            loginfrom.ShowDialog();
            Close();
        }
Esempio n. 6
0
        private void button6_Click(object sender, EventArgs e)
        {
            button1.BackColor = Color.DarkSlateGray;
            button2.BackColor = Color.DarkSlateGray;
            button3.BackColor = Color.DarkSlateGray;
            button5.BackColor = Color.DarkSlateGray;
            button7.BackColor = Color.DarkSlateGray;
            button8.BackColor = Color.DarkSlateGray;
            login Login = new login();

            Login.Hide();
            Login.ShowDialog();
            this.Close();
        }
Esempio n. 7
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            string id      = tb_id.Text.ToString();
            string pw      = tb_pw.Text.ToString();
            string pw2     = tb_pw2.Text.ToString();
            string name    = tb_name.Text.ToString();
            string age     = tb_age.Text.ToString();
            string address = comboBox1.Text.ToString();
            string sex     = tb_sex.Text.ToString();

            if (id == string.Empty || pw == string.Empty || pw2 == string.Empty)
            {
                MessageBox.Show("빈칸 없이 입력해주세요.");
                return;
            }

            //pw pw 2 확인
            if (pw != pw2)
            {
                MessageBox.Show("PW와 PW확인이 다름니다.");
                return;
            }
            // id 중복체크 확인
            if (idcheck == false)
            {
                MessageBox.Show("ID 중복체크를 해주세요.");
                return;
            }

            bool result = DBM.AddMember(id, pw, name, age, sex, address);

            if (result == false)
            {
                MessageBox.Show("가입에 실패하였습니다.\n 관리자게에 문의하세요.");
                return;
            }



            // 로그인폼 이동
            Hide();
            login loginfrom = new login();

            loginfrom.ShowDialog();
            Close();
        }
Esempio n. 8
0
        private void logoutButton_Click(object sender, EventArgs e)
        {
            if (loggedIn == true)
            {
                //open login form
                login check = new login();
                check.ShowDialog();

                if (check.loginflag == false)
                {
                    MessageBox.Show("Login Failed!");
                }
                else
                {
                    loggedIn = true;
                }
            }
        }