Пример #1
0
        public IssueViewModel(IIssueItem issue)
        {
            Id             = issue.Id;
            Assignee       = issue.Assignee;
            Created        = issue.Created;
            ResolvedOn     = issue.ResolvedOn;
            Esamina        = issue.Esamina;
            NomeGruppoLife = issue.NomeGruppoLife;
            Priority       = issue.Priority;
            Project        = issue.Project;
            Summary        = issue.Summary;
            DigitalAgency  = issue.DigitalAgency.HasValue && issue.DigitalAgency.Value;
            Status         = issue.Status;
            IssueType      = issue.IssueType;

            // Email
            Email = Assignee + "@Allianz.it";
            Url   = Conf.Url + "browse/" + Id;
        }
Пример #2
0
        public void SetPolygraphicItem(string line, PolygraphicItem item)
        {
            string[] itemsStrings = line.Split('-');
            int      count        = 0;

            if (item is IAuthoredItem)
            {
                IAuthoredItem authoredItem = item as IAuthoredItem;
                string[]      authors      = itemsStrings[count].Split(',');
                if (authors.Length == 1)
                {
                    authoredItem.Authors.Add(itemsStrings[count]);
                }
                if (authors.Length > 1)
                {
                    foreach (string author in authors)
                    {
                        authoredItem.Authors.Add(author);
                    }
                }
                count++;
            }
            if (item is PolygraphicItem)
            {
                item.Title = itemsStrings[count++];
            }
            if (item is IIssueItem)
            {
                IIssueItem magazine = item as IIssueItem;
                magazine.IssueNumber = itemsStrings[count++];
            }
            if (item is IPeriodicalItem)
            {
                IPeriodicalItem newspaper = item as IPeriodicalItem;
                newspaper.Periodical = itemsStrings[count++];
            }
            if (item is IPage)
            {
                IPage book = item as IPage;
                book.Pages = Convert.ToInt32(itemsStrings[count++]);
            }
        }
Пример #3
0
        public async Task <ActionResult> Detail(string id)
        {
            IIssueItem issue = await Service.Get(id);

            return(View(new IssueViewModel(issue)));
        }