Recent Posts

Pages: [1] 2 3 ... 10
1
Sedna (Pivotal 6) / Re: Change .NET version
« Last post by Misiu on October 09, 2018, 03:32:14 AM »
@CarlC did something change in Pivotal 6.6?
I'd like to know more about supported CLR version. Is it still .NET4?
2
Sedna (Pivotal 6) / Re: ProductivityPack TabTools - samples
« Last post by Misiu on August 17, 2018, 01:44:27 AM »
Hi MarcK4096,

thank You for reply.
I know that the only way to hide tab in winforms tab control is to remove that tab and add it again when I want to show it.
I've used PP as You showed.

In `OnFormInitialized` I'm creating reference to my tab page like this:

Code: [Select]
private TabPageLibrary _tpl;

public override void OnFormInitialized()
{
    base.OnFormInitialized();     
           
    if(_tpl == null)
        _tpl = new TabPageLibrary("MyTabPage", FormControl);

    ShowCorrectTabs();
}

private void ShowCorrectTabs()
{
    try
    {
        int productType = Convert.ToInt32(PrimaryDataRow[Common.Data.Client.Field.ProductType]);

        if (productType  == 0 && _tpl != null)
        {
            _tpl.Hide();
        }
        else if (productType == 1 && _tpl != null)
        {
            _tpl.Show();
        }
    }
    catch (Exception e)
    {
        Logger.LogException(e);
    }
}

I've got additional checks for _tpl != null to avoid any potential errors.

Hope this helps anyone :)

P.S.
Does anyone have any materials related to PP? Especially samples source code.
3
Sedna (Pivotal 6) / Re: ProductivityPack TabTools - samples
« Last post by MarcK4096 on August 13, 2018, 10:11:56 AM »
The winforms tab control doesn't actually allow hiding of tabs.  The standard way to do this is to remove the tab from the control when you want to hide it and then add it back when you want to show it.

If you wanted to use the PP for this, you could try the following in your client task code:

var tabPage = new crmc.Foundation.TabPageLibrary("nameOfTab", (CdcSoftware.Pivotal.Engine.UI.Forms.PivotalClientFormControl)this.FormView.FormControl);
tabPage.Hide();

One challenge with the Pivotal SmartClient is that it likes to reuse forms as much as possible for performance reasons.  So, if you hide a tab, your code needs to be aware that the next time the form is initialized, the tab might already be gone.  I think one issue with this involves GetControlByName().  With the tab removed, I don't think the children can be found anymore.

4
Sedna (Pivotal 6) / ProductivityPack TabTools - samples
« Last post by Misiu on August 03, 2018, 03:37:33 AM »
In my environment, I'm using Pivotal Client 6.5.2 and Productivity Pack 4.2.
I'm trying to show/hide PivotalTabPage based on some conditions.

I've found this movie https://www.dailymotion.com/video/x1437wh showing Tab Tolls from ProductivityPack.
At 09:10 You can see that there is code that checks user group and conditionally calls Hide() on specific tab.

I've searched all over installers for code showing usage of that method, but I got nothing.

Do anyone have sample code showing usage of Productivity Pack from C#?
CRMCulture isn't existing anymore, so this forum is my only hope.

Any materials and samples are welcome :)
5
Sedna (Pivotal 6) / Re: Set Pivotal Theme or other options via IafConfig
« Last post by Misiu on July 08, 2018, 11:52:12 PM »
@crmpimp thanks for the update :)
I'm in the middle of testing version 6.6. Finally limited theming is available.
Unfortunately, a lot of my custom code is throwing errors. 90% works great but I must get that last 10% working.
6
Sedna (Pivotal 6) / Re: Set Pivotal Theme or other options via IafConfig
« Last post by crmpimp on July 05, 2018, 08:02:44 AM »
Just to confirm with everyone - theme-ing is basically available with Pivotal 6.6.

Yes - you can finally more away from the tired old 'sky blue' theme! Yay! Note that there are still some limitations (and a lot of them), but change is in the wind!
7
@MartinR I've did like You suggested.

The downside is that I must define two methods in Server Task. For example:
Code: [Select]
[TaskExecute]
public ServerTaskResult GenerateDocuments(string package)
{
    return GenerateDocuments(wywiadownia, null);
}

[TaskExecute]
public ServerTaskResult GenerateDocuments(string package, string guid)
{
    //here real implementation
}

Inside Server Task I'm calling this method:
Code: [Select]
ClientNotifier.Publish(guid, $"Generowanie {current}/{total}...");

ClientNotifier is my custom class that push messages via sockets to all subscribed clients.

From client side I'm calling my Server Task using my extension method:

Code: [Select]
SystemClient.ExecuteServerTaskAsync("Generator", "GenerateDocuments", new object[] { "Package 1" }, "Trwa generowanie paczki...", () =>
{
    var searchView = ClientContext.ClientAPIService.GetActiveContentObject() as ISearchView;
    searchView.Refresh();
}, true);

This is how this looks on client (of course spinner is spinning :)):


This method allows me to show some kind of progress, because by default client "freezes" when You call Server Task and wait for result.
8
That's an option, but this way I must modify all Server Tasks (unfortunately Pivotal cant handle default parameter values  :-\)

For now I'm updating my two test Server Tasks with that additional parameters, hopefully it will work fine.
Ideally I'd like to get that name in Server Task code.
9
Why not just pass it as one of the parameters?
10
When creating Server Task in Toolbox we must give is a name, then we can use that name to call that Server Task from Client code:
Code: [Select]
SystemClient.ExecuteServerTask(taskName, methodName, types, parameters)
I'm wondering if there is an option to get than Server Task name inside Server Task method (when it is executed).
For example:
1. I've created new Server Task in Toolkit. It is names "Sample" and has full class name: "AA.Server.Prototype.VersionOne".
2. I'm able to call method "Test" from my new Server taks using this code:
Code: [Select]
SystemClient.ExecuteServerTask("Sample", "Test", types, parameters)
Now I need to get string "Sample" (because that's the name of my Server Task) when executing method "Test"

I can get qualified class name and method name, but I need Server Task name.
I hope this is clear enough.

I need this to create notification system that will notify end user about server task progress, after finishing I can share some details about it.
Pages: [1] 2 3 ... 10