private void button2_Click(object sender, EventArgs e) { int IDBaiQC = Int16.Parse(this.textID.Text); Views.CreateDoiTac CreateDoiTac = new Views.CreateDoiTac(this, IDBaiQC) { StartPosition = FormStartPosition.CenterParent }; CreateDoiTac.ShowDialog(); }
private void listDoiTac_SelectedIndexChanged(object sender, EventArgs e) { int index = this.listDoiTac.FocusedItem.Index; if (index == this.selectedDoiTacIndex) { this.selectedDoiTacIndex = -1; return; } this.selectedDoiTacIndex = index; Views.CreateDoiTac detailForm = new Views.CreateDoiTac(index, this.dataDoiTac[index], this) { StartPosition = FormStartPosition.CenterParent }; detailForm.ShowDialog(); }