Exemple #1
0
        public static SecureUrl BuildSecureUrl(string url,
                                               //string returnUrl,IFacade facade, // just to make the code error free
                                               string returnUrl, IHRMemberFacade facade,
                                               params string[] parameters)
        {
            SecureUrl secureUrl = new SecureUrl(url);

            if ((parameters != null) && (parameters.Length > 0))
            {
                if ((parameters.Length % 2) == 0)
                {
                    for (int i = 0; i < parameters.Length; i += 2)
                    {
                        secureUrl[parameters[i]] = parameters[i + 1];
                    }
                }
            }

            if (!StringHelper.IsBlank(returnUrl))
            {
                secureUrl.ReturnUrl = returnUrl;
            }

            return(secureUrl);
        }
        public static void SetHyperLink(HyperLink link,
                                        string url,
                                        //string returnUrl, IFacade facade, // just to make it error free
                                        string returnUrl, IHRMemberFacade facade,
                                        string text,
                                        params string[] parameters)
        {
            SecureUrl secureUrl = UrlHelper.BuildSecureUrl(url, returnUrl, facade, parameters);

            SetHyperLink(link, secureUrl, text);
        }