public async Task <ActionResult> Index()
        {
            ViewBag.LogTypeExceptNum = (int)Log2Net.Models.LogType.异常;
            var userID    = AbpSession.UserId ?? -1;
            var userIDStr = userID == -1 ? "" : userID.ToString();
            var userName  = "";

            try
            {
                var user = await _userAppService.Get(new EntityDto <long>() { Id = userID });

                if (user != null)
                {
                    userName = user.UserName;
                }
            }
            catch (Exception ex)
            {
            }
            LgWG.LogQuery.Web.Models.IndexView iv = new Models.IndexView();
            iv.Apps = getApply(DateTime.Now.AddDays(-7).ToString(), DateTime.Now.ToString());
            Log_OperateTraceBllEdm log = new Log_OperateTraceBllEdm()
            {
                UserID = userIDStr, UserName = userName, LogType = LogType.业务记录, TabOrModu = "操作日志", Detail = "进入了页面"
            };
            string msg = LogApi.WriteLog(LogLevel.Info, log);

            return(View(iv));
        }
Ejemplo n.º 2
0
        /// Metoder for views
        public ActionResult Index()
        {
            var db = new DB();

            Models.IndexView indexView = db.HentIndexView();

            return(View(indexView));
        }
        public async Task <ActionResult> Index()
        {
            LgWG.LogQuery.Web.Models.IndexView iv = new Models.IndexView();
            iv.Apps = GetApply(DateTime.Now.AddDays(-7).ToString(), DateTime.Now.ToString());
            LogTraceVM log = new LogTraceVM()
            {
                LogType = LogType.业务记录, TabOrModu = "操作日志", Detail = "进入了页面"
            };

            //string msg = WriteLog(LogLevel.Info, log);
            return(View(iv));
        }
Ejemplo n.º 4
0
 public ActionResult Index()
 {
     Models.IndexView iv = new Models.IndexView();
     iv.Apps = mFactory.Management.ListApp();
     return View(iv);
 }
Ejemplo n.º 5
0
        public ActionResult Chatting(string UserID, string TargetSkill, string UserName
                                     , string EnterID, string strServiceCardNo, string MachineNo, string RegisterNumber
                                     , string Queue, string LAStatID, string customerIP, string customerLocation, string emailClient, string WSISID, string PreText)
        {
            string value = Session[CHAT_SESSION_KEY] as string;

            if (!string.IsNullOrEmpty(value))
            {
                ChatLog.GetInstance().FormatMessage("系统检测到用户刷新了页面或开启了多个Chat窗口。");
                System.Threading.Thread.Sleep(500);
            }
            Session[CHAT_SESSION_KEY] = DateTime.Now.ToShortDateString();

            // 呈现
            Models.IndexView model = new Models.IndexView();
            try
            {
                if (this.Request.UrlReferrer != null)
                {
                    ChatLog.GetInstance().FormatMessage("请求来源:{0}", this.Request.UrlReferrer.OriginalString);
                }
                ChatLog.GetInstance().FormatMessage("客户端IP地址:{0}", this.Request.UserHostAddress);
                if (string.IsNullOrEmpty(EnterID))
                {
                    ChatLog.GetInstance().FormatMessage("无效的请求,参数EnterID为空。自动转接到Lenovo专家在线队列。");
                    EnterID = "1003";
                }

                var rightEnterID = int.Parse(EnterID);

                try
                {
                    rightEnterID = int.Parse(EnterID);
                    var r = GetChatRightEnterID(rightEnterID, MachineNo);
                    if (string.IsNullOrEmpty(LAStatID))
                    {
                        if (r.Type == 2)
                        {
                            LAStatID = r.Return;
                        }
                    }
                    if (!string.IsNullOrEmpty(MachineNo))
                    {
                        if (r.Type == 1)
                        {
                            rightEnterID = int.Parse(r.Return);
                        }
                    }
                }
                catch { }

                // 获取URL中的参数
                Dictionary <string, object> parames = new Dictionary <string, object>();
                parames["UserID"]      = UserID;
                parames["TargetSkill"] = TargetSkill;
                parames["UserName"]    = HttpUtility.UrlDecode(UserName);
                parames["EnterID"]     = rightEnterID.ToString();
                //      if (strServiceCardNo == "")
                // {
                //     parames["strServiceCardNo"] = UserName;
                // }
                // else
                // {
                parames["strServiceCardNo"] = strServiceCardNo;
                // }
                parames["MachineNo"]      = MachineNo;
                parames["RegisterNumber"] = RegisterNumber;
                parames["Queue"]          = Queue;
                parames["LAStatID"]       = LAStatID;
                parames["emailClient"]    = emailClient;
                parames["WSISID"]         = WSISID;

                parames["CustomerIP"]       = this.Request.UserHostAddress;
                parames["CustomerLocation"] = customerLocation;

                model.CurrentQueueName = TargetSkill;
                if (!string.IsNullOrEmpty(PreText))
                {
                    model.RabitPreText = HttpUtility.UrlEncode(HttpUtility.HtmlDecode(PreText));
                }
                model.ClientUserData = JsonConvert.SerializeObject(parames);
            }
            catch { }
            return(View(model));
        }
Ejemplo n.º 6
0
 public ActionResult Index()
 {
     Models.IndexView iv = new Models.IndexView();
     iv.Apps = mFactory.Management.ListApp();
     return(View(iv));
 }