Exemple #1
0
        public bool judgeversion()
        {
            //flag为true,则需下载
            bool      flag     = false;
            String    param    = "zttoffice";
            String    url      = "http://10.15.1.252:8080/ZttErp/zttCodeversionController/getversion?param=" + param;
            httputil  httputil = new httputil();
            Hashtable ht       = httputil.Httpwconnection(url, param);

            if (ht["status"].Equals("fail"))
            {
                flag = false;
            }
            if (ht["status"].Equals("success"))
            {
                String content      = ht["content"].ToString();
                String versionlocal = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
                if (!content.Equals(versionlocal))
                {
                    return(true);
                }
            }

            else
            {
                return(false);
            }
            return(flag);
        }
Exemple #2
0
        public string getversion(string appname)
        {
            string    url       = "http://" + MyGlobal.ip + ":8080/ZttErp/zttCodeversionController/getversion?param=" + appname;
            httputil  httputil  = new httputil();
            Hashtable hashtable = httputil.Httpwconnection(url, appname);
            string    result    = null;

            if (hashtable["status"].Equals("success"))
            {
                result = hashtable["content"].ToString();
            }
            return(result);
        }
Exemple #3
0
        public String getversion()
        {
            //flag为true,则需下载
            String param = "zttoffice";

            String    url      = "http://10.15.1.252:8080/ZttErp/zttCodeversionController/getversion?param=" + param;
            httputil  httputil = new httputil();
            Hashtable ht       = httputil.Httpwconnection(url, param);
            String    content  = null;

            if (ht["status"].Equals("success"))
            {
                content = ht["content"].ToString();
            }
            return(content);
        }
Exemple #4
0
        public static bool judgeversion(string versionlocal, string appname)
        {
            bool      result    = false;
            string    url       = "http://" + MyGlobal.ip + ":8080/ZttErp/zttCodeversionController/getversion?param=" + appname;
            httputil  httputil  = new httputil();
            Hashtable hashtable = httputil.Httpwconnection(url, appname);

            if (hashtable["status"].Equals("fail"))
            {
                result = false;
            }
            if (!hashtable["status"].Equals("success"))
            {
                return(false);
            }
            string text = hashtable["content"].ToString();

            if (text.Equals(versionlocal))
            {
                return(result);
            }
            return(true);
        }