示例#1
0
        private void BtnXoa_Click(object sender, EventArgs e)
        {
            int idre = Convert.ToInt32(this.dataResource.SelectedRows[0].Cells[0].Value.ToString());

            if (this.dataResource.SelectedRows.Count <= 0)
            {
                return;
            }
            Resource user = ResourceController.GetResource(idre);

            ResourceController.DeleteResource(user);
            BindingSource source = new BindingSource();

            source.DataSource            = ResourceController.getListResource();
            this.dataResource.DataSource = source;
        }