Ejemplo n.º 1
0
 public void Create(Partnership entity)
 {
     if (entity != null)
     {
         _repository.Insert(entity);
     }
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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;
 }