Ejemplo n.º 1
0
        public ArrayList GetDelete(string id, string name, string passwd)
        {
            MySql  my  = new MySql();
            string sql = string.Format("delete from test where id = '{0}'", id);

            if (my.NonQuery(sql))
            {
                return(GetSelect());
            }
            else
            {
                return(new ArrayList());
            }
        }
Ejemplo n.º 2
0
        public bool NonQuery_INSERT(string val)
        {
            MySql  my  = new MySql();
            string sql = val;

            if (my.NonQuery(sql))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 3
0
        public ArrayList GetUpdate(string id, string name, string passwd)
        {
            MySql  my  = new MySql();
            string sql = string.Format("update test set name = '{1}', passwd = '{2}' where id = '{0}';", id, name, passwd);

            if (my.NonQuery(sql))
            {
                return(GetSelect());
            }
            else
            {
                return(new ArrayList());
            }
        }
Ejemplo n.º 4
0
        public ArrayList GetInsert(string id, string name, string passwd)
        {
            MySql  my  = new MySql();
            string sql = string.Format("insert into test values ('{0}','{1}','{2}');", id, name, passwd);

            if (my.NonQuery(sql))
            {
                return(GetSelect());
            }
            else
            {
                return(new ArrayList());
            }
        }
Ejemplo n.º 5
0
        public void GetUPDATE_Pass(string passwod, string user_number)
        {
            MySql  my  = new MySql();
            string sql = string.Format("UPDATE signup set passwod = '{0}' where user_number = {1};", passwod, user_number);

            if (my.NonQuery(sql))
            {
                MessageBox.Show("수정 완료");
            }
            else
            {
                MessageBox.Show("수정 실패");
            }
        }
Ejemplo n.º 6
0
        public void GetUPDATE(string email, string Phon, string addres, string user_number)
        {
            MySql  my  = new MySql();
            string sql = string.Format("UPDATE signup set email = '{0}',phone_number = '{1}',address = '{2}' where user_number = {3};", email, Phon, addres, user_number);

            if (my.NonQuery(sql))
            {
                MessageBox.Show("수정 완료");
            }
            else
            {
                MessageBox.Show("수정 실패");
            }
        }
Ejemplo n.º 7
0
        public void GetInsert()
        {
            MySql  my  = new MySql();
            string sql = string.Format("INSERT INTO book_rental(book_number, user_number) VALUES({0}, {1}); update book_info set availability = '불가' where book_number = {0};", 번호값.Text, login_frm.User_Number.ToString());


            if (my.NonQuery(sql))
            {
                MessageBox.Show("대여 완료!");
            }

            else
            {
                MessageBox.Show("대여 실패!");
            }
        }
Ejemplo n.º 8
0
        public void GetInsert(string ID, string Pass, string Name, string Gender, string Birth, string email, string Phon, string addres)
        {
            MySql  my  = new MySql();
            string sql = string.Format("INSERT INTO signup(id,passwod,name,gender,birthday,email,phone_number,address) values ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}');", ID, Pass, Name, Gender, Birth, email, Phon, addres);

            if (my.NonQuery(sql))
            {
                MessageBox.Show("회원가입 완료!");

                this.Hide();
                main.Login.Show();
            }

            else
            {
                MessageBox.Show("가입실패");


                this.Hide();
                main.user1.Show();
            }
        }