Exemple #1
0
        public JsonResult GetAllVitalDetails_ForList(int?page, int?limit, string sortBy, string direction, string searchString = null, string patientID = null)
        {
            try
            {
                PatientModel model = new PatientModel();
                model.CurrentPage     = page.Value;
                model.NumberOfRecords = limit.Value;
                model.OrderBy         = string.Format("{0} {1}", sortBy, direction);
                model.PatientID       = Convert.ToInt64(patientID);
                var records = model.GetVitalData_ForList();//new GridModel().GetPlayers(page, limit, sortBy, direction, searchString, out total);
                int total   = records.Count > 0 ? records.FirstOrDefault().TotalCount : 0;

                return(Json(new { records, total }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                UtilityController.LogException(ex, MethodBase.GetCurrentMethod().ReflectedType.Name, MethodBase.GetCurrentMethod().Name);
            }

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