Beispiel #1
0
        public ViewResult Index()
        {
            var membershipUser = Membership.GetUser();

            if (membershipUser != null)
            {
                var user   = _userProfileService.GetUser(membershipUser.UserName);
                var toFdps =
                    _dispatchAllocationService.GetCommitedAllocationsByHubDetached(
                        user.DefaultHub.HubID, _userProfileService.GetUser(membershipUser.UserName).
                        PreferedWeightMeasurment.ToUpperInvariant(), null, null, null);
                var loans     = _otherDispatchAllocationService.GetAllToOtherOwnerHubs(user);
                var transfer  = _otherDispatchAllocationService.GetAllToCurrentOwnerHubs(user);
                var adminUnit = new List <AdminUnit> {
                    _adminUnitService.FindById(1)
                };
                var commodityTypes = _commodityTypeService.GetAllCommodityType();
                var model          = new DispatchHomeViewModel(toFdps, loans, transfer, commodityTypes, adminUnit, user);
                return(View(model));
            }
            return(null);
        }
Beispiel #2
0
        /// <summary>
        /// Allocate dispatch To the other owners.
        /// </summary>
        /// <returns></returns>
        public ActionResult ToOtherOwners()
        {
            var model = _otherDispatchAllocationService.GetAllToOtherOwnerHubs(_userProfileService.GetUser(User.Identity.Name));

            return(View(model));
        }