예제 #1
0
        public ActionResult Index()
        {
            var currentUser = UserAccountHelper.GetUser(HttpContext.User.Identity.Name);

            ViewBag.HubName = currentUser.DefaultHub != null?_hubService.FindById(currentUser.DefaultHub ?? 1).Name : "";

            ViewBag.HubID = currentUser.DefaultHub ?? 0;
            return(View());
        }
예제 #2
0
        public JsonResult RecentDispatchAllocation()
        {
            var currentUser = UserAccountHelper.GetUser(HttpContext.User.Identity.Name);

            if (currentUser.DefaultHub != null)
            {
                var result    = _dispatchAllocationService.FindBy(m => m.HubID == currentUser.DefaultHub).OrderByDescending(m => m.DispatchAllocationID);
                var dispached = GetDispatchAllocation(result);
                return(Json(dispached, JsonRequestBehavior.AllowGet));
            }

            return(Json(null, JsonRequestBehavior.AllowGet));
        }