Exemplo n.º 1
0
        // 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();
            }
        }
Exemplo n.º 2
0
        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");
            }
        }