Пример #1
0
        // 로그인 성공하면 다음 메뉴 탭으로 넘어가기
        private void login_button_Click(object sender, EventArgs e)
        {
            // id, pw 입력
            string id = id_tb.Text.ToString();
            string pw = pw_tb.Text.ToString();

            if (id == string.Empty || pw == string.Empty)
            {
                MessageBox.Show("ID와 PW를 입력해주세요");
                return;
            }

            // 아이디 패스워드 조회
            int result = DBM.Login(id, pw);

            // 0:에러 1:성공 2:PW X 3:ID X
            switch (result)
            {
            case 0: MessageBox.Show("접속에러 관리자에게 문의하세요"); return;

            case 1: break;

            case 2: MessageBox.Show("PW가 틀립니다."); return;

            case 3: MessageBox.Show("ID가 틀립니다."); return;
            }



            menuform mf = new menuform();

            mf.Show();
            this.Hide();
        }
Пример #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new login());

            menuform     mf = new menuform();
            scheduleform sf = new scheduleform();


            //menuform mf = new menuform();
            //Application.Run(mf);

            // Application.Run(new login());

            // Application.Run(new scheduleform());
        }