public List<List<string>> GetEDiary() { string response = TryAuthorize(); if (!response.Contains("Access is forbidden") && !response.Contains("Доступ запрещен") && response != null) { User user = new User(); Dictionary<string, string> data = user.GetUserData(); return GetEDiaryInternal(data["LOGIN"], data["GROUP"], data["UNIVER"], data["APPRENTICESHIP"], data["INTERVAL"]); } return null; }
private string TryAuthorize() { User user = new User(); Dictionary<string, string> userData = new Dictionary<string, string>(); userData = user.GetUserData(); DE_IFMO_Cookies = new CookieContainer(); string data = String.Format("Rule=LOGON&LOGIN={0}&PASSWD={1}", userData["LOGIN"], userData["PASSWD"]); string response = MakeRequest("POST", DE_IFMO_RU, ref DE_IFMO_Cookies, data); return response; }