public HenDepreciation Get(Guid id)
        {
            var depreciation = service.Get(id);

            if (depreciation == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            return(depreciation);
        }
        private void OnLoad(object param)
        {
            IsNew = false;

            Models.HenDepreciation initialValues = null;

            try
            {
                initialValues = service.Get((Guid)param);
            }
            catch (Exception ex)
            {
                return;
            }

            Id   = initialValues.Id;
            Date = initialValues.Date;
            var loadedDatails = Mapper.Map <List <Models.HenDepreciationDetail>, List <HenDepreciationDetailViewModel> >(initialValues.Details);

            Details = new ObservableCollection <HenDepreciationDetailViewModel>(loadedDatails);
        }