Beispiel #1
0
        private void showDgvBookType()
        {
            DataTable dt = new DataTable();
            // สร้างอ็อบเจกต์ของคลาส BookType
            BookType booktype = new BookType();

            dt = booktype.read();
            dgvBookType.DataSource = dt;
        }
Beispiel #2
0
        private void showCboBookType()
        {
            BookType  booktype = new BookType();
            DataTable dt       = new DataTable();

            dt = booktype.read();
            cboBookTypeID.DataSource    = dt;
            cboBookTypeID.DisplayMember = "BookTypeName";
            cboBookTypeID.ValueMember   = "BookTypeID";
            cboBookTypeID.Text          = "";
        }