示例#1
0
        public PartialViewResult _AntivirusPopup(string startDate, string endDate)
        {
            var jsonResponse = restfulClient.GetPeopleWhoDoNotUpdateAntivirus(startDate, endDate);
            var employeeKeys = JsonConvert.DeserializeObject <List <EmployeeKey> >(jsonResponse);
            var employees    = new List <EmployeeWithDeviceNumber>();

            foreach (EmployeeKey ek in employeeKeys)
            {
                var     fullJson   = graphQLClient.GetPersonWithDevicesNumber(ek.key);
                JObject parsedJson = JObject.Parse(fullJson);
                JObject personJson = (JObject)parsedJson["data"]["person"];
                var     employee   = JsonConvert.DeserializeObject <EmployeeWithDeviceNumber>(personJson.ToString());
                employees.Add(employee);
            }
            ViewBag.Employee = employees;
            return(PartialView());
        }