114 lines
4.1 KiB
C#
114 lines
4.1 KiB
C#
using LoggingHelper;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using GODATA.RoleServices;
|
|
using GODATA.AuthenticationServices;
|
|
using RestSharp;
|
|
using Newtonsoft.Json;
|
|
using Kendo.Mvc.UI;
|
|
using Kendo.Mvc.Extensions;
|
|
using GODATA.Models.DropDownData;
|
|
using System.Data;
|
|
using ExcelHelper;
|
|
using ExportToExcel;
|
|
using GODATA.Models.FilterKendoGrid;
|
|
using GODATA.Models.Notifications;
|
|
using GODATA.Models.Ticket;
|
|
using GODATA.Models.UserInventory;
|
|
|
|
namespace GODATA.Controllers
|
|
{
|
|
[GODATA.MvcApplication.SessionExpire]
|
|
public class AnalyticsController : Controller
|
|
{
|
|
/// <summary>
|
|
/// Represent object of LoggingUtility class
|
|
/// </summary>
|
|
LoggingUtility objLog = new LoggingUtility();
|
|
|
|
/// <summary>
|
|
/// Represent string object contain log file path
|
|
/// </summary>
|
|
//string path = "~/Log/";
|
|
string path = System.Web.HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["PathLog"]);
|
|
|
|
/// <summary>
|
|
/// Represent string object contain log status
|
|
/// </summary>
|
|
string logtf = (ConfigurationManager.AppSettings["Log"]);
|
|
|
|
/// <summary>
|
|
/// Represent string object contain Error log status
|
|
/// </summary>
|
|
string errorlogtf = (ConfigurationManager.AppSettings["ErrorLog"]);
|
|
|
|
/// <summary>
|
|
/// Global variable for Notifications repository.
|
|
/// </summary>
|
|
private TicketAdministrationRepository objTicketAdministrationRepository = null;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ActionResult Analytics_HeatMap()
|
|
{
|
|
objLog.AddLogFile("Analytics_HeatMap", DateTime.Now.ToString(ConfigurationManager.AppSettings["dateTimeFormat"]), path, logtf);
|
|
try
|
|
{
|
|
objTicketAdministrationRepository = new TicketAdministrationRepository();
|
|
//Get states List
|
|
List<StateModel> oStateList = objTicketAdministrationRepository.GetStateList();
|
|
List<SelectListItem> item11 = new List<SelectListItem>();
|
|
item11.Add(new SelectListItem { Text = "All", Value = "" });
|
|
|
|
foreach (StateModel items in oStateList)
|
|
{
|
|
item11.Add(new SelectListItem { Text = items.StateAlias, Value = items.StateAlias.ToString() });
|
|
}
|
|
return View(item11.OrderBy(o => o.Text));
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
objLog.ErrorLogFile("Analytics_HeatMap", ex.Message, path, errorlogtf);
|
|
objLog.AddLogFile(DateTime.Now.ToString(ConfigurationManager.AppSettings["dateTimeFormat"]), path, logtf);
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ActionResult Analytics_HeatMap_SlaNotMet()
|
|
{
|
|
objLog.AddLogFile("Analytics_HeatMap_SlaNotMet", DateTime.Now.ToString(ConfigurationManager.AppSettings["dateTimeFormat"]), path, logtf);
|
|
try
|
|
{
|
|
objTicketAdministrationRepository = new TicketAdministrationRepository();
|
|
//Get states List
|
|
List<StateModel> oStateList = objTicketAdministrationRepository.GetStateList();
|
|
List<SelectListItem> item11 = new List<SelectListItem>();
|
|
item11.Add(new SelectListItem { Text = "All", Value = "" });
|
|
|
|
foreach (StateModel items in oStateList)
|
|
{
|
|
item11.Add(new SelectListItem { Text = items.StateAlias, Value = items.StateAlias.ToString() });
|
|
}
|
|
return View(item11.OrderBy(o => o.Text));
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
objLog.ErrorLogFile("Analytics_HeatMap_SlaNotMet", ex.Message, path, errorlogtf);
|
|
objLog.AddLogFile(DateTime.Now.ToString(ConfigurationManager.AppSettings["dateTimeFormat"]), path, logtf);
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|