Source

main / Source / WebClient / Web.Client / Extensions / DocumentDetailExtension.cs

Full commit
Naethra D 3ee1b94 
























using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DataUp.Web.Client.ViewModel;
using DataUp.Web.BizLogic;

namespace DataUp.Web.Client
{
    /// <summary>
    /// Extension for DocumentDetail object that represents a document.
    /// </summary>
    public static class DocumentDetailExtension
    {
        public static void SetValuesFrom(this DocumentDetail documentDetail, DocumentDetailViewModel viewModel)
        {
            if (documentDetail != null && viewModel != null)
            {
                documentDetail.Id = viewModel.DocumentId;
                documentDetail.Citation = viewModel.Citation.Citation;
                documentDetail.Identifier = viewModel.Citation.Identifier;
                documentDetail.Title = viewModel.Citation.Title;
            }
        }
    }
}