// GET: Tender public ActionResult Details(int?id) { LoadControls(); if (id != null) { var project = projectService.GetProjectById(projectTypeId, id.Value); ViewBag.Principals = principalService.GetPrincipalList(); ViewBag.SourcingPartners = sourcingPartnerService.GetSourdingPartnerList(); return(View(project)); } return(View()); }
public ActionResult GetList() { var list = principalService.GetPrincipalList(); List <PrincipalView> modelList = new List <PrincipalView>(); foreach (var item in list) { modelList.Add(new PrincipalView() { Id = item.Id, AddressLine1 = item.AddressLine1, AddressLine2 = item.AddressLine2, City = item.City, Province = item.Province, Postcode = item.Postcode, Email = item.Email, Website = item.Website, IsActive = item.IsActive, CountryName = item.WFM_Country.Name, Name = item.Name }); } return(Json(new { data = modelList }, JsonRequestBehavior.AllowGet)); }
private void LoadControls() { var documents = documentService.GetDocumentsByProjectType(projectTypeId); var projectDocuments = projectDocumentService.GetProjectDocumentsByProjectType(projectTypeId); var documentsWithFields = documentService.GetDocumentsByProjectTypeWithFields(projectTypeId); ViewBag.SectorList = sectorService.GetProjectSectorParentList(); ViewBag.Type1DocumentList = documents.Where(d => d.DocumentTabId == 1 && d.HasFields == false).OrderBy(d => d.DisplayOrder).ToList(); ViewBag.Type2DocumentList = documents.Where(d => d.DocumentTabId == 2 && d.HasFields == false).OrderBy(d => d.DisplayOrder).ToList(); ViewBag.Type3DocumentList = documents.Where(d => d.DocumentTabId == 3 && d.HasFields == false).OrderBy(d => d.DisplayOrder).ToList(); ViewBag.Type6DocumentList = documents.Where(d => d.DocumentTabId == 6 && d.HasFields == false).OrderBy(d => d.DisplayOrder).ToList(); ViewBag.Type1ProjectDocumentList = projectDocuments.Where(d => d.WFM_Document.DocumentTabId == 1 && d.WFM_Document.HasFields == false).OrderBy(d => d.WFM_Document.DisplayOrder).ToList(); ViewBag.Type2ProjectDocumentList = projectDocuments.Where(d => d.WFM_Document.DocumentTabId == 2 && d.WFM_Document.HasFields == false).OrderBy(d => d.WFM_Document.DisplayOrder).ToList(); ViewBag.Form8B = documentsWithFields.Where(d => d.DocumentTabId == 4 && d.Id == 22).OrderBy(d => d.DisplayOrder).ToList(); ViewBag.SourcingPartners = sourcingPartnerService.GetSourdingPartnerList(); ViewBag.Principals = principalService.GetPrincipalList(); }