private void certain_dev() { var deviceSorts = new DeviceSortDAO().ListAll(); foreach (DeviceSort dev in deviceSorts) { switch (dev.DS_name) { case "": break; } } }
public Dictionary <int, List <TrainDTO> > getTrainDTOByUserA(User user) { TrainInfoDAO trainInfoDao = new TrainInfoDAO(); DevicePrescriptionDAO devicePrescriptionDao = new DevicePrescriptionDAO(); PrescriptionResultDAO prescriptionResultDao = new PrescriptionResultDAO(); DeviceSortDAO deviceSortDao = new DeviceSortDAO(); Dictionary <int, List <TrainDTO> > dic = new Dictionary <int, List <TrainDTO> >(); //找到该用户训练记录(训练记录状态为0或2) List <TrainInfo> trainInfos = trainInfoDao.GetFinishOrNormalTrainInfoByUserId(user.Pk_User_Id); foreach (TrainInfo trainInfo in trainInfos) { //根据训练信息id查找处方 List <DevicePrescription> devicePrescriptions = devicePrescriptionDao.GetByTIId(trainInfo.Pk_TI_Id); foreach (DevicePrescription devicePrescription in devicePrescriptions) { int devId = devicePrescription.Fk_DS_Id; //根据处方查找训练结果 PrescriptionResult prescriptionResult = prescriptionResultDao.GetByDPId(devicePrescription.Pk_DP_Id); if (prescriptionResult == null) { //如果没有训练结果, continue; } //查找字典是否有以此设备名字命名的key,不存在则先创建 if (!dic.ContainsKey(devId)) { List <TrainDTO> trainDtos = new List <TrainDTO>(); dic.Add(devId, trainDtos); } // Console.WriteLine(prescriptionResult.PR_Evaluate); //PR_Evaluate 总是1???? dic[devId].Add(new TrainDTO(trainInfo, devicePrescription, prescriptionResult)); } } return(dic); return(null); }
/// <summary> /// /// </summary> /// <param name="uploadManagement">传入上传管理者实体</param> /// <returns>返回可以用来上传的辅助对象</returns> public ServiceResult GetServiceResult(UploadManagement uploadManagement) { //service返回结果对象 ServiceResult serviceResult = new ServiceResult(); //提前载入唯一Setter SetterDAO setterDAO = new SetterDAO(); Setter setter = setterDAO.getSetter(); //需要加入解密逻辑 TODO string mac = ""; //try //{ // byte[] deBytes = AesUtil.Decrypt(Encoding.GetEncoding("GBK").GetBytes(setter.Set_Unique_Id), // ProtocolConstant.USB_DOG_PASSWORD); // mac = Encoding.GetEncoding("GBK").GetString(deBytes); //} //catch (Exception ex) //{ // mac = setter.Set_Unique_Id.Replace(":", ""); //} byte[] a = ProtocolUtil.StringToBcd(setter.Set_Unique_Id); byte[] b = AesUtil.Decrypt(a, ProtocolConstant.USB_DOG_PASSWORD); mac = Encoding.GetEncoding("GBK").GetString(b).Replace(":", "-"); ///if识别出表,设置发送路径,select出实体,转化至DTO,json打成string,返回 //识别是否是权限用户添加 if (uploadManagement.UM_DataTable == "bdl_auth") { AuthDAO authDAO = new AuthDAO(); Auther auther = authDAO.Load(uploadManagement.UM_DataId); if (auther == null) { return(null); } AutherDTO autherDTO = new AutherDTO(setter, auther, mac); //serviceResult.URL = "clientController/addClient.action"; serviceResult.Data = JsonTools.Obj2JSONStrNew <AutherDTO>(autherDTO); } //bdl_customdata表 else if (uploadManagement.UM_DataTable == "bdl_customdata") { CustomDataDAO customDataDAO = new CustomDataDAO(); CustomData customData = customDataDAO.Load(uploadManagement.UM_DataId); if (customData == null) { return(null); } CustomDataDTO customDataDTO = new CustomDataDTO(customData, mac); serviceResult.Data = JsonTools.Obj2JSONStrNew <CustomDataDTO>(customDataDTO); } //bdl_datacode表 else if (uploadManagement.UM_DataTable == "bdl_datacode") { DataCodeDAO dataCodedao = new DataCodeDAO(); DataCode dataCode = dataCodedao.Load(uploadManagement.UM_DataId); if (dataCode == null) { return(null); } DataCodeDTO dataCodeDTO = new DataCodeDTO(dataCode, mac); serviceResult.Data = JsonTools.Obj2JSONStrNew <DataCodeDTO>(dataCodeDTO); } //bdl_deviceset表 else if (uploadManagement.UM_DataTable == "bdl_deviceset") { DeviceSetDAO deviceSetDAO = new DeviceSetDAO(); DeviceSet deviceSet = deviceSetDAO.Load(uploadManagement.UM_DataId); if (deviceSet == null) { return(null); } DeviceSetDTO deviceSetDTO = new DeviceSetDTO(deviceSet, mac); serviceResult.Data = JsonTools.Obj2JSONStrNew <DeviceSetDTO>(deviceSetDTO); } //bdl_devicesort表 else if (uploadManagement.UM_DataTable == "bdl_devicesort") { DeviceSortDAO deviceSortDAO = new DeviceSortDAO(); DeviceSort deviceSort = deviceSortDAO.Load(uploadManagement.UM_DataId); if (deviceSort == null) { return(null); } DeviceSortDTO deviceSortDTO = new DeviceSortDTO(deviceSort, mac); serviceResult.Data = JsonTools.Obj2JSONStrNew <DeviceSortDTO>(deviceSortDTO); } //bdl_onlinedevice表 else if (uploadManagement.UM_DataTable == "bdl_onlinedevice") { OnlineDeviceDAO onlineDeviceDAO = new OnlineDeviceDAO(); OnlineDevice onlineDevice = onlineDeviceDAO.Load(uploadManagement.UM_DataId); if (onlineDevice == null) { return(null); } OnlineDeviceDTO onlineDeviceDTO = new OnlineDeviceDTO(onlineDevice, mac); serviceResult.Data = JsonTools.Obj2JSONStrNew <OnlineDeviceDTO>(onlineDeviceDTO); } //bdl_set表 else if (uploadManagement.UM_DataTable == "bdl_set") { SetterDAO setterDAO1 = new SetterDAO(); Setter setter1 = setterDAO1.Load(uploadManagement.UM_DataId); if (setter1 == null) { return(null); } SetterDTO setterDTO = new SetterDTO(setter1, mac); serviceResult.Data = JsonTools.Obj2JSONStrNew <SetterDTO>(setterDTO); } //病人表 else if (uploadManagement.UM_DataTable == "bdl_user") { UserDAO userDAO = new UserDAO(); User user = userDAO.Load(uploadManagement.UM_DataId); if (user == null) { return(null); } UserDTO userDTO = new UserDTO(user, mac); //serviceResult.URL = "bigData/bodyStrongUser"; serviceResult.Data = JsonTools.Obj2JSONStrNew <UserDTO>(userDTO); } //症状表 else if (uploadManagement.UM_DataTable == "bdl_symptominfo") { SymptomInfoDao symptomInfoDao = new SymptomInfoDao(); var result = symptomInfoDao.Load(uploadManagement.UM_DataId); if (result == null) { return(null); } SymptomInfoDTO symptomInfoDTO = new SymptomInfoDTO(result, mac); //serviceResult.URL = "bigData/symptomInfo"; serviceResult.Data = JsonTools.Obj2JSONStrNew <SymptomInfoDTO>(symptomInfoDTO); } //训练处方总表 else if (uploadManagement.UM_DataTable == "bdl_traininfo") { TrainInfoDAO trainInfoDAO = new TrainInfoDAO(); var result = trainInfoDAO.Load(uploadManagement.UM_DataId); if (result == null) { return(null); } TrainInfoDTO trainInfoDTO = new TrainInfoDTO(result, mac); //serviceResult.URL = "bigData/trainInfo"; serviceResult.Data = JsonTools.Obj2JSONStrNew <TrainInfoDTO>(trainInfoDTO); } //总表中的一条数据对某台设备的具体处方 else if (uploadManagement.UM_DataTable == "bdl_deviceprescription") { DevicePrescriptionDAO devicePrescriptionDAO = new DevicePrescriptionDAO(); var result = devicePrescriptionDAO.Load(uploadManagement.UM_DataId); if (result == null) { return(null); } DevicePrescriptionDTO devicePrescriptionDTO = new DevicePrescriptionDTO(result, mac); //serviceResult.URL = "bigData/devicePrescription"; serviceResult.Data = JsonTools.Obj2JSONStrNew <DevicePrescriptionDTO>(devicePrescriptionDTO); } //具体处方的具体反馈 else if (uploadManagement.UM_DataTable == "bdl_prescriptionresult") { PrescriptionResultDAO prescriptionResultDAO = new PrescriptionResultDAO(); var result = prescriptionResultDAO.Load(uploadManagement.UM_DataId); if (result == null) { return(null); } PrescriptionResultDTO prescriptionResultDTO = new PrescriptionResultDTO(result, mac); //serviceResult.URL = "bigData/prescriptionResult"; serviceResult.Data = JsonTools.Obj2JSONStrNew <PrescriptionResultDTO>(prescriptionResultDTO); } else if (uploadManagement.UM_DataTable == "bdl_physicalpower") { PhysicalPowerDAO physicalPowerDAO = new PhysicalPowerDAO(); var result = physicalPowerDAO.Load(uploadManagement.UM_DataId); if (result == null) { return(null); } PhysicalPowerDTO physicalPowerDTO = new PhysicalPowerDTO(result, mac); //serviceResult.URL = "bigData/physicalPower"; serviceResult.Data = JsonTools.Obj2JSONStrNew <PhysicalPowerDTO>(physicalPowerDTO); } else if (uploadManagement.UM_DataTable == "bdl_error") { ErrorDao errorDao = new ErrorDao(); var result = errorDao.Load(uploadManagement.UM_DataId); if (result == null) { return(null); } ErrorDTO errorDTO = new ErrorDTO(result, mac); //serviceResult.URL = "bigData/physicalPower"; serviceResult.Data = JsonTools.Obj2JSONStrNew <ErrorDTO>(errorDTO); } return(serviceResult); }
/// <summary> /// 加载数据 /// </summary> private void Load_Data() { //用户信息 l1.Content = user.User_Name; l2.Content = user.Pk_User_Id; //训练日期 da.Content = trainDto.prescriptionResult.Gmt_create.ToString(); string path = AppDomain.CurrentDomain.BaseDirectory; //string rootpath = path.Substring(0, path.LastIndexOf("bin")); //查询处方和结果 #region 优化 //List<NewTrainDTO> trainDtoLists = new List<NewTrainDTO>(); //for(int i=0; i< trainDtoList.Count; i++) //{ // if(new TrainService().GetTrainDTOByPRId(Convert.ToInt32(trainDtoList[i].prescriptionResult.Pk_pr_id))[0] != null) // { // trainDtoLists.Add(new TrainService().GetTrainDTOByPRId(Convert.ToInt32(trainDtoList[i].prescriptionResult.Pk_pr_id))[0]); // } //} #endregion List <NewTrainDTO> trainDtos = new TrainService().GetTrainDTOByPRId(Convert.ToInt32(trainDto.prescriptionResult.Pk_pr_id)); DeviceSortDAO deviceSortDao = new DeviceSortDAO(); ResultLine resultLine = new ResultLine(); //循环判断填充数据 foreach (NewTrainDTO trainDto in trainDtos) { switch (trainDto.devicePrescription.Fk_ds_id) { case (int)DeviceType.P01: HLPGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); HLPGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); HLPRelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); HLPMoveway.Text = trainDto.moveway; HLPPower.Text = trainDto.prescriptionResult.Power.ToString(); HLPTime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { HLPTrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); HLPselect_change(); HLPConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); HLPReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { HLPTrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); HLPselect_change(); HLPSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { HLPTrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); HLPselect_change(); HLPSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } HLPSportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); HLPHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; HLPEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); HLPFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); HLPAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 HLPWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 0); HLPWeb.Navigate(new Uri(path + "dist\\HLPLine.html")); break; case (int)DeviceType.P00: ROWGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); ROWGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); ROWRelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); ROWMoveway.Text = trainDto.moveway; ROWPower.Text = trainDto.prescriptionResult.Power.ToString(); ROWTime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { ROWTrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); ROWselect_change(); ROWConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); ROWReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { ROWTrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); ROWselect_change(); ROWSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { ROWTrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); ROWselect_change(); ROWSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } ROWSportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); ROWHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; ROWEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); ROWFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); ROWAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 ROWWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 1); ROWWeb.Navigate(new Uri(path + "dist\\ROWLine.html")); break; case (int)DeviceType.P09: TFGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); TFGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); TFRelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); TFMoveway.Text = trainDto.moveway; TFPower.Text = trainDto.prescriptionResult.Power.ToString(); TFTime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { TFTrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); TFselect_change(); TFConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); TFReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { TFTrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); TFselect_change(); TFSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { TFTrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); TFselect_change(); TFSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } TFSportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); TFHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; TFEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); TFFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); TFAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 TFWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 2); TFWeb.Navigate(new Uri(path + "dist\\TFLine.html")); break; case (int)DeviceType.P06: LEGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); LEGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); LERelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); LEMoveway.Text = trainDto.moveway; LEPower.Text = trainDto.prescriptionResult.Power.ToString(); LETime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { LETrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); LEselect_change(); LEConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); LEReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { LETrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); LEselect_change(); LESpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { LETrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); LEselect_change(); LESpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } LESportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); LEHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; LEEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); LEFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); LEAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 LEWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 3); LEWeb.Navigate(new Uri(path + "dist\\LELine.html")); break; case (int)DeviceType.P02: HAGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); HAGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); HARelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); HAMoveway.Text = trainDto.moveway; HAPower.Text = trainDto.prescriptionResult.Power.ToString(); HATime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { HATrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); HAselect_change(); HAConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); HAReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { HATrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); HAselect_change(); HASpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { HATrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); HAselect_change(); HASpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } HASportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); HAHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; HAEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); HAFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); HAAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 HAWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 4); HAWeb.Navigate(new Uri(path + "dist\\HALine.html")); break; case (int)DeviceType.P05: CPGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); CPGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); CPRelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); CPMoveway.Text = trainDto.moveway; CPPower.Text = trainDto.prescriptionResult.Power.ToString(); CPTime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { CPTrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); CPselect_change(); CPConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); CPReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { CPTrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); CPselect_change(); CPSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { CPTrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); CPselect_change(); CPSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } CPSportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); CPHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; CPEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); CPFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); CPAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 CPWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 5); CPWeb.Navigate(new Uri(path + "dist\\CPLine.html")); break; case (int)DeviceType.P03: NewAGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); NewAGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); NewARelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); NewAMoveway.Text = trainDto.moveway; NewAPower.Text = trainDto.prescriptionResult.Power.ToString(); NewATime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { NewATrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); NewAselect_change(); NewAConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); NewAReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { NewATrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); NewAselect_change(); NewASpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { NewATrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); NewAselect_change(); NewASpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } NewASportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); NewAHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; NewAEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); NewAFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); NewAAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 NewAWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 6); NewAWeb.Navigate(new Uri(path + "dist\\NewALine.html")); break; case (int)DeviceType.P04: NewBGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); NewBGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); NewBRelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); NewBMoveway.Text = trainDto.moveway; NewBPower.Text = trainDto.prescriptionResult.Power.ToString(); NewBTime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { NewBTrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); NewBselect_change(); NewBConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); NewBReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { NewBTrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); NewBselect_change(); NewBSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { NewBTrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); NewBselect_change(); NewBSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } NewBSportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); NewBHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; NewBEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); NewBFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); NewBAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 NewBWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 7); NewBWeb.Navigate(new Uri(path + "dist\\NewBLine.html")); break; case (int)DeviceType.P07: NewCGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); NewCGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); NewCRelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); NewCMoveway.Text = trainDto.moveway; NewCPower.Text = trainDto.prescriptionResult.Power.ToString(); NewCTime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { NewCTrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); NewCselect_change(); NewCConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); NewCReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { NewCTrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); NewCselect_change(); NewCSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { NewCTrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); NewCselect_change(); NewCSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } NewCSportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); NewCHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; NewCEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); NewCFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); NewCAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 NewCWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 8); NewCWeb.Navigate(new Uri(path + "dist\\NewCLine.html")); break; case (int)DeviceType.P08: NewDGroupcount.Text = trainDto.devicePrescription.Dp_groupcount.ToString(); NewDGroupnum.Text = trainDto.devicePrescription.Dp_groupnum.ToString(); NewDRelaxTime.Text = trainDto.devicePrescription.Dp_relaxtime.ToString(); NewDMoveway.Text = trainDto.moveway; NewDPower.Text = trainDto.prescriptionResult.Power.ToString(); NewDTime1.Text = trainDto.prescriptionResult.Finish_time.ToString(); if (trainDto.devicePrescription.Device_mode == DevConstants.REHABILITATION_MODEL) { NewDTrainingModel.Text = LanguageUtils.ConvertLanguage("康复模式", "Rehabilitation Model"); NewDselect_change(); NewDConsequentForce.Text = trainDto.devicePrescription.Consequent_force.ToString(); NewDReverseForce.Text = trainDto.devicePrescription.Reverse_force.ToString(); } else if (trainDto.devicePrescription.Device_mode == DevConstants.ACTIVE_MODEL) { NewDTrainingModel.Text = LanguageUtils.ConvertLanguage("主被动模式", "Active Model"); NewDselect_change(); NewDSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } else { NewDTrainingModel.Text = LanguageUtils.ConvertLanguage("被动模式", "Passive Model"); NewDselect_change(); NewDSpeedRank.Text = trainDto.devicePrescription.Speed_rank.ToString(); } if (trainDto.prescriptionResult == null) { break; } NewDSportstrength.Text = StrengthConverter(trainDto.prescriptionResult.pr_userthoughts.ToString()); NewDHeartRateList.Text = trainDto.prescriptionResult.Heart_rate_list; NewDEnergy.Text = trainDto.prescriptionResult.Energy.ToString(); NewDFinishNum.Text = trainDto.prescriptionResult.Finish_num.ToString(); NewDAttentionpoint.Text = trainDto.devicePrescription.Dp_memo; // 心率折线图 NewDWeb.ObjectForScripting = new ResultLine(trainDto.prescriptionResult.Heart_rate_list, 9); NewDWeb.Navigate(new Uri(path + "dist\\NewDLine.html")); break; } } }