public NewTrainDTO(TrainInfo trainInfo, NewDevicePrescription devicePrescription, PrescriptionResultTwo prescriptionResult) { if (trainInfo != null) { this.ID = trainInfo.Pk_TI_Id; this.DateStr = trainInfo.Gmt_Create.ToString(); } this.trainInfo = trainInfo; this.devicePrescription = devicePrescription; this.prescriptionResult = prescriptionResult; moveway = prescriptionResult != null?DataCodeCache.GetInstance() .GetCodeDValue(DataCodeTypeEnum.MoveWay, devicePrescription.Dp_moveway.ToString()) : ""; }
public UserUpdata() { InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; this.MaxHeight = SystemParameters.WorkArea.Size.Height; this.MaxWidth = SystemParameters.WorkArea.Size.Width; groupList = customDataService.GetAllByType(CustomDataEnum.Group); diseaseList = customDataService.GetAllByType(CustomDataEnum.Disease); diagnosisList = customDataService.GetAllByType(CustomDataEnum.Diagiosis); //初始化下拉框值 c2.ItemsSource = groupList; c5.ItemsSource = diseaseList; c6.ItemsSource = diagnosisList; //护理程度下拉框 c3.ItemsSource = DataCodeCache.GetInstance().GetDateCodeList(DataCodeTypeEnum.CareLevel); c4.ItemsSource = DataCodeCache.GetInstance().GetDateCodeList(DataCodeTypeEnum.CareLevel); }
public TrainExcelVO(TrainComprehensive tc) { this.Gmt_Create = (DateTime)tc.Gmt_Create; //腿部推蹬机 if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.HorizontalLegPress")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.HorizontalLegPress"); } //坐姿划船机 else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.Rowing")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.Rowing"); } //身体伸展弯曲机 else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.TorsoFlexion")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.TorsoFlexion"); } //腿部伸展弯曲机 else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.LegExtension")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.LegExtension"); } //腿部内外展机 else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.HipAbduction")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.HipAbduction"); } //胸部推举机 else if (LanguageUtils.EqualsResource(tc.DS_name, "Dev.ChestPress")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("Dev.ChestPress"); } this.dp_groupcount = tc.dp_groupcount; this.dp_groupnum = tc.dp_groupnum; this.dp_relaxtime = tc.dp_relaxtime; this.dp_weight = tc.dp_weight; this.dp_moveway = DataCodeCache.GetInstance().GetCodeDValue(DataCodeTypeEnum.MoveWay, tc.dp_moveway + ""); if (tc.PR_SportStrength == "10" || tc.PR_SportStrength == "9") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("困难", "Difficult"); } else if (tc.PR_SportStrength == "8" || tc.PR_SportStrength == "7") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("有点困难", "A little difficult"); } else if (tc.PR_SportStrength == "6" || tc.PR_SportStrength == "5") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("轻松", "Relaxed"); } else if (tc.PR_SportStrength == "4" || tc.PR_SportStrength == "3") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("很轻松", "Easy"); } else if (tc.PR_SportStrength == "2" || tc.PR_SportStrength == "1") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("非常轻松", "Very easy"); } else { this.PR_SportStrength = ""; } this.PR_Time = tc.PR_Time2 - tc.PR_Time1; this.PR_Distance = tc.PR_Distance; this.PR_CountWorkQuantity = tc.PR_CountWorkQuantity; this.PR_Cal = tc.PR_Cal; this.PR_Index = tc.PR_Index; this.PR_FinishGroup = tc.PR_FinishGroup; this.PR_Evaluate = DataCodeCache.GetInstance().GetCodeDValue(DataCodeTypeEnum.Evaluate, tc.PR_Evaluate + ""); this.PR_Memo = tc.PR_Memo; this.PR_AttentionPoint = tc.PR_AttentionPoint; this.PR_UserThoughts = tc.PR_UserThoughts; }
public NewTrainExcelVO(NewTrainComprehensive tc) { this.Gmt_Create = (DateTime)tc.Gmt_Create; //坐式划船机 if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.Rowing")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.Rowing"); } //坐式推胸机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.ChestPress")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.ChestPress"); } //腿部推蹬机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.HorizontalLegPress")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.HorizontalLegPress"); } //腹肌训练机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.AbdominalMuscleTraining")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.AbdominalMuscleTraining"); } //三头肌训练机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.TricepsTraining")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.TricepsTraining"); } //腿部外弯机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.LegAbduction")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.LegAbduction"); } //腿部内弯机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.LegInturn")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.LegInturn"); } //蝴蝶机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.ButterflyMachine")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.ButterflyMachine"); } //反向蝴蝶机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.ReverseButterflyMachine")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.ReverseButterflyMachine"); } //坐式背部伸展机 else if (LanguageUtils.EqualsResource(tc.DS_name, "NewDev.SittingBackExtender")) { this.DS_name = LanguageUtils.GetCurrentLanuageStrByKey("NewDev.SittingBackExtender"); } this.dp_groupcount = tc.dp_groupcount; this.dp_groupnum = tc.dp_groupnum; this.dp_relaxtime = tc.dp_relaxtime; this.dp_moveway = DataCodeCache.GetInstance().GetCodeDValue(DataCodeTypeEnum.MoveWay, tc.dp_moveway + ""); if (tc.PR_SportStrength == "10" || tc.PR_SportStrength == "9") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("困难", "Difficult"); } else if (tc.PR_SportStrength == "8" || tc.PR_SportStrength == "7") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("有点困难", "A little difficult"); } else if (tc.PR_SportStrength == "6" || tc.PR_SportStrength == "5") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("轻松", "Relaxed"); } else if (tc.PR_SportStrength == "4" || tc.PR_SportStrength == "3") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("很轻松", "Easy"); } else if (tc.PR_SportStrength == "2" || tc.PR_SportStrength == "1") { this.PR_SportStrength = LanguageUtils.ConvertLanguage("非常轻松", "Very easy"); } else { this.PR_SportStrength = ""; } this.PR_Finish_Time = tc.PR_finish_time; this.PR_Energy = tc.PR_Energy; this.PR_Finish_Num = tc.PR_finish_num; this.PR_UserThoughts = tc.PR_UserThoughts; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string level = value.ToString(); return(DataCodeCache.GetInstance().GetCodeDValue(DataCodeTypeEnum.CareLevel, level)); }
//载入时从数据库加载数据源 private void TestCombox_Loaded(object sender, RoutedEventArgs e) { List <DataCode> list = DataCodeCache.GetInstance().GetDateCodeList(DataCodeTypeEnum.MoveWay); TestCombox.ItemsSource = list; }