Exemplo n.º 1
0
 public static string LoadDoctorCountByHospitalDepartment(string hospital, string department)
 {
     try
     {
         string result = new OpenDataServiceClient().GetHospitalDoctorCountBy(hospital, department);
         return(result);
     }
     catch (Exception ex)
     {
         LogHelper.GetInstance().Error(ex.ToString());
         var exResult = new { Code = 0, ex.Message };
         return(JsonConvert.SerializeObject(exResult));
     }
 }
Exemplo n.º 2
0
 public static string LoadRetirementHome(int pageSize, int pageNo)
 {
     try
     {
         string result = new OpenDataServiceClient().GetRetirementHome(pageNo, pageSize);
         return(result);
     }
     catch (Exception ex)
     {
         LogHelper.GetInstance().Error(ex.ToString());
         var exResult = new { Code = 0, ex.Message };
         return(JsonConvert.SerializeObject(exResult));
     }
 }
Exemplo n.º 3
0
 public static string LoadAllDoctorHospitals()
 {
     try
     {
         string result = new OpenDataServiceClient().GetAllDoctorHospitals();
         return(result);
     }
     catch (Exception ex)
     {
         LogHelper.GetInstance().Error(ex.ToString());
         var exResult = new { Code = 0, ex.Message };
         return(JsonConvert.SerializeObject(exResult));
     }
 }
Exemplo n.º 4
0
        public static string GetSpecialFC(string noticeId)
        {
            try
            {
                string json = new OpenDataServiceClient().GetCommunityFC(noticeId);
                if (json.JObjCodeTrue())
                {
                    return(json.JObjParse()["Message"].ToString());
                }
                return(string.Empty);
            }

            catch (Exception)
            {
                return(string.Empty);
            }
        }
Exemplo n.º 5
0
        private void BindPageData()
        {
            OpenDataServiceClient serviceClient = new OpenDataServiceClient();
            var json = serviceClient.GetBusRouteList(PageNo, PageSize);
            var jobj = json.JObjParse();

            if (jobj["Code"].Value <int>() == 1)
            {
                Repeater1.DataSource                                                           = from jitem in jobj["Message"]
                                                              let line                         = jitem["Line"].Value <string>()
                                                                                     let index = line.IndexOf("站点:", StringComparison.Ordinal)
                                                                                                 let included = line.Substring(0, 20).Contains("单向")
                                                                                                                select new
                {
                    Name   = jitem["Name"],
                    Line   = line.Substring(index + 3),
                    Single = included ? "单向" : "双向"
                };
                Repeater1.DataBind();
            }
        }