コード例 #1
0
        public ActionResult Trademark(int rowCount                = 25, int page        = 1, string keyword = null,
                                      string name                 = null, string office = null, string officeStatus = null, string trademarkNumber = null, string figurative = null, string brand = null,
                                      string figurativeURL        = null, string originalOffice       = null, string languageFiling      = null, string languageSecond   = null, string geography = null,
                                      string involvedInRevocation = null, string bigFootGroupOwned    = null, string seniorityUsed       = null, string revocationTarget = null, string openSimilarityResearchTask = null,
                                      string oppositionResearch   = null, string researcherName       = null, string markUse             = null, string TMWebsite    = null, string competingMarks = null,
                                      string ownerWebsite         = null, string cancellationStrategy = null, string comWebsite          = null, string ownerDefense = null, string BFStrategy     = null,
                                      string nameValue            = null, string invalidityNumber     = null, string invalidityApplicant = null, string invalidityActionOutcome = null, string letterReference = null,
                                      string letterOrigin         = null, string letterSendingMethod  = null, string letterOutcome       = null)
        {
            var searchResultObject = new VMSearchResultObject <Trademark> {
                Caption = "Trademark"
            };
            var startIndex = (page - 1) * rowCount;

            var query = TrademarkUtils.BuildQuery(startIndex, rowCount, keyword ??
                                                  name, office, officeStatus, trademarkNumber, figurative, brand, figurativeURL, originalOffice, languageFiling, languageSecond, geography,
                                                  involvedInRevocation, bigFootGroupOwned, seniorityUsed, revocationTarget, openSimilarityResearchTask, oppositionResearch, researcherName,
                                                  markUse, TMWebsite, competingMarks, ownerWebsite, cancellationStrategy, comWebsite, ownerDefense, BFStrategy, nameValue, invalidityNumber,
                                                  invalidityApplicant, invalidityActionOutcome, letterReference, letterOrigin, letterSendingMethod, letterOutcome);
            var trademarks = this._managementTrademarkService.GetByQuery(query.Item1, query.Item2, out int total);

            searchResultObject.ObjectResult = new VMPageResult <Trademark>
            {
                StartIndex = startIndex,
                RowCount   = rowCount,
                Page       = page,
                Total      = total,
                Records    = trademarks
            };

            if (!string.IsNullOrWhiteSpace(keyword))
            {
                var searchResultWrapperList = this._searchService.Search(name ?? keyword);

                searchResultObject.SearchResult = new VMSearchResult
                {
                    Table = searchResultWrapperList
                };
            }

            ViewBag.Keyword         = keyword ?? name;
            ViewBag.IsAdvanceSearch = string.IsNullOrWhiteSpace(keyword);

            return(View(searchResultObject));
        }
コード例 #2
0
        public FileContentResult TrademarkExport(string keyword              = null,
                                                 string name                 = null, string office = null, string officeStatus = null, string trademarkNumber = null, string figurative = null, string brand = null,
                                                 string figurativeURL        = null, string originalOffice       = null, string languageFiling      = null, string languageSecond   = null, string geography = null,
                                                 string involvedInRevocation = null, string bigFootGroupOwned    = null, string seniorityUsed       = null, string revocationTarget = null, string openSimilarityResearchTask = null,
                                                 string oppositionResearch   = null, string researcherName       = null, string markUse             = null, string TMWebsite    = null, string competingMarks = null,
                                                 string ownerWebsite         = null, string cancellationStrategy = null, string comWebsite          = null, string ownerDefense = null, string BFStrategy     = null,
                                                 string nameValue            = null, string invalidityNumber     = null, string invalidityApplicant = null, string invalidityActionOutcome = null, string letterReference = null,
                                                 string letterOrigin         = null, string letterSendingMethod  = null, string letterOutcome       = null)
        {
            var query = TrademarkUtils.BuildExportQuery(keyword ??
                                                        name, office, officeStatus, trademarkNumber, figurative, brand, figurativeURL, originalOffice, languageFiling, languageSecond, geography,
                                                        involvedInRevocation, bigFootGroupOwned, seniorityUsed, revocationTarget, openSimilarityResearchTask, oppositionResearch, researcherName,
                                                        markUse, TMWebsite, competingMarks, ownerWebsite, cancellationStrategy, comWebsite, ownerDefense, BFStrategy, nameValue, invalidityNumber,
                                                        invalidityApplicant, invalidityActionOutcome, letterReference, letterOrigin, letterSendingMethod, letterOutcome);

            var file = _trademarkService.Export(query);

            return(File(new UTF8Encoding().GetBytes(file.ToString()), "text/csv", $"Export-Trademark-{StringUtils.GetCurrentDateTimeAsString()}.csv"));
        }