Ejemplo n.º 1
0
        public void PopulateImportantNotices(Enums.Statutory statutory, string importantNoticesUrl, string privacyStatementUrl, string fsgUrl, string termsOfEngagementUrl)
        {
            if (Document.MoveCursorToStartOfBookmark(Constants.WordBookmarks.ImportantNotes))
            {
                Document.UpdateOrCreatePropertyValue(Constants.WordDocumentProperties.StatutoryInformation,
                                                     statutory.ToString());
                //insert stat notices
                Document.InsertFile(importantNoticesUrl); //in settings
                Document.InsertPageBreak();

                //insert pivacy statement
                Document.InsertFile(privacyStatementUrl); //in settings

                switch (statutory)
                {
                case Enums.Statutory.Retail:
                {
                    Document.InsertPageBreak();
                    Document.InsertFile(fsgUrl);         //in settings
                    break;
                }

                case Enums.Statutory.Wholesale:
                {
                    Document.InsertPageBreak();
                    Document.InsertFile(termsOfEngagementUrl);         //in settings
                    break;
                }

                case Enums.Statutory.WholesaleWithRetail:
                {
                    Document.InsertPageBreak();
                    Document.InsertFile(fsgUrl);               //in settings
                    Document.InsertPageBreak();
                    Document.InsertFile(termsOfEngagementUrl); //in settings
                    break;
                }
                }
            }
        }
        public void PopulateImportantNotices(Enums.Statutory statutory, string importantNoticesUrl, string privacyStatementUrl, string fsgUrl, string termsOfEngagementUrl)
        {
            if (!Document.MoveCursorToStartOfBookmark(Constants.WordBookmarks.ImportantNotes))
            {
                return;
            }

            Document.UpdateOrCreatePropertyValue(Constants.WordDocumentProperties.StatutoryInformation, statutory.ToString());

            //insert stat notices
            Document.InsertFile(importantNoticesUrl); //in settings
            Document.InsertPageBreak();



            switch (statutory)
            {
            case Enums.Statutory.Retail:
            {
                Document.InsertFile(fsgUrl);         //in settings
                break;
            }

            case Enums.Statutory.Wholesale:
            {
                //insert pivacy statement
                //Document.InsertFile(privacyStatementUrl); //compliance rule change, privacy not required ever.
                //Document.InsertPageBreak();

                Document.InsertFile(termsOfEngagementUrl);         //in settings
                break;
            }

            case Enums.Statutory.WholesaleWithRetail:
            {
                //insert pivacy statement
                //Document.InsertFile(privacyStatementUrl); //compliance rule change, privacy not required ever.
                //Document.InsertPageBreak();

                Document.InsertFile(fsgUrl);         //in settings

                Document.InsertPageBreak();
                Document.InsertFile(termsOfEngagementUrl);         //in settings
                break;
            }
            }


            //    if (Document.MoveCursorToStartOfBookmark(Constants.WordBookmarks.ImportantNotes))
            //    {
            //        Document.UpdateOrCreatePropertyValue(Constants.WordDocumentProperties.StatutoryInformation,
            //                                             statutory.ToString());
            //        //insert stat notices
            //        Document.InsertFile(importantNoticesUrl); //in settings
            //        Document.InsertPageBreak();

            //        //insert pivacy statement
            //        Document.InsertFile(privacyStatementUrl); //in settings

            //        switch (statutory)
            //        {
            //            case Enums.Statutory.Retail:
            //                {
            //                    Document.InsertPageBreak();
            //                    Document.InsertFile(fsgUrl); //in settings
            //                    break;
            //                }
            //            case Enums.Statutory.Wholesale:
            //                {
            //                    Document.InsertPageBreak();
            //                    Document.InsertFile(termsOfEngagementUrl); //in settings
            //                    break;
            //                }
            //            case Enums.Statutory.WholesaleWithRetail:
            //                {
            //                    Document.InsertPageBreak();
            //                    Document.InsertFile(fsgUrl); //in settings
            //                    Document.InsertPageBreak();
            //                    Document.InsertFile(termsOfEngagementUrl); //in settings
            //                    break;
            //                }
            //        }
            //    }
        }