private void frmBTL_SV_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'dataset1.tblSV' table. You can move, or remove it, as needed. this.tblSVTableAdapter.Fill(this.dataset1.tblSV); // TODO: This line of code loads data into the 'dataset1.tblGV' table. You can move, or remove it, as needed. this.tblGVTableAdapter.Fill(this.dataset1.tblGV); // TODO: This line of code loads data into the 'dataset1.tblBTL' table. You can move, or remove it, as needed. this.tblBTLTableAdapter.Fill(this.dataset1.tblBTL); // TODO: This line of code loads data into the 'dataset1.tblBTL_SV' table. You can move, or remove it, as needed. this.tblBTL_SVTableAdapter.Fill(this.dataset1.tblBTL_SV); binding(); txtd.ReadOnly = true; bntSavesua.Enabled = false; //Kiểm tra quyền tìm if (dn.CheckTim(quyen, true) == 1) { txtT.ReadOnly = false; } else { txtT.ReadOnly = true; } //Kiểm tra quyền xóa if (dn.CheckXoa(quyen, true) == 1) { bntXoa.Enabled = true; } else { bntXoa.Enabled = false; } //Kiểm tra quyền thêm if (dn.CheckThem(quyen, true) == 1) { bntThem.Enabled = true; txtd.ReadOnly = false; } else { bntThem.Enabled = false; } //Kiểm tra quyền sửa if (dn.CheckSua(quyen, true) == 1) { bntSua.Enabled = true; } else { bntSua.Enabled = false; } }
private void frmCD_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'dataset1.tblHoiDong' table. You can move, or remove it, as needed. this.tblHoiDongTableAdapter.Fill(this.dataset1.tblHoiDong); // TODO: This line of code loads data into the 'dataset1.tblCD' table. You can move, or remove it, as needed. this.tblCDTableAdapter.Fill(this.dataset1.tblCD); binding(); txtten.ReadOnly = true; txtma.ReadOnly = true; txtnam.ReadOnly = true; bntSavesua.Enabled = false; //Kiêm rtra quyền tìm if (dn.CheckTim(quyen, true) == 1) { txtT.ReadOnly = false; } else { txtT.ReadOnly = true; } //Kiểm tra quyền xóa if (dn.CheckXoa(quyen, true) == 1) { bntXoa.Enabled = true; } else { bntXoa.Enabled = false; } //Kiểm tra quyền thêm if (dn.CheckThem(quyen, true) == 1) { bntThem.Enabled = true; txtnam.ReadOnly = false; txtten.ReadOnly = false; txtma.ReadOnly = false; } else { bntThem.Enabled = false; } //Kiêm tra quyền sửa if (dn.CheckSua(quyen, true) == 1) { bntSua.Enabled = true; } else { bntSua.Enabled = false; } }
private void frmBTL_Load(object sender, EventArgs e) { this.tblHPTableAdapter1.Fill(this.dataset11.tblHP); this.tblBTLTableAdapter1.Fill(this.dataset11.tblBTL); binding(); txtTenBTL.ReadOnly = true; txtMaBTL.ReadOnly = true; txtNam.ReadOnly = true; bntSavesua.Enabled = false; //Kiểm tra quyền tìm if (dn.CheckTim(quyen, true) == 1) { txtTimKiem.ReadOnly = false; } else { txtTimKiem.ReadOnly = true; } //Kiểm tra quyền xóa if (dn.CheckXoa(quyen, true) == 1) { bntXoa.Enabled = true; } else { bntXoa.Enabled = false; } //Kiểm tra quyền thêm if (dn.CheckThem(quyen, true) == 1) { bntThem.Enabled = true; txtNam.ReadOnly = false; txtTenBTL.ReadOnly = false; txtMaBTL.ReadOnly = false; } else { bntThem.Enabled = false; } //Kiểm tra quyền sửa if (dn.CheckSua(quyen, true) == 1) { bntSua.Enabled = true; } else { bntSua.Enabled = false; } }