Exemple #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (this.dgvProgress.SelectedRows.Count <= 0)
            {
                return;
            }
            string stt = this.dgvProgress.SelectedRows[0].Cells[0].Value.ToString().Trim();

            if (ProgressController.DeleteProgress(stt) == false)
            {
                MessageBox.Show("Cannot delete progress!!!");
            }
            else
            {
                MessageBox.Show("Delete success!!!", "Note", MessageBoxButtons.OK);
                BindingSource source = new BindingSource();
                source.DataSource           = StudentController.listProgressOfStudent(_p_id, _s_id);
                this.dgvProgress.DataSource = source;
            }
        }