示例#1
0
        public RedirectToRouteResult GPUAddToCompare(
            Comparison <GPUViewModel> comparison,
            System.Guid ProductGuid,
            string returnUrl)
        {
            GPUdto       gpudto = Service.FindGPUByID(ProductGuid);
            GPUViewModel gpu    = Mapper.Map <GPUdto, GPUViewModel>(gpudto);

            if (gpu != null)
            {
                comparison.AddItem(gpu);
            }
            return(RedirectToAction("GPUCompare", new { returnUrl }));
        }
示例#2
0
        public RedirectToRouteResult CPUAddToCompare(
            Comparison <CPUViewModel> comparison,
            System.Guid ProductGuid,
            string returnUrl)
        {
            CPUdto cpudto = Service.FindCPUByID(ProductGuid);
            var    cpu    = Mapper.Map <CPUdto, CPUViewModel>(cpudto);

            if (cpu != null)
            {
                comparison.AddItem(cpu);
            }
            return(RedirectToAction("CPUCompare", new { returnUrl }));
        }