public virtual void OkButtonClick(object sender, EventArgs e) { BaseObject = new BaseObject { Name = NameTextBox.Text, DbLocation = databasesComboBox.SelectedItem.ToString() }; DialogResult = DialogResult.OK; }
public void AddBaseObject(BaseObject objectToAdd, string dataBaseName) { UniversityContext context; switch (dataBaseName) { case "MsSqlFirstDatabase": context = m_firstUniversityContext; break; case "MsSqlSecondDatabse": context = m_thirdUniversityContext; break; default: return; } context.BaseObjects.Add(objectToAdd); context.SaveChanges(); }
private void UpdateTreeView(BaseObject baseObject) { m_selectedNode.Nodes.Add(new TreeNode { Text = baseObject.Name, Tag = baseObject }); }
public void AddBaseObject(BaseObject baseObject) { m_client.AddBaseObject(baseObject, baseObject.DbLocation); }