public ActionResult Index() { var sucursal = Session["Sucursal"] as SucursalDatos; if (sucursal != null) { //Se obtienen los departamentos y los puestos que tiene la empresa para la recontratación Departamentos deptos = new Departamentos(); Puestos puestos = new Puestos(); ViewBag.Departamentos = deptos.ObtenerDepartamentosPorEmpresa(sucursal.IdCliente); ViewBag.Puestos = puestos.ObtenerPuestosPorEmpresa(sucursal.IdCliente); ViewBag.IdSucursal = sucursal.IdSucursal; Plantillas pl = new Plantillas(); ViewBag.Plantillas = pl.GetPlantillasByTipo((int)TipoPlantilla.Contrato, sucursal.IdCliente); ViewBag.PlantillasBaja = pl.GetPlantillasByTipo2((int)TipoPlantilla.Baja, sucursal.IdCliente); Empresas emp = new Empresas(); ViewBag.Empresas = emp.GetEmpresasBySucursal(sucursal.IdSucursal); ViewBag.Esquemas = emp.GetEsquemas(); return(View()); } else { return(RedirectToAction("Index", "Home")); } }
public ActionResult ViewDetails(int idContrato = 0) { var sucursal = Session["Sucursal"] as SucursalDatos; var detalle = vaca.GetPeriodoVacacionesV2(idContrato); //var detalle = vaca.GetPeriodoVacaciones(id); Plantillas pl = new Plantillas(); ViewBag.Plantillas = pl.GetPlantillasByTipo2((int)TipoPlantilla.Vacaciones, sucursal.IdCliente); //ViewBag.vaciones = vaca.GetVacaciones(id=10); return(PartialView("_PeriodoVacaciones", detalle)); }
public ActionResult Index() { var sucursal = Session["Sucursal"] as SucursalDatos; if (sucursal != null) { var empleados = vaca.ObtenerEmpleadosPorSucursal(sucursal.IdSucursal); Plantillas pl = new Plantillas(); ViewBag.Plantillas = pl.GetPlantillasByTipo2((int)TipoPlantilla.Vacaciones, sucursal.IdCliente); return(View(empleados)); } else { return(RedirectToAction("Index", "Home")); } }