protected override string BuildDiagramDescription(EntityDTO dto)
        {
            HtmlTable t = new HtmlTable(2, 0, "grid", new int[] { 15, 85 });

            t.AddHeader(" ", 2);

            t.AddCell(GlobalStringResource.ProcessName);
            t.AddCell(dto.Name);

            t.AddCell(GlobalStringResource.Description);
            t.AddCell(dto.RenderHTML(GlobalStringResource.ProcessDescription, RenderOption.Paragraph));

            t.AddCell(GlobalStringResource.Purpose);
            t.AddCell(dto.RenderHTML(GlobalStringResource.Description, RenderOption.Paragraph));

            t.AddCell(GlobalStringResource.Objective);
            t.AddCell(dto.RenderHTML(GlobalStringResource.ProcessObjective, RenderOption.Paragraph));

            t.AddCell(GlobalStringResource.Strategy);
            t.AddCell(dto.RenderHTML(GlobalStringResource.Strategy, RenderOption.Paragraph));

            t.AddCell(GlobalStringResource.DocumentOwners);
            t.AddCell(dto.RenderHTML(GlobalStringResource.DocumentOwners, RenderOption.Break));

            return(t.EndHtmlTable());
        }
Exemplo n.º 2
0
        public override object BuildDetail(EntityDTO dto)
        {
            PersonDetailDTO detail = new PersonDetailDTO();

            detail.Title   = dto.Name;
            detail.Email   = dto.RenderHTML(GlobalStringResource.Email, RenderOption.Break);
            detail.Contact = dto.RenderHTML(GlobalStringResource.Contact, RenderOption.Break);
            return(detail);
        }
Exemplo n.º 3
0
        private SubProcessDescription SubProcessDescription(EntityDTO dto)
        {
            SubProcessDescription spd = new SubProcessDescription();

            dto.ExtractProperties();

            spd.Objective          = dto.RenderHTML(GlobalStringResource.Description, RenderOption.Paragraph);
            spd.DocumentOwners     = dto.RenderHTML(GlobalStringResource.DocumentOwners, RenderOption.Break);
            spd.FrameworkReference = dto.RenderHTML(GlobalStringResource.FrameworkReference, RenderOption.Break);
            spd.InternalReference  = dto.RenderHTML(GlobalStringResource.InternalReference, RenderOption.Break);

            return(spd);
        }
Exemplo n.º 4
0
        private ProcessDescription ProcessDescription(EntityDTO dto)
        {
            ProcessDescription pd = new ProcessDescription()
            {
                ProcessName    = dto.Name,
                Description    = dto.RenderHTML(GlobalStringResource.ProcessDescription, RenderOption.Paragraph),
                Purpose        = dto.RenderHTML(GlobalStringResource.Description, RenderOption.Paragraph),
                Objective      = dto.RenderHTML(GlobalStringResource.ProcessObjective, RenderOption.Paragraph),
                Strategy       = dto.RenderHTML(GlobalStringResource.Strategy, RenderOption.Paragraph),
                DocumentOwners = dto.RenderHTML(GlobalStringResource.DocumentOwners, RenderOption.Break)
            };

            return(pd);
        }
        private ControlDetailDTO CreateControlDetailsHtml(EntityDTO control)
        {
            ControlDetailDTO detail = new ControlDetailDTO();


            //Mitigates Risk
            detail.MitigatesRisk = control.RenderHTML("Mitigates Risk", RenderOption.None);

            //Evidence
            detail.Evidence = control.RenderHTML("Evidence", RenderOption.Break);

            //Business Unit
            List <BpmnDetailHoverDTO> relatedBusinessUnit = ConvertToHoverDTO(entityData.GetRelatedBusinessUnit(control.ID));

            //string rbuhtml = RenderControlRelatedProperties(relatedBusinessUnit);
            detail.BusinessUnit = relatedBusinessUnit;

            //WHO - (control owner)
            List <BpmnDetailHoverDTO> relatedControlOwners = ConvertToHoverDTO(entityData.GetRelatedControlOwner(control.ID));

            //string rcoHtml = RenderControlRelatedProperties(relatedControlOwners);
            detail.ControlOwner = relatedControlOwners;

            //Control Objectives
            List <BpmnDetailHoverDTO> relatedControlObj = ConvertToHoverDTO(entityData.GetRelatedControlObjectives(control.ID));

            detail.ControlObjectives = relatedControlObj;

            //Frequency
            List <BpmnDetailHoverDTO> relatedFrequency = ConvertToHoverDTO(entityData.GetRelatedFrequency(control.ID));

            detail.Frequency = relatedFrequency;

            //Application Name
            List <BpmnDetailHoverDTO> relatedApplications = ConvertToHoverDTO(entityData.GetRelatedControlApplications(control.ID));

            detail.ApplicationName = relatedApplications;

            //Control Category
            detail.ControlCategory = control.RenderHTML("Control Category", RenderOption.Break);

            //Corrective
            detail.Corrective = control.RenderHTML("Corrective", RenderOption.Break);

            //Reference Documents
            detail.ReferenceDocuments = control.RenderHTML("Reference Documents", RenderOption.Break);

            return(detail);
        }
