private void btnLogin_Click(object sender, EventArgs e)
        {
            Accounts accouts = new Accounts();

            if (opAccount.opUser(mtxtLoginId.Text, mtxtLoginPassword.Text) == 0)
            {
                NoteForm f = new NoteForm();
                f.Show();
                this.Close();
            }
            else
            {
                int access = accouts.getAccounts(mtxtLoginId.Text, mtxtLoginPassword.Text);
                if (access == 1)
                {
                    NoteForm f = new NoteForm();
                    f.ShowDialog();
                    this.Close();
                }
                else if (access == 0)
                {
                    NoteForm f = new NoteForm();
                    f.Show();
                    this.Close();
                }
                else if (access == -1)
                {
                    MessageBox.Show("존재하지않는 계정입니다", "메세지",
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Exclamation);
                }
                else
                {
                    MessageBox.Show("올바르지 않은 비밀번호입니다", "메세지",
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Exclamation);
                }
            }
        }
        private NoteForm dnn;   //메인 폼을 가리키는 객체

        public FrmFind(NoteForm objMainForm)
        {
            dnn = objMainForm;
            InitializeComponent();
        }
Ejemplo n.º 3
0
 public FrmReplace(NoteForm objMainFrom) //매개변수 있는 생성자
 {
     dnn = objMainFrom;
     InitializeComponent();
 }