예제 #1
0
        private void tsbSave_Click(object sender, EventArgs e)
        {
            if (txtBookTypeName.Text == "")
            {
                this.showErrorMessage("ป้อนประเภทหนังสือก่อน");
                return;
            }
            if (labBookTypeID.Text != "")
            {
                this.showErrorMessage("คุณกำลังแก้ไขหรือลบข้อมูล");
                return;
            }
            BookType booktype = new BookType();

            booktype.BookTypeName = txtBookTypeName.Text;
            booktype.create();
            this.showDgvBookType();
            this.clear();
        }