// Resources private void btnAddResource_Click(object sender, EventArgs e) { ResourceForm addResource = new ResourceForm(dbContext, (Position)GuiUtils.GetSelected <Position>(lstViewPositions, positionTagSet)); if (!addResource.IsDisposed) { addResource.ShowDialog(); } }
private void btnEditResource_Click(object sender, EventArgs e) { Resource resource = (Resource)GuiUtils.GetSelected <Resource>(lstViewResources, resourceTagSet); if (resource != null) { ResourceForm editResource = new ResourceForm(dbContext, resource); editResource.ShowDialog(); } else { MessageBox.Show("Nie wybrano zasobu!", "Błąd"); } }