Ejemplo n.º 1
0
 public ActionResult Create(int organizationId)
 {
     OrganizationNote organizationnote = new OrganizationNote();
     organizationnote.OrganizationID = organizationId;
     ViewBag.PossibleOrganizationNoteCategories = organizationnotecategoryRepository.All;
     return View(organizationnote);
 }
Ejemplo n.º 2
0
 public ActionResult Create(OrganizationNote organizationnote,int organizationId)
 {
     if (ModelState.IsValid) {
         organizationnoteRepository.InsertOrUpdate(organizationnote);
         organizationnoteRepository.Save();
         return RedirectToAction("Index",new { organizationId=organizationId });
     } else {
         ViewBag.PossibleOrganizationNoteCategories = organizationnotecategoryRepository.All;
         return View(organizationnote);
     }
 }
Ejemplo n.º 3
0
 public void InsertOrUpdate(OrganizationNote organizationnote)
 {
     if (organizationnote.OrganizationNoteID == default(int)) {
         // New entity
         context.OrganizationNote.Add(organizationnote);
     } else {
         // Existing entity
         context.Entry(organizationnote).State = EntityState.Modified;
     }
 }
Ejemplo n.º 4
0
 public ViewResult Search(OrganizationNote searchOrganizationNote,int organizationId)
 {
     if(searchOrganizationNote!=null)
     {
                     }
                 return View("Index",organizationnoteRepository.AllIncluding(organizationId,organizationnote => organizationnote.Organization, organizationnote => organizationnote.OrganizationNoteCategory, organizationnote => organizationnote.WrittenByUser));
 }