proxy socks via tunnel SSH avec Synology, Putty et C# .NET

Suite à l’excellent tuto (qui date un peu mais excellent quand même ! ) : http://www.geeknewz.fr/tuto-proxy-socks-via-ssh-sur-synology-15567

Voici la même chose, mais automatisée en C#: n’oubliez pas de remplacer YOUR_SYNOLOGY_DNS_OR_IP_HERE  par l’adresse ou le dns name de votre synology

et aussi le mot de passe admin de votre syno à la place de YOUR_SYNOLOGY_PASSWORD_HERE

on peut légèrement modifier le code pour ne pas mettre en dur le mot de passe et l’entrer à chaque nouvelle connexion (Console.ReadLine()… et supprimer:

Master Data Services Excel Add-in Query updater

Hi

This small tool allows you to Load, Edit, and save MDS queries with operators that are not available in current mds add-in
232951
you can download the source code (.Net C# 4.0 Client Profile, VS2010) of my tool here (FREE) HERE
OR
binary only: HERE

very easy to use:

Load your already generated query

then choose a new Operator and edit the criteria

and then save the updated query

you can use all these operators:
[Description(“”)] NotSpecified,
[Description(“=”)] IsEqual,
[Description(“<>“)] IsNotEqual,
[Description(“LIKE”)] Like,
[Description(“NOT LIKE”)] NotLike,
[Description(“>”)] GreaterThan,
[Description(“< ")] LessThan, [Description(">=”)] GreaterThanOrEqual,
[Description(“< =")] LessThanOrEqual, [Description("MATCH")] Matches, [Description("NOT MATCH")] NotMatches, [Description("REGEX")] ContainsPattern, [Description("NOT REGEX")] NotContainsPattern, [Description("IS NULL")] IsNull, [Description("IS NOT NULL")] IsNotNull, [Description("IN")] In, [Description("NOT IN")] NotIn, [Description("DIRECT DECENDANTS")] DirectDecendants, [Description("ALL DECENDANTS")] AllDecendants, More info on sql mds 2012 MSDN blog

Master Data Services : Display entity members with good sort order when code is numeric

a MDS user recently asked me this question:

When looking at entity contents via web UI in the column code, 10 and each code that starts with 1 (10,11..19) always goes before 2 and so on. Is there any way to fix it? I don’t believe that’s the right order.

example:

 

so I’ve started to investigate..

first (easy solution)

the easiest way is to add at least one zero before code “1” and code  “2” and so on

but if your code size is huge, you will have to add a lot of “0” behind your code

so I’ve tried to find a custom hack in MDS stored procedure: and finally I’ve found it 🙂

second (hard way) solution:

after a few search on google, I’ve found this post :

http://stackoverflow.com/questions/119730/how-do-i-sort-a-varchar-column-in-sql-server-that-contains-numbers

but I had to find where to place this code hack

after a few search on mds (by sorting entity members in Web UI and looking at SQL profiler)

i’ve found that a call was made to this stored procedure:

 

after looking into udpEntityMembersGet, I’ve found that another stored procedure was called : mdm.udpMembersGet, a huge one!

so I’ve tried to update this SP code and finally it works!

be carefull, this hack could slow down the entitymembers get request, and it is only for testing purpose, and if you update MDS with cumulative update, it could be erased!

you just have to replace every instance of (there should be 3 of them) :

 

by:

 

 result:

 

 right click here and ‘save as’ to download the customized stored procedure

 

Complete programmatic WCF service client wrapper in C#

Hi,the goal of this class was to avoid to use a app config file for the WCF object model so as to not have to restart my application (MDSManager) when updating endpoint url it is now done and you can update the endpoint on the fly!

 note: this post is based on Steve Wilkes’ article (see here)

 download the latest version of this class file (right click and ‘save as’ )

usage:

private void DisposeExistingServiceClientIfRequired() { if (this._serviceClient != null) { try { if (this._serviceClient.State == CommunicationState.Faulted) { this._serviceClient.Abort(); } else { this._serviceClient.Close(); } } catch { this._serviceClient.Abort(); } this._serviceClient = null; } } update october 29 : added 2 catch blocks so as to catch the REAL error message, please see this post: http://fczaja.blogspot.com/2009/05/communication-object.html

and your app.config “serviceModel” section will be reduced to: (and could be reduced even more..)

update details (@Oct 16,2011):

programatic bindind in C#



update 2011/10/19: added a binding type switch

Master Data Services : Business Rules Copy / Import / Export (Cross Model)

updated article (Oct 2011)

(code refactored)

Hi All,

One other missing feature of MDS is Import / Export / Copy Business rules from a model to another (or copy business rules to the same model)

my code is still in beta, but it is already (partially) working.

you can find it on my “MDS Manager” tool on codeplex:

http://mdsmanager.codeplex.com


Get business rules from modelId, quite easy with service client method “business rules get”, returns a business rule set

                //new type needed to avoir error because serialization of an inherited class                 XmlSerializer xs = new XmlSerializer(typeof(BusinessRules), new Type[] { typeof(Common.ServiceReference1.BRAttributeValueArgument) });
//update oct 2011!
//new type needed to avoir error because serialization of an inherited class

update oct 2011 code for BRActionsInstanciate, BRConditionsInstanciate,BRConditionTreeNodesInstanciate

Master Data Services : Cross Model entity Copy

Hi all,

One of the missing things in MDS is the cross-model entity copy

here is a API usage example for copying an entity from a model /version to another (or even copy an entity into a new model with a new entity name).

you can download the complete source code of my codeplex tool including this sample on : http://mdsmanager.codeplex.com

note: if source entity contains domain based attributes, and if the target model does not contain the domain based attribute parent entity, the attribute type will automatically converted to “Freeform” instead of “Domain based attribute”.