public BoardPlanVigilancia Filter(BoardPlanVigilancia data)
        {
            var list = new PlanDal().Filter(out int totalRecords, data);

            data.TotalRecords = totalRecords;
            data.List         = list;

            return(data);
        }
        public ActionResult FilterPlanVigilancia(BoardPlanVigilancia data)
        {
            Api API = new Api();

            Dictionary <string, string> arg = new Dictionary <string, string>()
            {
                { "Name", data.Name },
                { "OrganizationId", data.OrganizationId },
                { "Take", data.Take.ToString() },
                { "Index", data.Index.ToString() }
            };

            ViewBag.DataPV = API.Post <BoardPlanVigilancia>("PlanVigilancia/Filter", arg);

            return(PartialView("_BoardPlanVigilancia"));
        }
예제 #3
0
        public List <PlanVigilanciaCustom> Filter(out int totalRecords, BoardPlanVigilancia data)
        {
            int skip = (data.Index - 1) * data.Take;

            var list = (from a in _ctx.PlanVigilancia
                        where (data.Name == null || a.v_Name.Contains(data.Name)) && a.v_OrganizationId == data.OrganizationId && a.i_IsDeleted == (int)SiNo.No
                        select new PlanVigilanciaCustom
            {
                PlanVigilanciaId = a.v_PlanVigilanciaId,
                Name = a.v_Name,
                Description = a.v_Description,
                PlanDiseases = (from subA in _ctx.PlanVigilanciaDiseases
                                join subB in _ctx.Diseases on subA.v_DiseasesId equals subB.v_DiseasesId
                                where subA.v_PlanVigilanciaId == a.v_PlanVigilanciaId && subA.i_IsDeleted == (int)SiNo.No
                                select new PlanDiseasesCustom
                {
                    PlanVigilanciaDiseasesId = subA.v_PlanVigilanciaDiseasesId,
                    PlanVigilanciaId = a.v_PlanVigilanciaId,
                    DiseasesId = subA.v_DiseasesId,
                    DiseasesName = subB.v_Name,
                    Cie10 = subB.v_CIE10Id,
                    RecordStatus = (int)RecordStatus.Grabado,
                    RecordType = (int)RecordType.NoTemporal,
                }).ToList()
            }).ToList();


            totalRecords = list.Count;

            if (data.Take > 0)
            {
                list = list.Skip(skip).Take(data.Take).ToList();
            }

            return(list);
        }
예제 #4
0
        public IHttpActionResult Filter(BoardPlanVigilancia data)
        {
            var result = _oPlanVigilanciaBl.Filter(data);

            return(Ok(result));
        }