Пример #1
0
 //회원가입 완료 버튼을 눌렀을 때
 private void buttonConfirmClicked(object sender, EventArgs e)
 {
     if (buttonDoubleCheck.Enabled == false)
     {
         string   id       = textBoxID.Text;
         string   password = textBoxPasswd.Text;
         string   name     = textBoxName.Text;
         string   email    = textBoxEmail.Text;
         DateTime birth    = dateTimePickerBirth.Value.Date;
         if (id != "" && password != "" && name != "" && email != "")
         {
             if (mode.Equals("고객"))
             {
                 oracleCommand1.CommandText                  = "insert into consumer values(:id,:password,:name,:email,:birth,'F',0)";
                 oracleCommand1.Parameters["id"].Value       = id;
                 oracleCommand1.Parameters["password"].Value = password;
                 oracleCommand1.Parameters["name"].Value     = name;
                 oracleCommand1.Parameters["email"].Value    = email;
                 oracleCommand1.Parameters["birth"].Value    = birth;
             }
             oracleCommand1.ExecuteNonQuery();
             MessageBox.Show("회원가입 성공!");
             this.Visible = false;
             mainform.Activate();
         }
         else
         {
             MessageBox.Show("모든 값을 제대로 넣어 주십시오");
         }
     }
     else
     {
         MessageBox.Show("중복 확인을 해주세요");
     }
 }
        //확인버튼을 눌렀을 때
        private void buttonConfirmClicked(object sender, EventArgs e)
        {
            string   name  = textBoxFindIdName.Text;
            DateTime date  = dateTimePickerBirth.Value.Date;
            string   birth = date.Year + "-" + date.Month + "-" + date.Day;

            if (name != "")
            {
                oracleCommand1.CommandText = "select consu_id from consumer where consu_name='" + name + "' AND consu_birth=TO_DATE('" + birth + "', 'YYYY-MM-DD')";
                OracleDataReader rdr = oracleCommand1.ExecuteReader();
                int flag             = 0;
                while (rdr.Read())
                {
                    MessageBox.Show("아이디는 " + rdr["consu_id"] + "입니다");
                    flag++;
                    this.Visible = false;
                    mainform.Activate();
                }
                if (flag == 0)
                {
                    MessageBox.Show("해당하는 정보의 사용자가 없습니다.");
                }
            }
            else
            {
                MessageBox.Show("이름을 입력해 주세요");
            }
        }
Пример #3
0
        private void labelLogoutMouseUp(object sender, MouseEventArgs e)
        {
            MessageBox.Show("로그아웃 되었습니다");
            this.Visible = false;
            FormMain frm = new FormMain();

            frm.Owner = this;
            frm.Show();
            frm.Activate();
        }
Пример #4
0
        private void MessageAlert(int a)
        {
            if (a == 1)
            {
                MessageBox.Show("비밀번호가 변경되었습니다");

                mainform.Activate();
            }
            else
            {
                MessageBox.Show("비밀번호 변경이 실패되었습니다");
            }
        }
Пример #5
0
        private void buttonConfirmClicked(object sender, EventArgs e)
        {
            if (buttonDoubleCheck.Enabled == false)
            {
                string id       = textBoxID.Text;
                string password = textBoxPasswd.Text;
                string name     = textBoxName.Text;
                string email    = textBoxEmail.Text;
                if (id != "" && password != "" && name != "" && email != "")
                {
                    switch (mode)
                    {
                    case "직원":
                        oracleCommand1.CommandText = "insert into employee values(:id,:password,:name,:email)";
                        break;

                    case "관리자":
                        oracleCommand1.CommandText = "insert into administer values(:id,:password,:name,:email)";
                        break;
                    }
                    oracleCommand1.Parameters["id"].Value       = id;
                    oracleCommand1.Parameters["password"].Value = password;
                    oracleCommand1.Parameters["name"].Value     = name;
                    oracleCommand1.Parameters["email"].Value    = email;
                    oracleCommand1.ExecuteNonQuery();
                    MessageBox.Show("회원가입 성공!");
                    this.Visible = false;
                    mainform.Activate();
                }
                else
                {
                    MessageBox.Show("모든 값을 제대로 넣어 주십시오");
                }
            }
            else
            {
                MessageBox.Show("중복 확인을 해주세요");
            }
        }
Пример #6
0
        private void buttonConfirmClick(object sender, EventArgs e)
        {
            string name  = textBoxFindIdName.Text;
            string email = textBoxEmail.Text;

            if (name != "" && email != "")
            {
                switch (mode)
                {
                case "직원":
                    oracleCommand1.CommandText = "select employ_id from employee where employ_name='" + name + "' AND employ_email='" + email + "'";
                    break;

                case "관리자":
                    oracleCommand1.CommandText = "select admin_id from administer where admin_name='" + name + "' AND admin_email='" + email + "'";
                    break;
                }
                OracleDataReader rdr = oracleCommand1.ExecuteReader();
                int flag             = 0;
                while (rdr.Read())
                {
                    MessageBox.Show("아이디는 " + rdr[0] + "입니다");
                    flag++;
                    this.Visible = false;
                    mainform.Activate();
                }
                if (flag == 0)
                {
                    MessageBox.Show("해당하는 정보의 사용자가 없습니다.");
                }
            }
            else
            {
                MessageBox.Show("모든 값을 입력해 주세요");
            }
        }