public ActionResult Detail(Guid id) { var model = new PriceStrategyComposite(); model.PriceStrategyDTO = this._IPriceStrategyService.GetByKey(id); model.ProductDTOList = this._IProductService.GetAll(); return(View(model)); }
public ActionResult Submit(PriceStrategyComposite composite) { composite.PriceStrategyDetailDTOList.ForEach(item => { item.ModifiedBy = item.CreatedBy = this.User.Id; item.CreatedDate = item.ModifiedDate = DateTime.Now; }); this._IPriceStrategyDetailService.Create(composite.PriceStrategyDetailDTOList); return(RedirectToAction("Detail", new { Id = composite.PriceStrategyDTO.Id })); }