public ActionResult Index(Guid?userId) { if (!userId.HasValue) { userId = ps_Membership.GetUser().UserId; } bn_Location bnLocation = new bn_Location(); var model = bnLocation.GetByUserId((Guid)userId); ViewBag.UserId = userId; return(View(model)); }
public ActionResult p_UserLocation(Guid userId) { bn_Location bnLocation = new bn_Location(); var model = bnLocation.GetByUserId((Guid)userId); if (model.Count > 0) { return(View(model)); } else { return(null); } }