예제 #1
0
        public JsonResult GetPlan()
        {
            ModalidadPagoBL            modalidadPagoBL      = new ModalidadPagoBL();
            GetModalidadPagoRequestDTO modalidadPagoRequest = new GetModalidadPagoRequestDTO();

            GetModalidadPagoResponseDTO modalidadPagoResponse = new GetModalidadPagoResponseDTO();

            modalidadPagoResponse = modalidadPagoBL.GetModalidadPago(modalidadPagoRequest);

            List <CatModalidadPago> listaModalidadPago = new List <CatModalidadPago>();

            if (modalidadPagoResponse.Mensaje == "OK")
            {
                listaModalidadPago = modalidadPagoResponse.ListaModalidadPago;
            }

            PlanBL            planBL      = new PlanBL();
            GetPlanRequestDTO planRequest = new GetPlanRequestDTO();

            GetPlanResponseDTO planResponse = new GetPlanResponseDTO();

            planResponse = planBL.GetPlan(planRequest);

            List <CatPlan> listaPlan = new List <CatPlan>();

            if (planResponse.Mensaje == "OK")
            {
                listaPlan = planResponse.ListaEmpresa;
            }

            List <CatPlan> listaPlanActual = new List <CatPlan>();

            listaPlanActual = (from plan in listaPlan
                               join modalidadPago in listaModalidadPago on plan.idModalidadPago equals modalidadPago.idModalidadPago
                               select new CatPlan
            {
                idPlan = plan.idPlan,
                plan = plan.plan,
                descripcion = plan.descripcion,
                idModalidadPago = plan.idModalidadPago,
                modalidadPago = modalidadPago.modalidadPago,
                fechaInsert = plan.fechaInsert,
                usuarioInsert = plan.usuarioInsert,
                fechaUpdate = plan.fechaUpdate,
                usuarioUpdate = plan.usuarioUpdate
            }).ToList();

            PlanModalidadPago planModalidadPago = new PlanModalidadPago();

            planModalidadPago.ListaPlan          = listaPlanActual;
            planModalidadPago.ListaModalidadPago = listaModalidadPago;

            return(Json(planModalidadPago, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult GetModalidadPago()
        {
            ModalidadPagoBL modalidadPagoBL = new ModalidadPagoBL();

            GetModalidadPagoResponseDTO modalidadPagoResponse = new GetModalidadPagoResponseDTO();

            GetModalidadPagoRequestDTO modalidadPagoRequest = new GetModalidadPagoRequestDTO();

            List <CatModalidadPago> listaModalidadPago = new List <CatModalidadPago>();

            modalidadPagoResponse = modalidadPagoBL.GetModalidadPago(modalidadPagoRequest);

            if (modalidadPagoResponse.Mensaje == "OK")
            {
                listaModalidadPago = modalidadPagoResponse.ListaModalidadPago;
            }


            return(Json(listaModalidadPago, JsonRequestBehavior.AllowGet));
        }