Exemplo n.º 1
0
        private void tsbEdit_Click(object sender, EventArgs e)
        {
            if (labBookTypeID.Text == "")
            {
                this.showErrorMessage("เลือกข้อมูลที่จะแก้ไขก่อน");
                return;
            }
            BookType booktype = new BookType();

            booktype.BookTypeID   = int.Parse(labBookTypeID.Text);
            booktype.BookTypeName = txtBookTypeName.Text;
            booktype.update();
            this.showDgvBookType();
            this.clear();
        }