Пример #1
0
        private static labNetResponse labNetLogin(string username, string password)
        {
            string         url         = "http://portal.njnu.edu.cn/portal_io/login";
            string         param       = "username="******"&password=" + password;
            string         resStr      = HttpPost(url, param);
            labNetResponse netResponse = JsonConvert.DeserializeObject <labNetResponse>(resStr);

            return(netResponse);
        }
Пример #2
0
        private static bool labNetLogout()
        {
            bool           result      = false;
            string         url         = "http://portal.njnu.edu.cn/portal_io/logout";
            string         resStr      = HttpPost(url, "");
            labNetResponse netResponse = JsonConvert.DeserializeObject <labNetResponse>(resStr);

            if (netResponse.reply_code == 101)
            {
                result = true;
            }
            return(result);
        }