public ActionResult Create(CreateStandardGeneticLineForm form, FormCollection collection)
 {
     if (!ModelState.IsValid)
     {
         ViewBag.Operation = "Create";
         return View(form).WithError("Se ha producido un error. Por favor valide que los datos ingresados sean correctos");
     }
     form.StandardGeneticLine.Standard.AllowDecimal = collection["StandardGeneticLine.Standard.AllowDecimal"] == "True";
     StandardGeneticLine item = form.ToStandardGeneticLine();
     _service.Create(item);
     return Redirect("/StandardGeneticLine/Index/" + form.StandardGeneticLine.GeneticLine.Id).WithSuccess("El estandar se ha creado correctamente");
 }
        public ActionResult Create(Guid geneticLineId, Guid standardId)
        {
            var geneticLine = _geneticLineService.GetById(geneticLineId);
            var standard = _standardService.GetById(standardId);
            ViewBag.Operation = "Create";

            var model = new CreateStandardGeneticLineForm()
            {
                StandardGeneticLine = new StandardGeneticLine()
                {
                    GeneticLine = geneticLine,
                    Standard = standard
                }
            };
            model.GenerateItems();
            return View(model);
        }
        public ActionResult Edit(Guid id)
        {
            var item = _service.GetById(id);
            ViewBag.Operation = "Edit";

            var model = new CreateStandardGeneticLineForm()
            {
                StandardGeneticLine = item,
            };
            model.GenerateItems();
            return View("Create", model);
        }
 public ActionResult Detail(Guid id)
 {
     var item = _service.GetById(id);
     var model = new CreateStandardGeneticLineForm()
     {
         StandardGeneticLine = item
     };
     model.GenerateItems();
     return View(model);
 }