/// <summary> /// /// </summary> /// <param name="obj"></param> protected void SetCookie(object obj) { try { Variable.User = _user; CookieUtil.ClearWebbrowserCookie(); //设置 SSO 系统的 Cookie _loginManager.SetSSOCookieOfProcess(); //设置 HIS 系统的 Cookie //_loginManager.SetHisCookieOfProcess(); return; //获得 CRM 系统的 Cookie //string crmCookieUrl = ""; //System.Net.CookieContainer crmCookie = _loginManager.GetCrmCookie(_user.TGT, ref crmCookieUrl); //if (crmCookie == null) //{ // LogHelper.WriteLog("无法连接Crm服务器,请联系管理员。"); //} //_user.CrmCookie = crmCookie; //_user.CrmCookieUrl = crmCookieUrl; //_loginManager.SetCrmCookieOfProcess(); ////获得 SCM 系统的 Cookie //string scmCookieUrl = string.Empty; //CookieContainer scmCookie = _loginManager.GetScmCookie(_user.TGT, ref scmCookieUrl); //if (scmCookie == null) //{ // LogHelper.WriteLog("无法连接Scm服务器,请联系管理员。"); //} //_user.ScmCookie = scmCookie; //_user.ScmCookieUrl = scmCookieUrl; //_loginManager.SetScmCookieOfProcess(); } catch (Exception ex) { LogHelper.WriteException(ex); } }