Ejemplo n.º 1
0
 public ActionResult Create(int organizationId)
 {
     OrganizationDocument organizationdocument = new OrganizationDocument();
     organizationdocument.OrganizationID = organizationId;
     ViewBag.PossibleOrganizationDocumentFolders = organizationdocumentfolderRepository.All;
     ViewBag.PossibleOrganizationDocumentCategories = organizationdocumentcategoryRepository.All;
     return View(organizationdocument);
 }
Ejemplo n.º 2
0
 public ActionResult Create(OrganizationDocument organizationdocument,int organizationId)
 {
     if (ModelState.IsValid) {
         organizationdocumentRepository.InsertOrUpdate(organizationdocument);
         organizationdocumentRepository.Save();
         return RedirectToAction("Index",new { organizationId=organizationId });
     } else {
         ViewBag.PossibleOrganizationDocumentFolders = organizationdocumentfolderRepository.All;
         ViewBag.PossibleOrganizationDocumentCategories = organizationdocumentcategoryRepository.All;
         return View(organizationdocument);
     }
 }
Ejemplo n.º 3
0
 public ViewResult Search(OrganizationDocument searchOrganizationDocument,int organizationId)
 {
     if(searchOrganizationDocument!=null)
     {
                     }
                 return View("Index",organizationdocumentRepository.AllIncluding(organizationId,organizationdocument => organizationdocument.Organization, organizationdocument => organizationdocument.OrganizationDocumentFolder, organizationdocument => organizationdocument.OrganizationDocumentCategory));
 }
Ejemplo n.º 4
0
 public void InsertOrUpdate(OrganizationDocument organizationdocument)
 {
     if (organizationdocument.OrganizationDocumentID == default(int)) {
         // New entity
         context.OrganizationDocument.Add(organizationdocument);
     } else {
         // Existing entity
         context.Entry(organizationdocument).State = EntityState.Modified;
     }
 }