Пример #1
0
        public JsonResult List(string Name = "", string CellPhone = "", String Enrollmentdate = "", string Enrollmentnumber = "", int Type = 0)
        {
            try
            {
                var searchfilters = new PatientsSearch()
                {
                    Name             = Name,
                    Cellphone        = CellPhone,
                    Enrollmentdate   = Enrollmentdate,
                    Enrollmentnumber = Enrollmentnumber,
                    Type             = Type
                };

                //Get patients
                var patients = _patient.Searchpatients(searchfilters);

                //Return result to jTable
                return(Json(new { Result = "OK", Records = patients, TotalRecordCount = patients.Count() }));
            }
            catch (Exception ex)
            {
                return(Json(new { Result = "ERROR", Message = ex.Message }));
            }
        }