/// <summary> /// 获取一个时间段的预约情况 /// </summary> /// <param name="deviceId"></param> /// <returns></returns> public string getCalendarBookingJSON(string deviceId, DMSCRProtocol dMSCRProtocol) { string month = dMSCRProtocol.getMonth(); string[] fl = DateArrayHandle.GetMMFirstAndLast(month); string json = GetURLWebAPI(_LIMSBookURL, "/getPeriod/" + deviceId + "/" + fl[0] + "/" + fl[1]); // //string json = TestData.; return(json); }
public void OnGet() { MemoryCache cache = MemoryCache.Default; //if(cache.Count()>0) //{ // Message = cache.Count() + " device(s) have been registered"; // foreach (var oc in cache.Distinct()) // { // DeviceInformation deviceInformation = (DeviceInformation)oc.Value; // DeviceInfoList.Add("ID: " + deviceInformation.DeviceID + "-IP: " + deviceInformation.IP + " -DeviceStat: " + deviceInformation.DeviceStat + " -PowerStat: " + deviceInformation.PowerStat.ToString("00") + " -Ver: " + deviceInformation.DeviceVer); // } //} if (cache.Contains(SystemMessageIndex.POSTTESTCACHEINDEX)) { List <string> JsonList = (List <string>)cache.Get(SystemMessageIndex.POSTTESTCACHEINDEX); } Days = DateArrayHandle.GetTheWeekOfFirstDay(DateTime.Now.ToString("yyyyMM")); }