Beispiel #1
0
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                LegajoItemComponent legajoItemComponent = new LegajoItemComponent();
                LegajoItem          item = new LegajoItem();
                item.item.Id         = int.Parse(collection.Get("item.item"));
                item.ReciboSueldo.Id = int.Parse(collection.Get("ReciboSueldo.Id"));
                legajoItemComponent.Agregar(item);
                // TODO: Add insert logic here

                return(RedirectToAction("Index", "ReciboSueldo", new { id = item.ReciboSueldo.Id }));
            }
            catch (Exception e)
            {
                return(View());
            }
        }
Beispiel #2
0
        // GET: LegajoItem/Create
        public ActionResult Create(int id)
        {
            LegajoItem item = new LegajoItem();

            item.ReciboSueldo.Id = id;
            LegajoItemComponent legajoItemComponent = new LegajoItemComponent();
            LegajoItem          result = new LegajoItem();

            result = legajoItemComponent.ObtenerFaltantes(item);
            result.ReciboSueldo.Id = id;
            result.ListaItem.Select(y =>
                                    new
            {
                y.Id,
                y.item
            });

            ViewBag.ListaCategoria = new SelectList(result.ListaItem, "Id", "item");



            return(View(result));
        }