private void tvButtonModel_Click(object sender, EventArgs e) { MessageBox.Show("Object ID: " + boundTreeView1.SelectedNode.Tag); if (string.IsNullOrEmpty(textboxModel.Text)) { return; } var docTypeEdit = _docTypes.FindDocTypeEditByDocTypeID((int)boundTreeView1.SelectedNode.Tag); docTypeEdit.DocTypeName = textboxModel.Text; docTypeName.Text = docTypeEdit.DocTypeName; }
private void dgvButtonModel_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow == null || string.IsNullOrEmpty(dgvTextboxModel.Text)) { return; } var docTypeEdit = _docTypes.FindDocTypeEditByDocTypeID((int)dataGridView1.CurrentRow.Cells[0].Value); docTypeEdit.DocTypeName = dgvTextboxModel.Text; RedrawForm(); docTypeName.Text = docTypeEdit.DocTypeName; }
private void boundTreeView1_AfterLabelEdit(object sender, NodeLabelEditEventArgs e) { var docTypeEdit = _docTypes.FindDocTypeEditByDocTypeID((int)e.Node.Tag); docTypeName.Text = docTypeEdit.DocTypeName; }