public LoaiSach(int ma) { MaLoai = ma; if (ma == 0) { TenLoai = "None"; return; } DataTable dt = LoaiSachControl.layThongTin(ma); TenLoai = dt.Rows[0]["TenLoai"].ToString(); }
private void btnXacNhan_Click(object sender, EventArgs e) { string tenloai = txtTenLoai.Text; if (true) { int ketqua = LoaiSachControl.themDuLieu(tenloai); if (ketqua > 0) { MessageBox.Show("thêm thành công"); this.Close(); } } }