public class VM_LogoImageModel : ModelBase { //private ILogoImageRepository LogoImageRepo = null; #region Table Attribute LogoImage public int ImageId { get; set; } public string FileOriginalName { get; set; } public string FileName { get; set; } public string Title { get; set; } public Nullable<bool> IsDeleted { get; set; } public Nullable<bool> IsActive { get; set; } public Nullable<int> LogoType { get; set; } public Nullable<int> FileExtension { get; set; } public int CROID { get; set; } //public VM_CRO RMO_CRO { get; set; } #endregion } #endregion public class CombinedLogoModel { public IEnumerable<vm_logoimagemodel> LogoImageModels { get; set; } public VM_LogoImageModel SingleLogoImageModel { get; set; } } public class VM_CROPortalCOnfiguration { public CombinedLogoModel LogoModel {get;set;} } public ActionResult UploadImage() { var AllLogos = logoImage.GetAllLogos(); var AllLogosViewModels = AllLogos.Select(Mapper.MapToVM_LogoImageModel).ToList(); var LastUploadedLogos = VM_LogoImageModel.GetLastUploadedLogos(AllLogosViewModels); //some other code var CombinedViewModel = new CombinedLogoModel { LogoImageModels = LastUploadedLogos, SingleLogoImageModel=LastUploadedLogos.FirstOrDefault() }; var CroPortalCombined = new VM_CROPortalConfiguration { LogoModel = CombinedViewModel }; return View("UploadImage", layout, CroPortalCombined); }
@Html.Partial("~/Views/LogoImage/UploadImage.cshtml",Model)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)