partial void UpdateQuoteOption(QuoteOption instance);
partial void DeleteQuoteOption(QuoteOption instance);
partial void InsertQuoteOption(QuoteOption instance);
private void detach_QuoteOptions(QuoteOption entity) { this.SendPropertyChanging(); entity.Quote = null; }
private void attach_QuoteOptions(QuoteOption entity) { this.SendPropertyChanging(); entity.Quote = this; }
public QuoteOption CreateOption(QuoteOption option) { db.QuoteOptions.InsertOnSubmit(option); db.SubmitChanges(); return option; }
public ActionResult Options(QuoteOptionsModel model) { using (var qm = new QuoteManager()) { foreach (var psm in model.ProductLineSelectionModels) { if (psm.IsSelected) { // add it to the quote options database var option = new QuoteOption { QuoteID = model.QuoteID, ContentCategory = QuoteOptionCategory.ProductLineMapping, ForeignKey = psm.ProductLineID, TableName = TableName.ProductLine }; option = qm.CreateOption(option); } } foreach (var msm in model.ManufacturerSelectionModels) { if (msm.IsSelected) { // add it to the quote options database var option = new QuoteOption { QuoteID = model.QuoteID, ContentCategory = QuoteOptionCategory.ManufacturerDefault, ForeignKey = msm.ManufacturerID, TableName = TableName.Manufacturer }; option = qm.CreateOption(option); } } } return RedirectToAction("Edit", new { id = model.QuoteID }); }