public static MapPinViewModel Create(IRepository repository, Item item) { Check.Require(repository != null, "Repository is required."); var viewModel = new MapPinViewModel() { Item = item }; return viewModel; }
public static CouponViewModel Create(IRepository repository, Item item, string couponType = null) { Check.Require(repository != null, "Repository is required."); var viewModel = new CouponViewModel() {Item = item, CouponType = couponType}; return viewModel; }
public MapPin(Item item, bool isPrimary, string latitude, string longitude) { SetDefaults(); Item = item; IsPrimary = isPrimary; Latitude = latitude; Longitude = longitude; }
public ItemQuestionSet(Item item, QuestionSet questionSet, int order) { Item = item; QuestionSet = questionSet; Order = order; SetDefaults(); }
public static BigMapViewModel Create(Item item) { var viewModel = new BigMapViewModel(){Item = item}; if(viewModel.Item.MapPins != null && viewModel.Item.MapPins.Count > 0) { viewModel.HasMapPins = true; } else { viewModel.HasMapPins = false; } return viewModel; }
public bool HasItemAccess(IPrincipal currentUser, Item item) { return Access.HasItemAccess(currentUser, item); }
public Editor(Item item, User user) { Item = item; User = user; }