Exemplo n.º 6
0
        private List <RolesAndResponsibilityItem> RolesAndResponsibilities(int id)
        {
            List <RolesAndResponsibilityItem> rrs     = new List <RolesAndResponsibilityItem>();
            EntityData       entityData               = new EntityData();
            List <EntityDTO> rolesAndResponsibilities = entityData.GetRolesAndResponsibilities(id);

            if (rolesAndResponsibilities.Count > 0)
            {
                foreach (EntityDTO dto in rolesAndResponsibilities)
                {
                    RolesAndResponsibilityItem rr = new RolesAndResponsibilityItem();
                    dto.ExtractProperties();
                    EntityDTO descriptionDto = entityData.GetRolesDescription(dto.ID);
                    string    description    = string.Empty;
                    if (descriptionDto != null)
                    {
                        descriptionDto.ExtractProperties();
                        description = descriptionDto.RenderHTML(GlobalStringResource.Description,
                                                                RenderOption.Break);
                    }
                    rr.Role             = dto.RenderHTML(GlobalStringResource.Role, RenderOption.None);
                    rr.Responsibilities = description;
                    rrs.Add(rr);
                }
            }
            return(rrs);
        }
        protected virtual string BuildRolesAndResponsibilities(int id)
        {
            string           result     = string.Empty;
            EntityData       entityData = new EntityData();
            List <EntityDTO> rolesAndResponsibilities = entityData.GetRolesAndResponsibilities(id);

            if (rolesAndResponsibilities.Count > 0)
            {
                HtmlTable t = new HtmlTable(2, 0, "grid", new int[] { 20, 80 });

                t.AddHeader(GlobalStringResource.Role);
                t.AddHeader(GlobalStringResource.Responsibilities);

                foreach (EntityDTO dto in rolesAndResponsibilities)
                {
                    dto.ExtractProperties();
                    EntityDTO descriptionDto = entityData.GetRolesDescription(dto.ID);
                    string    description    = string.Empty;
                    if (descriptionDto != null)
                    {
                        descriptionDto.ExtractProperties();
                        description = descriptionDto.RenderHTML(GlobalStringResource.Description,
                                                                RenderOption.Break);
                    }
                    t.AddCell(dto.RenderHTML(GlobalStringResource.Role, RenderOption.None));//(Resources.Role, RenderOption.Paragraph));
                    t.AddCell(description);
                }
                result = t.EndHtmlTable();
            }

            return(result);
        }
        private string RenderLink(EntityDTO related, string key)
        {
            string    link = string.Empty;
            EntityDTO dto  = entityData.GetOneEntityByNameAndClass(related.RenderHTML(key, RenderOption.None), 1);

            if (dto != null)
            {
                dto.ExtractProperties();
                link = related.RenderAsLink(dto.ID, key, RenderOption.None);
            }
            else
            {
                link = related.RenderHTML(key, RenderOption.None);
            }
            return(link);
        }
