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); }
/// <summary> /// Allocate dispatch To hubs of the same owner ( Transfer and Swap) /// </summary> /// <returns></returns> public ActionResult ToHubs() { var model = _otherDispatchAllocationService.GetAllToCurrentOwnerHubs(_userProfileService.GetUser(User.Identity.Name)); return(View(model)); }