Ejemplo n.º 1
0
 // GET: Diets/Create
 public ActionResult Create()
 {
     ViewBag.IdSeason      = new SelectList(_dairyFarmService.GetSeasons(), "IdSeason", "Label");
     ViewBag.IdFoods       = new SelectList(_dairyFarmService.GetFoods(), "IdFood", "Label");
     ViewBag.IdCattleTypes = new SelectList(_dairyFarmService.GetCattleTypes(), "IdCattleType", "Label");
     return(PartialView());
 }
Ejemplo n.º 2
0
 // GET: Herds/Create
 public ActionResult Create(int?id)
 {
     ViewBag.IdCattleType = new SelectList(_dairyFarmService.GetCattleTypes(), "IdCattleType", "Label");
     if (id != null)
     {
         ViewBag.IdCattleType = new SelectList(_dairyFarmService.GetCattleTypes(), "IdCattleType", "Label", id);
     }
     return(PartialView());
 }
Ejemplo n.º 3
0
 // GET: Cattle/Create
 public ActionResult Create(string message, int?state)
 {
     ViewBag.IdCattletype = new SelectList(_dairyFarmService.GetCattleTypes(), "IdCattletype", "Label");
     ViewBag.IdHerd       = new SelectList(new List <Herd>(), "IdHerd", "Label");
     if (message != null)
     {
         ViewBag.Message = message;
         ViewBag.State   = state;
     }
     ViewBag.Sex = new SelectList(Util.Sexe);
     return(View());
 }
Ejemplo n.º 4
0
 // GET: CattleTypes
 public ActionResult Index(string message, int?state)
 {
     if (message != null)
     {
         ViewBag.Message = message;
         ViewBag.State   = state;
     }
     return(View(_dairyFarmService.GetCattleTypes()));
 }