Exemplo n.º 9
0
        private Phrase CreateBusinessRulesRequiredData(string businessRuleKey)
        {
            if (string.IsNullOrEmpty(businessRuleKey))
            {
                return(new Phrase(new Chunk(string.Empty)));
            }

            string[] keys = businessRuleKey.Split(new string[] { Environment.NewLine },
                                                  StringSplitOptions.RemoveEmptyEntries);

            EntityData    data = new EntityData();
            StringBuilder html = new StringBuilder();

            foreach (string key in keys)
            {
                EntityDTO dto = entityData.GetOneEntity(key.Trim());
                if (dto != null)
                {
                    dto.ExtractProperties();
                    html.AppendFormat("{0}{1}{2}", key, Environment.NewLine,
                                      dto.RenderHTML(GlobalStringResource.Description,
                                                     RenderOption.NewLine));
                }
            }

            return(new Phrase(new Chunk(html.ToString(),
                                        FontFactory.GetFont(GlobalStringResource.Font_Arial, 10))));
        }
        public static bool IsValidForShow(int type, int id)
        {
            bool                   result       = false;
            EntityData             data         = new EntityData();
            MenuFilterSection      menuFilter   = MenuFilterSection.GetConfig();
            List <GroupMenuFilter> groupFilters = menuFilter.GetGroupMenuFilters();

            if (groupFilters.FirstOrDefault(y => y.TargetType == type) != null)
            {
                GroupMenuFilter filter = groupFilters.FirstOrDefault(y => y.TargetType == type);

                EntityDTO dto = data.GetOneEntity(id);

                if (dto != null)
                {
                    dto.ExtractProperties();
                    string category = dto.RenderHTML(filter.PropertyName, RenderOption.None);
                    if (category == filter.PropertyValue)
                    {
                        result = true;
                    }
                }
            }
            else
            {
                result = true;
            }
            return(result);
        }
Exemplo n.º 11
0
        private PdfContentParameter CreateRolesAndResponsibility()
        {
            List <EntityDTO> rolesAndResp = entityData.GetRolesAndResponsibilities(this.dto.ID);
            PdfPTable        t            = null;

            t = CreateTable(2, true);
            t.AddCell(
                new PdfPCell()
            {
                Phrase = new Phrase(
                    GlobalStringResource.Presenter_ReportRolesAndResponsibilities,
                    FontFactory.GetFont(GlobalStringResource.Font_Arial, 18, 1))
                {
                },
                Border        = 0,
                Colspan       = 2,
                PaddingBottom = 5,
            }
                );

            t.AddCell(
                CreateHeaderCell(GlobalStringResource.Role)
                );
            t.AddCell(
                CreateHeaderCell(GlobalStringResource.Responsibilities)
                );

            if (rolesAndResp.Count > 0)
            {
                foreach (EntityDTO related in rolesAndResp)
                {
                    related.ExtractProperties();
                    EntityDTO descriptionDto = entityData.GetRolesDescription(related.ID);
                    string    description    = string.Empty;
                    if (descriptionDto != null)
                    {
                        descriptionDto.ExtractProperties();
                        description = descriptionDto.RenderHTML(
                            GlobalStringResource.Description,
                            RenderOption.NewLine);
                    }

                    t.AddCell(
                        CreatePlainContentCell(related.RenderHTML(
                                                   GlobalStringResource.Role, RenderOption.NewLine))
                        );
                    t.AddCell(
                        CreatePlainContentCell(description)
                        );
                }
            }
            t.AddCell(CreatePaddingCell(2, 15));
            return(new PdfContentParameter()
            {
                Table = t,
                Header = GlobalStringResource.Presenter_ReportRolesAndResponsibilities,
            });
        }
Exemplo n.º 12
0
        public override object BuildDetail(EntityDTO dto)
        {
            ReviewerApproverPositionDetailDTO detail = new ReviewerApproverPositionDetailDTO();

            detail.AssignedTo          = dto.RenderHTML(GlobalStringResource.Assignedto, RenderOption.Break);
            detail.Description         = BuildDescription(dto);
            detail.ReferencedDocuments = BuildReferencedDocuments(dto);
            return(detail);
        }
