public PromotionCreateModel(Promotion p) { this.Event = p.Event; this.Available = p.Available; this.Deals = p.Deals.ToList(); this.MaxReferal = p.MaxReferal; //this.Taken = p.Taken; }
public void Setup() { if (this.AccountBase != null && this.BusinessId != null) { var b = this.AccountBase.BusinessActions.GetBusiness(BusinessId); this.Business = AutoMapper.Mapper.Map<DataEntities.Business, ModelEntities.Business>(b); this.Promotion = new ModelEntities.Promotion(this.Business); this.IsValid = true; } }
public Promotion ToPromotion() { Promotion p = new Promotion(); p.Available = this.Available; p.Deals = this.Deals; p.Event = this.Event; p.MaxReferal = this.MaxReferal; return p; }
public ActionResult Create(Promotion promotion) { try { return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Edit(Guid id, Entities.Promotion p) { try { // TODO: Add update logic here return(RedirectToAction("Index")); } catch { return(View()); } }
public PromoCreateModel(AccountBase accountBase, Guid businessId, ModelEntities.Promotion promotion) { this.AccountBase = accountBase; this.BusinessId = businessId; this.Promotion = promotion; }