Example #1
0
        public ActionResult RefForEmp(int id)
        {
            DBReferenciaEmp dbReferenciaEmp = new DBReferenciaEmp();
            ReferenciaEmp   refemp          = new ReferenciaEmp(dbReferenciaEmp);
            var             lista           = refemp.FindForEmp(id);

            return(View(lista));
        }
Example #2
0
        public ActionResult Delete(int id)
        {
            DBReferenciaEmp dbReferenciaEmp = new DBReferenciaEmp();
            ReferenciaEmp   refemp          = new ReferenciaEmp(dbReferenciaEmp);

            refemp.Delete(id);
            return(RedirectToAction("Index", "Empleado"));
        }
Example #3
0
        public ActionResult Edit(ReferenciaEmpViewModels datos)
        {
            DBReferenciaEmp dbReferenciaEmp = new DBReferenciaEmp();
            ReferenciaEmp   refemp          = new ReferenciaEmp(dbReferenciaEmp);

            refemp.Update(datos);
            return(RedirectToAction("Index", "Empleado"));
        }
Example #4
0
        public ActionResult Index()
        {
            DBReferenciaEmp dbReferenciaEmp = new DBReferenciaEmp();
            ReferenciaEmp   refemp          = new ReferenciaEmp(dbReferenciaEmp);
            var             listarefemp     = refemp.SelectAll();

            return(View(listarefemp));
        }
Example #5
0
        public ActionResult Edit(int id)
        {
            DBReferenciaEmp dbReferenciaEmp = new DBReferenciaEmp();
            ReferenciaEmp   refemp          = new ReferenciaEmp(dbReferenciaEmp);

            var referenciaemp = refemp.SelectForId(id);

            return(View(referenciaemp));
        }
Example #6
0
        public ActionResult Create(ReferenciaEmpViewModels datos)
        {
            ViewBag.Title = "Ingresar Referencia de Empleado";

            DBReferenciaEmp dbReferenciaEmp = new DBReferenciaEmp();
            ReferenciaEmp   refemp          = new ReferenciaEmp(dbReferenciaEmp);

            datos.id_emp = Convert.ToInt16(TempData["EmpId"]);
            refemp.Save(datos);
            return(RedirectToAction("Index", "Empleado"));
        }