예제 #1
0
        public string E_DetailingURL()
        {
            CurrentInfo _objCurrInfo   = new CurrentInfo();
            string      E_DetailingURL = string.Empty;
            string      LoginParams    = string.Empty;

            try
            {
                //byte[] UserEncode=System.Text.Encoding.UTF8.GetBytes(_objCurrInfo.GetUserName());
                //string UserName = Convert.ToBase64String(UserEncode);
                //byte[] SubDomainEncode = System.Text.Encoding.UTF8.GetBytes(_objCurrInfo.GetSubDomain());
                //String SubDomain = Convert.ToBase64String(SubDomainEncode);
                string EDetailingRedirectUrl = _objCurrInfo.GetEDetailing();

                CompanyDetails lstcompdetails = new CompanyDetails();
                lstcompdetails.SubDomainName = _objCurrInfo.GetSubDomain();
                lstcompdetails.UserName      = _objCurrInfo.GetUserName();

                LoginParams = JsonConvert.SerializeObject(lstcompdetails);
                byte[] LoginParamsEncode = System.Text.Encoding.UTF8.GetBytes(LoginParams);
                LoginParams = Convert.ToBase64String(LoginParamsEncode);


                if (!string.IsNullOrEmpty(EDetailingRedirectUrl))
                {
                    E_DetailingURL = "" + EDetailingRedirectUrl + "?SSID=" + LoginParams;
                }

                //if (!string.IsNullOrEmpty(EDetailingRedirectUrl))
                //{
                //    E_DetailingURL = "" + EDetailingRedirectUrl + "?U=" + UserName + "&S=" + SubDomain;
                //}
                return(E_DetailingURL);
            }
            catch (Exception ex)
            {
                DataControl.Impl.ExceptionHandler.WriteLog(ex, null);
                return(string.Empty);
            }
        }