예제 #1
0
        //반납 버튼 클릭시 발생하는 이벤트
        private void button_Return_Click(object sender, EventArgs e)
        {
            string userId   = label_userId.Text;
            string isbn     = label_isbn.Text;
            string bookName = label_bookName.Text;

            if (userId.Trim() == "" || isbn.Trim() == "" || bookName.Trim() == "")
            {
                MessageBox.Show("모든 정보 입력 필요.");
            }
            else
            {
                ShowMessage(button_Return.Text, QueryMain.Query_Return(userId, isbn, bookName));
                viewAllBooks();
            }
        }
예제 #2
0
        public FormMain()
        {
            InitializeComponent();
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;

            Text = "도서관 관리";

            viewAllUsers();
            viewAllBooks();

            //전체 도서 수
            label_allBookCnt.Text = QueryMain.Query_count("all");

            //사용자 수
            label_allUserCnt.Text = QueryMain.Query_count("user");

            //대출 중인 도서 수
            label_allBrwdCnt.Text = QueryMain.Query_count("brwd");

            //연체 중인 도서 수
            label_allOverdueCnt.Text = QueryMain.Query_count("ovrd");
        }