Beispiel #1
0
        public ActionResult DrawNetworkStatistics(GraphViewModel graphViewModel)
        {
            try
            {
                DateTime fromDate         = DateTime.ParseExact(graphViewModel.FromDate, "MM/dd/yyyy", null);
                DateTime toDate           = DateTime.ParseExact(graphViewModel.ToDate, "MM/dd/yyyy", null);
                string   connectionString = graphViewModel.FileImported == false?GetConnectionStringBasedOnSelectedMember(graphViewModel.SelectedTeamMemberId.ToString()) : _importConnectionString;

                FetchItemServiceResponse <NetworkStatisticsDto> mostUsedEmailDomains = _graphService.FetchEmailNetworkStatistics(connectionString, fromDate, toDate);
                if (mostUsedEmailDomains.Succeeded)
                {
                    graphViewModel.NetworkStatisticsDto = mostUsedEmailDomains.Item;
                }
            }
            catch (Exception e)
            {
                return(new HttpStatusCodeResult(500, e.Message));
            }
            return(View("NetworkStatistics_partial", graphViewModel));
        }