示例#1
0
 private void Clear()
 {
     selectedTest         = null;
     tbName.Text          = "";
     tbPassMark.Text      = "";
     buttonUpdate.Enabled = false;
     buttonDelete.Enabled = false;
 }
示例#2
0
        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            int idTest = Int32.Parse(dataGridView1["id", e.RowIndex].Value.ToString());

            selectedTest = tests.Find(item => item.id.Equals(idTest));

            tbName.Text     = selectedTest.Name.Trim();
            tbPassMark.Text = selectedTest.PassMark.ToString();

            buttonUpdate.Enabled = true;
            buttonDelete.Enabled = true;
        }