Exemplo n.º 13
0
        public virtual PdfContentParameter CreateTitlePage(EntityDTO dto)
        {
            PdfPTable table           = CreateTable(2, true);
            Font      helvetica14Bold = FontFactory.GetFont(FontFactory.HELVETICA, 14);


            PdfPCell officialUseCell = new PdfPCell();

            officialUseCell.Colspan       = 2;
            officialUseCell.Phrase        = new Phrase(GlobalStringResource.ForOfficialUseOnly, helvetica14Bold);
            officialUseCell.Border        = 0;
            officialUseCell.PaddingTop    = 20;
            officialUseCell.PaddingBottom = 10;

            table.AddCell(officialUseCell);

            Font h1 = FontFactory.GetFont(FontFactory.HELVETICA_BOLD, 28);

            PdfPCell titleCell = new PdfPCell();

            titleCell.Border  = 0;
            titleCell.Phrase  = new Phrase(dto.Name, h1);
            titleCell.Colspan = 2;
            table.AddCell(titleCell);

            PdfPCell spaceCell = new PdfPCell();

            spaceCell.Colspan       = 2;
            spaceCell.Border        = 0;
            spaceCell.PaddingBottom = 200;

            table.AddCell(spaceCell);

            table.AddCell(CreateHeaderCell(GlobalStringResource.DocumentOwners));
            table.AddCell(CreateHeaderCell(GlobalStringResource.Authors));
            table.AddCell(CreatePlainContentCell(dto.RenderHTML(GlobalStringResource.DocumentOwners, ADB.SA.Reports.Entities.Enums.RenderOption.NewLine)));
            table.AddCell(CreatePlainContentCell(dto.RenderHTML(GlobalStringResource.Authors, ADB.SA.Reports.Entities.Enums.RenderOption.NewLine)));

            return(new PdfContentParameter()
            {
                Table = table, Header = string.Empty,
            });
        }
        public override object BuildDetail(EntityDTO dto)
        {
            AcronymDetailDTO detail = new AcronymDetailDTO();

            detail.Title = dto.Name;
            detail.AbbreviationDescription = dto.RenderHTML(GlobalStringResource.AbbreviationDescription, RenderOption.Break);
            detail.Description             = BuildDescription(dto);
            detail.ReferencedDocuments     = BuildReferencedDocuments(dto);
            return(detail);
        }
        private bool IsSucceeding(EntityDTO dto)
        {
            dto.ExtractProperties();
            string e_type = dto.RenderHTML(GlobalStringResource.EventType, ADB.SA.Reports.Entities.Enums.RenderOption.None);

            if (e_type.ToLower().Trim() == "succeeding")
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 16
0
        public static string RenderHTMLAsAnchor(this EntityDTO dto, string label, string id, RenderOption option, bool isPopup)
        {
            string html = dto.RenderHTML(id, RenderOption.None);
            string additionalProperty = string.Empty;

            if (isPopup)
            {
                additionalProperty = "target=\"_blank\"";
            }
            return(string.Format("<a class=\"obvious-link\"  href=\"{0}\" {1}>{2}</a>", html, additionalProperty, label));
        }
Exemplo n.º 17
0
        protected override string BuildDiagramDescription(EntityDTO dto)
        {
            dto.ExtractProperties();
            string description = dto.RenderHTML("Description", ADB.SA.Reports.Entities.Enums.RenderOption.Break);

            if (string.IsNullOrEmpty(description))
            {
                description = "There is no description for this diagram.";
            }

            return(description);
        }
        public override object BuildDetail(EntityDTO dto)
        {
            RoleDetailDTO detail      = new RoleDetailDTO();
            EntityData    data        = new EntityData();
            EntityDTO     description = data.GetRoleDetail(dto.ID);

            description.ExtractProperties();

            detail.Responsibilities    = description.RenderHTML(GlobalStringResource.Responsibilities, RenderOption.Break);
            detail.Description         = BuildDescription(dto);
            detail.ReferencedDocuments = BuildReferencedDocuments(dto);
            return(detail);
        }
Exemplo n.º 19
0
        private PdfContentParameter CreateProcessDescription()
        {
            PdfPTable t = CreateTable(1, true);

            t.AddCell(
                CreateHeaderCell(GlobalStringResource.Report_ProcessDescription_3)
                );
            PdfPCell cell = CreatePlainContentCell(
                dto.RenderHTML(GlobalStringResource.ProcessDescription,
                               RenderOption.NewLine));

            cell.Border = 0;
            t.AddCell(
                cell
                );

            t.AddCell(CreatePaddingCell(1, 15));
            return(new PdfContentParameter()
            {
                Table = t,
                Header = GlobalStringResource.Report_ProcessDescription_3
            });
        }
        protected override string BuildDiagramDescription(EntityDTO dto)
        {
            HtmlTable t = new HtmlTable(2, 0, "grid", new int[] { 15, 85 });

            dto.ExtractProperties();

            //t.AddHeader(GlobalStringResource.SubProcessDescription, 2);

            t.AddHeader("&emsp;", 2);

            t.AddCell(GlobalStringResource.Objective);
            t.AddCell(dto.RenderHTML(GlobalStringResource.Description, RenderOption.Paragraph));

            t.AddCell(GlobalStringResource.DocumentOwners);
            t.AddCell(dto.RenderHTML(GlobalStringResource.DocumentOwners, RenderOption.Break));

            t.AddCell(GlobalStringResource.FrameworkReference);
            t.AddCell(dto.RenderHTML(GlobalStringResource.FrameworkReference, RenderOption.Break));

            t.AddCell(GlobalStringResource.InternalReference);
            t.AddCell(dto.RenderHTML(GlobalStringResource.InternalReference, RenderOption.Break));

            return(t.EndHtmlTable());
        }
Exemplo n.º 21
0
        private ProcessDescription ParentProcessDescription(int id)
        {
            EntityDTO          parentDto = entityData.GetParentDiagram(id);
            ProcessDescription pd        = new ProcessDescription();

            if (parentDto != null)
            {
                parentDto.ExtractProperties();

                pd.ProcessName = parentDto.RenderAsLink();
                pd.Description = parentDto.RenderHTML(GlobalStringResource.ProcessDescription, RenderOption.Paragraph);
            }

            return(pd);
        }
Exemplo n.º 22
0
        protected virtual PdfContentParameter CreateApprovers(EntityDTO dto)
        {
            //TODO: Must be checked against the related entities in the database
            PdfPTable t = CreateTable(4, true);

            float[] widths = new float[] { 2f, 5f, 1f, 1f };
            t.SetWidths(widths);
            t.AddCell(CreateHeader3(GlobalStringResource.Approvers, 4));

            t.AddCell(CreateHeaderCell(GlobalStringResource.Name));
            t.AddCell(CreateHeaderCell(GlobalStringResource.Position));
            t.AddCell(CreateHeaderCell(GlobalStringResource.Date));
            t.AddCell(CreateHeaderCell(GlobalStringResource.Signature));

            EntityData entityData = new EntityData();

            List <string>    approvers    = RemoveBelongsToOrg(dto.GetPropertyList(GlobalStringResource.Approvers));
            List <EntityDTO> approverList = entityData.GetReviewersAndApprovers(dto.ID);

            if (approvers != null && approvers.Count > 0)
            {
                foreach (string approver in approvers)
                {
                    EntityDTO app = approverList.Find(x => x.Name == approver.Trim());
                    if (app == null)
                    {
                        t.AddCell(string.Empty);
                    }
                    else
                    {
                        app.ExtractProperties();
                        t.AddCell(new Phrase(app.RenderHTML("Assigned to", RenderOption.None), FontFactory.GetFont(FontFactory.HELVETICA, 8)));
                    }
                    t.AddCell(new Phrase(approver, FontFactory.GetFont(FontFactory.HELVETICA, 8)));
                    t.AddCell(string.Empty);
                    t.AddCell(string.Empty);
                }
            }

            t.AddCell(CreatePaddingCell(4, 15));
            return(new PdfContentParameter()
            {
                Table = t
            });
        }
        private string BuildParentProcessDescription(int id)
        {
            HtmlTable t         = new HtmlTable(2, 0, "grid");
            EntityDTO parentDto = entityData.GetParentDiagram(id);

            if (parentDto != null)
            {
                parentDto.ExtractProperties();

                //t.AddHeader(GlobalStringResource.Process, 2);

                t.AddHeader(GlobalStringResource.ProcessName);
                t.AddHeader(GlobalStringResource.Description);

                t.AddCell(parentDto.RenderAsLink());
                t.AddCell(parentDto.RenderHTML(GlobalStringResource.ProcessDescription, RenderOption.Paragraph));
            }

            return(t.EndHtmlTable());
        }
        private void CreateMainTable(HtmlTable t, EntityDTO dto)
        {
            if (dto != null)
            {
                dto.ExtractProperties();

                string personName = dto.RenderHTML(GlobalStringResource.Assignedto, RenderOption.None);
                if (!string.IsNullOrEmpty(personName))
                {
                    EntityDTO relatedPerson = entityData.GetOneEntityByNameAndType(personName, 663);
                    if (relatedPerson != null)
                    {
                        relatedPerson.ExtractProperties();
                        personName = relatedPerson.RenderAsPopupLink();
                    }
                }
                t.AddCell(personName);
                t.AddCell(dto.RenderAsPopupLink());
            }
        }
        private RiskDetailDTO CreateRiskDetails(EntityDTO control)
        {
            RiskDetailDTO detail = new RiskDetailDTO();

            EntityDTO relatedRisk = entityData.GetControlRelatedRisk(control.ID);

            if (relatedRisk != null)
            {
                relatedRisk.ExtractProperties();

                //Consequence
                detail.Consequence = relatedRisk.RenderHTML("Consequence", RenderOption.Break);

                //Completeness
                detail.Completeness = relatedRisk.RenderHTML("Completeness", RenderOption.Break);

                //Existence/Occurrence
                detail.ExistenceOccurrence = relatedRisk.RenderHTML("Existence/Occurrence", RenderOption.Break);

                //Valuation or Allocation
                detail.ValuationOrAllocation = relatedRisk.RenderHTML("Valuation or Allocation", RenderOption.Break);

                //Rights and Obligations
                detail.RightsAndObligations = relatedRisk.RenderHTML("Rights and Obligations", RenderOption.Break);

                //Presentation and Disclosure
                detail.PresentationAndDisclosure = relatedRisk.RenderHTML("Presentation and Disclosure", RenderOption.Break);

                //Description
                detail.Description = relatedRisk.RenderHTML("Description", RenderOption.Break);

                //Reference Documents
                detail.ReferencedDocuments = relatedRisk.RenderHTML("Reference Documents", RenderOption.Break);
            }
            return(detail);
        }
        public void RenderDetail(int id)
        {
            if (this.cache.GetData("asiscontent") != null)
            {
                string cachedContent = CacheHelper.GetFromCacheWithCheck <string>("asiscontent");
                this.view.RenderContent(cachedContent);
                return;
            }

            AsIsData   asIsData   = new AsIsData();
            EntityData entityData = new EntityData();
            Dictionary <string, List <AsIsItemEntity> > sectionList = asIsData.GetSections();

            StringBuilder html = new StringBuilder();

            EntityDTO        mainDto = entityData.GetOneEntity(id);
            List <EntityDTO> symbols = asIsData.GetAllAsIsSymbols(id);

            foreach (EntityDTO symbol in symbols)
            {
                EntityDTO defDto = entityData.GetRelatedDefinition(symbol.ID);

                //04-07-2013
                //Added this check in order to ignore
                //symbols which doesnt have definition
                if (defDto == null)
                {
                    continue;
                }

                defDto.ExtractProperties();

                string group = defDto.RenderHTML(GlobalStringResource.ProcessModelGroup,
                                                 RenderOption.None);
                int    itemorder = 0;
                string order     = defDto.RenderHTML("Item Order",
                                                     RenderOption.None);

                if (!string.IsNullOrEmpty(order))
                {
                    int.TryParse(order, out itemorder);
                }

                List <EntityDTO> relatedDiagramDto = entityData.GetChildDiagrams(symbol.ID);

                if (sectionList.ContainsKey(group))
                {
                    sectionList[group].Add(
                        new AsIsItemEntity()
                    {
                        DefinitionDTO = defDto,
                        DiagramDTO    = relatedDiagramDto,
                        ItemOrder     = itemorder
                    });
                }
            }


            /*
             * Arrange the items per group
             * if the item order is 0 then group the zeroes the arrange them alphabetically
             * then group the ones with orders then arrange them
             * clear the original list
             * append the zeroes first then the ordered
             */
            foreach (KeyValuePair <string, List <AsIsItemEntity> > section in sectionList)
            {
                var list   = section.Value;
                var zeroes = list.Where(c => c.ItemOrder == 0)
                             .OrderBy(d => d.DefinitionDTO.Name).ToList();
                var ordered = list.Where(x => x.ItemOrder > 0)
                              .OrderBy(y => y.ItemOrder).ToList();
                section.Value.Clear();
                section.Value.AddRange(zeroes);
                section.Value.AddRange(ordered);
            }

            html.Append(string.Empty);
            html.Append(Resources.Split);
            html.Append(mainDto.Name);
            html.Append(Resources.Split);

            if (ShowInformationBox())
            {
                //adds the info box on the homepage
                html.AppendFormat("<div id=\"home-info-box\" class=\"infoBox asis-info\"><a onclick=\"SetCookie('hide_home_box','1','30');remove_element('home-info-box');\" class=\"home-close ui-icon ui-icon-closethick\">Close</a>{0}</div>", AppSettingsReader.GetValue("HOME_DESCRIPTION"));
            }

            AsIsDiagramSection diagrams = AsIsDiagramSection.GetConfig();

            RenderOuterDivs(html, diagrams.LeftGroup, sectionList);
            RenderOuterDivs(html, diagrams.RightGroup, sectionList);
            html.AppendFormat(GlobalStringResource.Presenter_ReportId_HiddenField, id);
            CacheHelper.AddToCacheWithCheck("asiscontent", html.ToString());
            view.RenderContent(html.ToString());
        }
Exemplo n.º 27
0
        public static string RenderDetailAsLink(this EntityDTO dto, string name, RenderOption option)
        {
            StringBuilder html = new StringBuilder();

            html.Append(string.Format("<a class=\"obvious-link\" onclick=\"getDetailAjax({0},'{1}');\">{2}</a>", dto.ID, dto.RenderHTML(name, option), dto.RenderHTML(name, option)));
            return(html.ToString());
        }
Exemplo n.º 28
0
        public static string RenderAsLink(this EntityDTO dto, int id, string name, RenderOption option)
        {
            StringBuilder html = new StringBuilder();

            html.Append(string.Format("<a class=\"obvious-link\" href=\"Default.aspx?id={0}\">{1}</a>", id, dto.RenderHTML(name, option)));
            return(html.ToString());
        }
Exemplo n.º 29
0
        /// <summary>
        /// Renders into a href.
        /// </summary>
        /// <param name="id">Property name.</param>
        /// <param name="option">Render option.</param>
        /// <returns>The html markup for the link.</returns>
        public static string RenderHTMLAsAnchor(this EntityDTO dto, string id, RenderOption option)
        {
            string html = dto.RenderHTML(id, RenderOption.None);

            return(string.Format("<a  class=\"obvious-link\"  href=\"{0}\" >{1}</a>", html, html));
        }
        protected virtual string BuildReferencedDocuments(EntityDTO dto)
        {
            string link = dto.RenderHTML(GlobalStringResource.ReferenceDocuments, RenderOption.NewLine);

            return(dto.RenderMultipleLinks(link, true));
        }