public void Create(Partnership entity) { if (entity != null) { _repository.Insert(entity); } }
public ActionResult New(PartnershipViewModel model) { if (ModelState.IsValid) { var p = new Zakar.Models.Partnership { Amount = model.Amount, CurrencyId = model.CurrencyId, DateCreated = DateTime.Now, Month = model.Month, PartnerId = model.PartnerId, PartnershipArmId = model.PartnershipArmId, Source = "WEB", Year = model.Year }; _partnershipService.Create(p); AccessContext.FlushChanges(); p.TrackingId = "PO-" + p.Id.ToString(); TempData["Message"] = "Partnership Record Logged Successfully"; return RedirectToAction("New"); } return View(model); }
public ActionResult StageCreate(PartnershipViewModel model) { if (ModelState.IsValid) { var p = new Zakar.Models.Partnership { Amount = model.Amount, CurrencyId = model.CurrencyId, DateCreated = DateTime.Now, Month = model.Month, PartnerId = model.PartnerId, PartnershipArmId = model.PartnershipArmId, Source = "WEB", Year = model.Year }; _partnershipService.Create(p); AccessContext.FlushChanges(); p.TrackingId = "PO-" + p.Id.ToString(CultureInfo.InvariantCulture); _stagedPartnershipService.Delete(model.Id); TempData["Message"] = "Partnership Record Logged Successfully"; return Json(new {}); } return PartialView(model); }
public PartnershipLogCreatedEventArgs(Partnership p) { this._partnership = p; }