Exemplo n.º 1
0
        public ActionResult Select(Guid id)
        {
            var model = new SelectStandardModel()
            {
                GeneticLineId = id
            };

            return(PartialView(model));
        }
Exemplo n.º 2
0
        public ActionResult Select(SelectStandardModel model)
        {
            var exists = _service.CheckExistance(model.GeneticLineId, model.StandardId);

            if (exists)
            {
                return(Redirect("/StandardGeneticLine/Index/" + model.GeneticLineId).WithError("Ya existe un estandar para la línea genética y etapa seleccionada"));
            }

            var url = String.Format("/StandardGeneticLine/Create?geneticLineId={0}&standardId={1}",
                                    model.GeneticLineId,
                                    model.StandardId);

            return(Redirect(url));
        }