public static decimal getYuE()
 {
     if (ServerType.Equals("顺丰"))
     {
         decimal yue = ServerShunFeng.getYuE(FeidanUrlShunFen, _webCookieShunFen);
         if (yue > -1)
         {
             KeYongYuE = yue;
         }
     }
     else if (ServerType.Equals("永利"))
     {
         decimal yue = ServerYongLi.getYuE(FeidanUrlYongLi, _webCookieYongLi);
         if (yue > -1)
         {
             KeYongYuE = yue;
         }
     }
     return(KeYongYuE);
 }
        /// <summary>
        /// 保持登录状态
        /// </summary>
        public static bool login(string url, string username, string userpass, string serType)
        {
            if (username.Length == 0 && userpass.Length == 0)
            {
                return(false);
            }

            bool isSuccess = false;

            //登录获取Cookie

            if (serType.Equals("顺丰"))
            {
                FeidanUrlShunFen = url;
                //
                if (ServerShunFeng.checkLogin(FeidanUrlShunFen, _webCookieShunFen))
                {
                    function.log("顺丰已经登录。");
                    isSuccess = true;
                }
                else
                {
                    isSuccess = ServerShunFeng.login(FeidanUrlShunFen, username, userpass, _webCookieShunFen, 5);
                }
                //


                //
                KeYongYuE = ServerShunFeng.getYuE(FeidanUrlShunFen, _webCookieShunFen);

                //获取验证
                _serValidate = ServerShunFeng.getValidate(FeidanUrlShunFen, _webCookieShunFen);

                //
                FeidanUrl = FeidanUrlShunFen;
            }
            else if (serType.Equals("永利"))
            {
                try
                {
                    if (ServerYongLi.checkLogin(FeidanUrlYongLi, _webCookieYongLi))
                    {
                        function.log("永利已经登录。");
                        isSuccess = true;
                    }
                    else
                    {
                        isSuccess = ServerYongLi.login(url, username, userpass, _webCookieYongLi, out FeidanUrlYongLi);
                    }
                }
                catch (Exception ex)
                {
                    function.log("网站链接错误" + ex.Message);
                }

                //
                KeYongYuE = ServerYongLi.getYuE(FeidanUrlYongLi, _webCookieYongLi);

                //
                FeidanUrl = FeidanUrlYongLi;
            }

            //
            function.log("当期登录服务器" + FeidanUrl);

            ServerUrl      = url;
            IsLoginSuccess = isSuccess;
            ServerType     = serType;
            LoginName      = username;
            LoginPass      = userpass;

            return(isSuccess);
        }