コード例 #1
0
        private void btn_Click(Object o, EventArgs e)
        {
            //MessageBox.Show("동작확인 : btn_Click");

            Button button = (Button)o;

            if (button.Name == "검색버튼")
            {
                회원정보검색_리스트뷰.Items.Clear();

                if (회원정보검색상자.Text == "")
                {
                    MessageBox.Show("검색란에 입력을 확인해주세요.");
                    return;
                }

                ArrayList userinfoSearch_arry = user_info_form_user_info_search(search_category, 회원정보검색상자.Text);

                foreach (Hashtable ht in userinfoSearch_arry)
                {
                    ListViewItem item = new ListViewItem("");
                    item.SubItems.Add(ht["user_number"].ToString());
                    item.SubItems.Add(ht["name"].ToString());
                    item.SubItems.Add(ht["birthday"].ToString().Substring(0, 10));
                    item.SubItems.Add(ht["id"].ToString());
                    item.Font = new Font("Arial", 14, FontStyle.Italic);
                    회원정보검색_리스트뷰.Items.Add(item);
                }

                Controls.Add(회원정보검색_리스트뷰);
            }
            else if (button.Name == "버튼등급수정")
            {
                if (회원번호값.Text == "회원번호값")
                {
                    fail fail = new fail("회원정보를 선택해주세요");
                    fail.ShowDialog();
                    return;
                }
                USER_LEVEL_UPDATE_FORM user_level_update_form = new USER_LEVEL_UPDATE_FORM(회원번호값.Text);
                user_level_update_form.StartPosition = FormStartPosition.CenterParent;
                user_level_update_form.ShowDialog();
            }
            else if (button.Name == "도서반납버튼")
            {
                if (rental_book_number == 0)
                {
                    fail fail = new fail("회원, 반납 할 도서를 선택해주세요.");
                    fail.ShowDialog();
                    return;
                }
                Book_Return_GetUpdate(rental_book_number.ToString());
            }
        }
コード例 #2
0
ファイル: USER_INFO_FORM.cs プロジェクト: yungjin/HLC_Book1
        private void btn_Click(Object o, EventArgs e)
        {
            //MessageBox.Show("동작확인 : btn_Click");

            Button button = (Button)o;

            if (button.Name == "검색버튼")
            {
                회원정보검색_리스트뷰.Items.Clear();

                MySql mysql = new MySql();
                //ArrayList bookinfoSearch_arry = mysql.Select(string.Format("select * from book_info where {0} LIKE '%{1}%'", search_category, 책정보검색상자.Text));
                ArrayList userinfoSearch_arry = mysql.Select(string.Format("select * from signup where {0} LIKE '%{1}%'", search_category, 회원정보검색상자.Text));

                foreach (Hashtable ht in userinfoSearch_arry)
                {
                    ListViewItem item = new ListViewItem("");
                    item.SubItems.Add(ht["user_number"].ToString());
                    item.SubItems.Add(ht["name"].ToString());
                    item.SubItems.Add(ht["birthday"].ToString().Substring(0, 10));
                    item.SubItems.Add(ht["id"].ToString());
                    item.Font = new Font("Arial", 14, FontStyle.Italic);
                    회원정보검색_리스트뷰.Items.Add(item);
                }

                Controls.Add(회원정보검색_리스트뷰);
            }
            else if (button.Name == "버튼등급수정")
            {
                if (회원번호값.Text == "회원번호값")
                {
                    MessageBox.Show("변경 할 회원정보를 오른쪽 리스트에서 선택해주세요");
                    return;
                }
                USER_LEVEL_UPDATE_FORM user_level_update_form = new USER_LEVEL_UPDATE_FORM(회원번호값.Text);
                user_level_update_form.StartPosition = FormStartPosition.CenterParent;
                user_level_update_form.ShowDialog();
            }
        }