Example #1
0
        public ActionResult ShowTechnicalReports(string targetControllerName, string targetActionName)
        {
            ViewBag.Locations = db.Locations.ToList();
            ChooseFactoryVM factoryvm = new ChooseFactoryVM();

            factoryvm.TargetControllerName = targetControllerName;
            factoryvm.TargetActionName     = targetActionName;
            return(View(factoryvm));
        }
Example #2
0
 public ActionResult Details(ChooseFactoryVM chooseFactoryVM)
 {
     try
     {
         var factory = db.Factory11.FirstOrDefault(p => p.Id == chooseFactoryVM.FactoryId);
         if (factory != null)
         {
             return(RedirectToAction(chooseFactoryVM.TargetActionName, chooseFactoryVM.TargetControllerName, new { Id = factory.Id }));
         }
         else
         {
             return(View());
         }
     }
     catch
     {
         return(View());
     }
 }