Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using Paneles.Entities;
  4. using Nuevo_Panel.Proxy;
  5. using Nuevo_Panel.Helpers;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. using Paneles.Entities.PanelSET;
  10. namespace Nuevo_Panel.Controllers
  11. {
  12. public class PanelSETController : Controller
  13. {
  14. // GET: PanelSET
  15. public ActionResult PanelControlSET()
  16. {
  17. ProxySET proxy = new ProxySET();
  18. String registro = HelperAplicacion.ObtenerUsuarioLogueado();
  19. Colaborador colaborador = proxy.RecuperarDatosColaboradorporRegistro(registro);
  20.  
  21. List<Tienda> Tiendas = proxy.RecuperarDatosTienda(registro, "PANEL SET");
  22.  
  23. ManejadorPanelSET manejador = new ManejadorPanelSET();
  24. manejador.Lista_Tienda = Tiendas;
  25.  
  26. ViewBag.Title = "Panel SET";
  27. return View(manejador);
  28. }
  29. [HttpPost]
  30. public JsonResult RecuperarDetallePanel(String cod_tienda, String trimestre)
  31. {
  32. ProxySET proxy = new ProxySET();
  33. String registro = HelperAplicacion.ObtenerUsuarioLogueado();
  34. Colaborador colaborador = proxy.RecuperarDatosColaboradorporRegistro(registro);
  35. List<PanelPersonalDetalle> DetallesPanel = new List<PanelPersonalDetalle>();
  36.  
  37. if (HelperAplicacion.perfil(colaborador.categoria) == 2)
  38. {
  39. DetallesPanel = proxy.RecuperarDatosPanelPersonalDetalle(cod_tienda, 8, trimestre, colaborador.registro_colaborador);
  40. DetallesPanel.AddRange(proxy.RecuperarDatosPanelPersonalDetalle(cod_tienda, 9, trimestre, colaborador.registro_colaborador));
  41. }
  42. else
  43. {
  44. DetallesPanel = proxy.RecuperarDatosPanelPersonalDetalle(cod_tienda, 8, trimestre, null);
  45. DetallesPanel.AddRange(proxy.RecuperarDatosPanelPersonalDetalle(cod_tienda, 9, trimestre, null));
  46.  
  47. }
  48.  
  49. return Json(new { detalle = DetallesPanel });
  50.  
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement