Пример #1
0
        // GET: Salida/Edit/5
        public ActionResult Edit(int id)
        {
            List <Tabla> lst = null;

            using (ModelEntities db = new ModelEntities())
            {
                lst = (from d in db.Empleados
                       select new Tabla
                {
                    Nombre = d.Nombre
                }).ToList();
            };

            List <SelectListItem> items = lst.ConvertAll(d =>
            {
                return(new SelectListItem()
                {
                    Text = d.Nombre.ToString(),
                    Selected = false
                });
            });

            ViewBag.items = items;

            var sal = CapaNegocio.GetSalida(id);

            return(View(sal));
        }
Пример #2
0
        // GET: Salida/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest));
            }

            var sal = CapaNegocio.GetSalida(id.Value);

            return(View(sal));
        }