Ejemplo n.º 1
0
        private void Load_Data()
        {
            //用户信息
            l1.Content = user.User_Name;
            l2.Content = user.Pk_User_Id;
            //date.DateTime = symptomInfoDTO.Create;
            ;
            //实施日期
            date.Content = symptomInfoDTO.Create.ToString();

            bloodlow_1.Text   = symptomInfoDTO.Pre_Pressure.Split(new char[] { '/' })[1].Trim();
            bloodhight_1.Text = symptomInfoDTO.Pre_Pressure.Split(new char[] { '/' })[0].Trim();
            heartRate_1.Text  = symptomInfoDTO.Pre_HeartRate;

            if (!symptomInfoDTO.Pre_Pulse.Equals(""))
            {
                if (LanguageUtils.EqualsResource(symptomInfoDTO.Pre_Pulse, "VitalInfoView.Regular"))
                {
                    rule_1.IsChecked      = true;
                    irregular_1.IsChecked = false;
                }
                else if (LanguageUtils.EqualsResource(symptomInfoDTO.Pre_Pulse, "VitalInfoView.Irregular"))
                {
                    rule_1.IsChecked      = false;
                    irregular_1.IsChecked = true;
                }
            }
            else
            {
                rule_1.IsChecked      = false;
                irregular_1.IsChecked = false;
            }

            heat_1.Text = symptomInfoDTO.Pre_AnimalHeat;

            bloodlow_2.Text   = symptomInfoDTO.Suf_Pressure.Split(new char[] { '/' })[1].Trim();
            bloodhight_2.Text = symptomInfoDTO.Suf_Pressure.Split(new char[] { '/' })[0].Trim();
            heartRate_2.Text  = symptomInfoDTO.Suf_HeartRate;
            if (!symptomInfoDTO.Suf_Pulse.Equals(""))
            {
                if (LanguageUtils.EqualsResource(symptomInfoDTO.Suf_Pulse, "VitalInfoView.Regular"))
                {
                    rule_2.IsChecked      = true;
                    irregular_2.IsChecked = false;
                }
                else if (LanguageUtils.EqualsResource(symptomInfoDTO.Suf_Pulse, "VitalInfoView.Irregular"))
                {
                    rule_2.IsChecked      = false;
                    irregular_2.IsChecked = true;
                }
            }
            else
            {
                rule_2.IsChecked      = false;
                irregular_2.IsChecked = false;
            }

            heat_2.Text = symptomInfoDTO.Suf_AnimalHeat;

            foreach (string inquiry in symptomInfoDTO.Inquiry.Split(new char[] { ',' }))
            {
                if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Janguidness"))
                {
                    Janguidness.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Diarrhea"))
                {
                    Diarrhea.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Wamble"))
                {
                    Wamble.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.BeingBreathless"))
                {
                    BeingBreathless.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.CoughAndPhlegm"))
                {
                    CoughAndPhlegm.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Fever"))
                {
                    Fever.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Stomachache"))
                {
                    Stomachache.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.APoorAppetite"))
                {
                    APoorAppetite.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Constipation"))
                {
                    Constipation.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Dizziness"))
                {
                    Dizziness.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Headache"))
                {
                    Headache.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.Other"))
                {
                    Other.IsChecked = true;
                }
                else if (LanguageUtils.EqualsResource(inquiry, "VitalInfoView.NotApplicable"))
                {
                    NotApplicable.IsChecked = true;
                }
            }

            if (LanguageUtils.EqualsResource(symptomInfoDTO.Join, "VitalInfoView.Yes"))
            {
                join_1.IsChecked = true;
                join_2.IsChecked = false;
            }
            else
            {
                join_1.IsChecked = false;
                join_2.IsChecked = true;
            }

            amunt.Text  = symptomInfoDTO.WaterInput;
            Record.Text = symptomInfoDTO.CareInfo;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 public SymptomInfoExcelVO(SymptomInfo si)
 {
     this.Gmt_Create        = (DateTime)si.Gmt_Create;
     this.SI_Pre_Pressure   = si.SI_Pre_HighPressure + "/" + si.SI_Pre_LowPressure;
     this.SI_Pre_HeartRate  = si.SI_Pre_HeartRate;
     this.SI_Pre_Pulse      = si.SI_Pre_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
     this.SI_Pre_AnimalHeat = si.SI_Pre_AnimalHeat;
     this.SI_Suf_Pressure   = si.SI_Suf_HighPressure + "/" + si.SI_Suf_LowPressure;
     this.SI_Suf_HeartRate  = si.SI_Suf_HeartRate;
     this.SI_Suf_Pulse      = si.SI_Suf_Pulse == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Regular") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Irregular");
     this.SI_Suf_AnimalHeat = si.SI_Suf_AnimalHeat;
     string[] inquirys = Regex.Split(si.SI_Inquiry, ",");
     foreach (string str in inquirys)
     {
         //1. 身体疲倦
         if (LanguageUtils.EqualsResource(str, "VitalInfoView.Janguidness"))
         {
             this.SI_Tired = 1;
         }
         //2.腹泻
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Diarrhea"))
         {
             this.SI_Diarrhoea = 1;
         }
         //3.摇晃
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Wamble"))
         {
             this.SI_Shake = 1;
         }
         //4. 心跳、气喘
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.BeingBreathless"))
         {
             this.SI_Asthma = 1;
         }
         //5. 咳嗽、有痰
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.CoughAndPhlegm"))
         {
             this.SI_Phlegm = 1;
         }
         //6. 发烧
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Fever"))
         {
             this.SI_Fever = 1;
         }
         //7. 胸部、肚子痛
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Stomachache"))
         {
             this.SI_Stomach = 1;
         }
         //8. 没有食欲
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.APoorAppetite"))
         {
             this.SI_NoAppetite = 1;
         }
         //9. 持续便秘
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Constipation"))
         {
             this.SI_Constipation = 1;
         }
         //10. 感到头晕
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Dizziness"))
         {
             this.SI_Dizzy = 1;
         }
         //11. 头痛
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Headache"))
         {
             this.SI_Headache = 1;
         }
         //12.其他
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.Other"))
         {
             this.SI_Other = 1;
         }
         //13.没有相关症状
         else if (LanguageUtils.EqualsResource(str, "VitalInfoView.NotApplicable"))
         {
             this.SI_NoSymptoms = 1;
         }
     }
     this.SI_IsJoin     = si.SI_IsJoin == 0 ? LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.No") : LanguageUtils.GetCurrentLanuageStrByKey("VitalInfoView.Yes");
     this.SI_WaterInput = si.SI_WaterInput;
     this.SI_CareInfo   = si.SI_CareInfo;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 确定保存添加按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_OK(object sender, RoutedEventArgs e)
        {
            //获取用户身份证的内容
            //string userID = t1.Text;
            //获取用户姓名的内容
            string userName = t2.Text;
            //获取用户姓名拼音的内容
            string usernamePY = t3.Text;
            //获取用户性别的内容
            string usersex = c1.Text;
            //获取用户出生年月的内容
            string brithday = t4.Text;
            //获得身份证号
            string IDCard = this.IDCard.Text;
            //获得手机号
            string phone = this.phoneNum.Text;

            //获取身份证与手机号之后马上查重
            //if (userService.GetByIdCard(IDCard) != null)
            //{
            //    //身份证重复气泡提示
            //    Error_Info_IDCard.Content = "该身份证已注册";
            //    bubble_IDCard.IsOpen = true;
            //}
            //if (userService.GetByPhone(phone) != null)
            //{
            //    //手机重复气泡提示
            //    Error_Info_Phone.Content = "该手机号已注册";
            //    bubble_phone.IsOpen = true;
            //}
            if (!String.IsNullOrEmpty(IDCard) || IDCard.Length > 31)
            {
                //if (IDCard.Length < 18)
                //{
                //    //for (int i = IDCard.Length; i < 18; i++)
                //    //{
                //    //    IDCard = IDCard + '0';
                //    //}
                //    if (userService.GetByIdCard(IDCard) != null)
                //    {
                //        //身份证重复气泡提示
                //        Error_Info_IDCard.Content = LanguageUtils.ConvertLanguage("该身份证已注册", "This ID is registered");
                //        bubble_IDCard.IsOpen = true;
                //        return;

                //    }
                //}
                //else
                if (IDCard.Length == 18 && !inputlimited.InputLimited.IsIDcard(IDCard))
                {
                    Error_Info_IDCard.Content = LanguageUtils.ConvertLanguage("请输入正确的身份证号码", "Please enter a valid ID number");
                    bubble_IDCard.IsOpen      = true;
                    return;
                }
                else if (userService.GetByIdCard(IDCard) != null)
                {
                    //身份证重复气泡提示
                    Error_Info_IDCard.Content = LanguageUtils.ConvertLanguage("该身份证已注册", "This ID is registered");
                    bubble_IDCard.IsOpen      = true;
                    return;
                }
                else
                {
                    bubble_IDCard.IsOpen = false;
                }
            }
            else
            {
                Error_Info_IDCard.Content = LanguageUtils.ConvertLanguage("请输入正确的身份证号码", "Please enter the ID number");
                bubble_IDCard.IsOpen      = true;
                return;
            }
            if (String.IsNullOrEmpty(phone))
            {
                Error_Info_Phone.Content = LanguageUtils.ConvertLanguage("请输入手机号", "Please enter phone number");
                bubble_phone.IsOpen      = true;
                return;
            }
            else
            {
                if (userService.GetByPhone(phone) != null)
                {
                    //手机重复气泡提示
                    Error_Info_Phone.Content = LanguageUtils.ConvertLanguage("该手机号已注册", "The phone number is registered");
                    bubble_phone.IsOpen      = true;
                    return;
                }
                else if (!inputlimited.InputLimited.IsHandset(phone) && !String.IsNullOrEmpty(phone))
                {
                    Error_Info_Phone.Content = LanguageUtils.ConvertLanguage("请输入正确的手机号", "Please enter a valid phone number");
                    bubble_phone.IsOpen      = true;
                    return;
                }
            }
            string IdCard = this.IDCard.Text;
            string name   = t3.Text;
            //获取小组名称的内容
            string groupName = c2.Text;
            //获取初期要介护度的内容
            string initial = c3.SelectedIndex.ToString();
            //获取现在要介护度的内容
            string now = c4.SelectedIndex.ToString();
            //获取疾病名称的内容
            string sicknessName = c5.Text;
            //获取残障名称的内容
            string disabilityName = c6.Text;
            //获取备忘的内容
            TextRange text = new TextRange(t6.Document.ContentStart, t6.Document.ContentEnd);
            string    memo = text.Text;
            //私密信息
            String noPublicInfo = this.noPublicInfoText.Text;
            //string secretMessage = this.Non_Public_Information.
            User user = new User();

            user.User_Privateinfo = noPublicInfo;
            user.User_Birth       = Convert.ToDateTime(brithday);
            user.User_GroupName   = groupName;
            //设置私密信息
            user.User_Privateinfo = noPublicInfo == null ? "" : noPublicInfo;
            //user.User_Privateinfo = secretMessage==null?"":secretMessage;
            if (IdCard == null || name == null || IDCard == "" || name == "")
            {
                MessageBoxX.Info(LanguageUtils.ConvertLanguage("没有填写身份证或者名字(拼音)", "No identity card or First Name"));
                return;
            }

            user.User_IDCard               = IDCard;
            user.User_IllnessName          = sicknessName;
            user.User_InitCare             = initial;
            user.User_Memo                 = memo;
            user.User_Name                 = userName;
            user.User_Namepinyin           = usernamePY;
            user.User_Nowcare              = now;
            user.User_PhysicalDisabilities = disabilityName;
            user.User_Sex   = (byte?)(LanguageUtils.EqualsResource(usersex, "AddOrEditView.M") ? 1 : 0);
            user.User_Phone = phone;

            // 如果用户是自己选择现成的图片,将图片保存在安装目录下
            if (IdCard != null && name != null && IDCard != "" && name != "" && userIfSelectPic != false)
            {
                // 用户选择的图片文件的 原路径
                string sourcePic = userPhotoPath;
                // 压缩
                string targetPic = CommUtil.GetUserPicTemp();
                Random random    = new Random();
                int    rd        = random.Next(0, 100000);
                targetPic += t3.Text.ToString() + rd.ToString() + ".gif";

                //targetPic += ".gif";
                // 获得保存图片的文件夹
                String dirPath = CommUtil.GetUserPicTemp();

                //判断是否存在
                if (Directory.Exists(dirPath))
                {
                    //Response.Write("已存在");
                }
                else
                {
                    //Response.Write("不存在,正在创建");
                    Directory.CreateDirectory(dirPath);//创建新路径
                }

                //压缩一下并且储存图片
                long picLen = 0;
                GetPicThumbnail(sourcePic, targetPic, 184, 259, 20);

                FileInfo di = new FileInfo(targetPic);
                picLen  = di.Length;
                picLen /= 1024;

                // 如果图片太大就重新选择
                if (picLen > 40)
                {
                    MessageBoxX.Info(LanguageUtils.ConvertLanguage("图片过大,请重新选择,不能超过40KB", "The picture is too large. Please select it again. Cannot exceed 40KB"));
                    File.Delete(targetPic);
                    return;
                }

                string userSelectFinalPic = CommUtil.GetUserPic(photoName);
                File.Copy(targetPic, userSelectFinalPic);
            }
            else if (userIfSelectPic != false)
            {
                MessageBoxX.Info(LanguageUtils.ConvertLanguage("没有填写身份证或者名字(拼音)", "No identity card or First Name"));
                return;
            }

            string tempPic = CommUtil.GetUserPicTemp(photoName);

            // 如果是正常拍照得到的图片
            if (File.Exists(tempPic))
            {
                string finalPic = CommUtil.GetUserPic(photoName);
                //如果增加时,对应位置存在这个图片,则删除
                if (File.Exists(finalPic))
                {
                    File.Delete(finalPic);
                }
                //确定没有重名,在进行复制
                File.Copy(tempPic, finalPic);
            }

            //将图片的url传到数据库
            user.User_PhotoLocation = photoName;
            userService.InsertUser(user);
            //保存照片的路径
            this.Close();
        }
Ejemplo n.º 5
0
        private void Button_OK(object sender, RoutedEventArgs e)
        {
            //获取用户姓名的内容
            string userName = t2.Text;
            //获取用户姓名拼音的内容
            string usernamePY = t3.Text;
            //获取用户性别的内容
            string usersex = c1.Text;
            //获取用户出生年月的内容
            string brithday = t4.Text;
            //获取小组名称的内容
            string groupName = c2.Text;
            //获取初期要介护度的内容
            string initial = c3.SelectedIndex.ToString();
            //获取现在要介护度的内容
            string now = c4.SelectedIndex.ToString();
            //获取疾病名称的内容
            string sicknessName = c5.Text;
            //获取残障名称的内容
            string disabilityName = c6.Text;
            //获取备忘的内容
            TextRange text = new TextRange(t6.Document.ContentStart, t6.Document.ContentEnd);
            string    memo = text.Text;
            //获得身份证号
            string IDCard = this.IDCard.Text;
            //获得手机号
            string phone = this.phoneNum.Text;
            //获取非公开信息:lzh
            String secretMessage = this.noPublicInfoText.Text;

            /////2018.3.22添加内容
            //if (!String.IsNullOrEmpty(IDCard)&&IDCard.Length == 18 &&!inputlimited.InputLimited.IsIDcard(IDCard))
            //{
            //    Error_Info_IDCard.Content = "请输入正确的身份证号码";
            //    bubble_IDCard.IsOpen = true;
            //    return;
            //}
            //else if (userService.GetByIdCard(IDCard) != null && !origin_IDCard.Equals(IDCard))
            //{
            //    Error_Info_IDCard.Content = "该身份证已注册";
            //    bubble_IDCard.IsOpen = true;
            //    return;
            //}
            //else
            //{
            //    bubble_IDCard.IsOpen = false;
            //}

            //身份证验证
            if (!String.IsNullOrEmpty(IDCard) || IDCard.Length > 31)
            {
                //if (IDCard.Length < 18)
                //{
                //    for (int i = IDCard.Length; i < 18; i++)
                //    {
                //        IDCard = IDCard + '0';
                //    }
                //    if (!origin_IDCard.Equals(IDCard)&&userService.GetByIdCard(IDCard) != null)
                //    {
                //        //身份证重复气泡提示
                //        Error_Info_IDCard.Content = LanguageUtils.ConvertLanguage("该身份证已注册", "This ID is registered");
                //        bubble_IDCard.IsOpen = true;
                //        return;

                //    }
                //}
                //else
                if (IDCard.Length == 18 && !inputlimited.InputLimited.IsIDcard(IDCard))
                {
                    Error_Info_IDCard.Content = LanguageUtils.ConvertLanguage("请输入正确的身份证号码", "Please enter a valid ID number");
                    bubble_IDCard.IsOpen      = true;
                    return;
                }
                else if (!origin_IDCard.Equals(IDCard) && userService.GetByIdCard(IDCard) != null)
                {
                    //身份证重复气泡提示
                    Error_Info_IDCard.Content = LanguageUtils.ConvertLanguage("该身份证已注册", "This ID is registered");
                    bubble_IDCard.IsOpen      = true;
                    return;
                }
                else
                {
                    bubble_IDCard.IsOpen = false;
                }
            }
            else
            {
                Error_Info_IDCard.Content = LanguageUtils.ConvertLanguage("请输入正确的身份证号码", "Please enter the ID number");
                bubble_IDCard.IsOpen      = true;
                return;
            }

            //
            if (String.IsNullOrEmpty(phone))
            {
                Error_Info_Phone.Content = LanguageUtils.ConvertLanguage("请输入手机号", "Please enter phone number");
                bubble_phone.IsOpen      = true;
                return;
            }
            else if (!inputlimited.InputLimited.IsHandset(phone) && !String.IsNullOrEmpty(phone))
            {
                Error_Info_Phone.Content = LanguageUtils.ConvertLanguage("请输入正确的手机号", "Please enter a valid phone number");
                bubble_phone.IsOpen      = true;
                return;
            }
            else if (userService.GetByPhone(phone) != null && !phoneNum.Text.Equals(origin_phone))
            {
                Error_Info_Phone.Content = LanguageUtils.ConvertLanguage("该手机号已注册", "The phone number is registered");
                bubble_phone.IsOpen      = true;
                return;
            }
            else
            {
                bubble_phone.IsOpen = false;
            }
            ////2018.3.22:修改了下方的两个if条件,加上了&&后的内容:李仲浩
            ////获取身份证与手机号之后马上查重
            //if (userService.GetByIdCard(IDCard) != null && !origin_IDCard.Equals(IDCard))
            //{
            //    //身份证重复气泡提示
            //    Error_Info_IDCard.Content = "该身份证已注册";
            //    bubble_IDCard.IsOpen = true;
            //    return;
            //}
            //if (userService.GetByPhone(phone) != null && !origin_name.Equals(origin_name))
            //{
            //    //手机重复气泡提示
            //    Error_Info_Phone.Content = "该手机号已注册";
            //    bubble_phone.IsOpen = true;

            //    return;
            //}

            SelectUser.User_Birth     = Convert.ToDateTime(brithday);
            SelectUser.User_GroupName = groupName;

            SelectUser.User_IDCard               = IDCard;
            SelectUser.User_IllnessName          = sicknessName;
            SelectUser.User_InitCare             = initial;
            SelectUser.User_Memo                 = memo;
            SelectUser.User_Name                 = userName;
            SelectUser.User_Namepinyin           = usernamePY;
            SelectUser.User_Nowcare              = now;
            SelectUser.User_PhysicalDisabilities = disabilityName;
            SelectUser.User_Sex   = (byte?)(LanguageUtils.EqualsResource(usersex, "AddOrEditView.M") ? 1 : 0);
            SelectUser.User_Phone = phone;
            //非公开信息添加:lzh
            SelectUser.User_Privateinfo = secretMessage;


            //更新数据库的图片名称
            if (photoName != null)
            {
                SelectUser.User_PhotoLocation = photoName;
            }

            userService.UpdateUser(SelectUser);
            this.Close();
        }
Ejemplo n.º 6
0
        private void Load_Data()
        {
            l1.Content = user.User_Name;
            l2.Content = user.Pk_User_Id;
            implementation_date.Content = physicaleDto.Gmt_Create.ToString();
            PhysicalPower physicalPower = new PhysicalPowerDAO().Load(physicaleDto.ID);

            //身高
            string[] ppHigh = Regex.Replace(physicalPower.PP_High, @"param\d", "").Split(new char[] { ',' });
            height_first.Text = ppHigh[1];
            if (LanguageUtils.EqualsResource(ppHigh[3], "PhysicalEvaluationFormView.Picture(front/lateral)"))
            {
                height_condition.IsChecked = true;
            }
            height_duty.Text = ppHigh[4];

            //体重
            string[] ppWeight = Regex.Replace(physicalPower.PP_Weight, @"param\d", "").Split(new char[] { ',' });
            weight_first.Text = ppWeight[1];
            if (ppWeight[3] != "")
            {
                weight_condition.IsChecked = true;
                weight_condition_text.Text = ppWeight[3].Split(new char[] { ':' })[1];
            }
            weight_duty.Text = ppWeight[4];

            //握力
            string[] ppGrip = Regex.Replace(physicalPower.PP_Grip, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppGrip[0], "PhysicalEvaluationFormView.L"))
            {
                grip_left.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppGrip[0], "PhysicalEvaluationFormView.R"))
            {
                grit_right.IsChecked = true;
            }

            grip_first.Text  = ppGrip[1];
            grip_second.Text = ppGrip[2];
            if (LanguageUtils.EqualsResource(ppGrip[3], "PhysicalEvaluationFormView.Standing"))
            {
                grid_stand.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppGrip[3], "PhysicalEvaluationFormView.Seated"))
            {
                grid_sit.IsChecked = true;
            }

            grip_duty.Text = ppGrip[4];


            //睁眼单脚站立
            string[] ppEyeOpenStand = Regex.Replace(physicalPower.PP_EyeOpenStand, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppEyeOpenStand[0], "PhysicalEvaluationFormView.L"))
            {
                stand_left.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppEyeOpenStand[0], "PhysicalEvaluationFormView.R"))
            {
                stand_right.IsChecked = true;
            }
            stand_first.Text  = ppEyeOpenStand[1];
            stand_second.Text = ppEyeOpenStand[2];
            if (LanguageUtils.EqualsResource(ppEyeOpenStand[3], "PhysicalEvaluationFormView.nosupport"))
            {
                stand_nosupport.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppEyeOpenStand[3], "PhysicalEvaluationFormView.Supportedbyassistance"))
            {
                stand_support.IsChecked = true;
            }
            else if (ppEyeOpenStand[3] != "")
            {
                string[] strings = ppEyeOpenStand[3].Split(new char[] { '(' });
                stand_toolsupport.IsChecked = true;
                string stand2 = strings[1].Substring(0, strings[1].Length - 1);
                //第一个框
                if (LanguageUtils.EqualsResource(strings[0], "PhysicalEvaluationFormView.T-Kane"))
                {
                    stand_comBox1.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
                }
                else if (LanguageUtils.EqualsResource(strings[0], "PhysicalEvaluationFormView.Qtr-Cane"))
                {
                    stand_comBox1.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
                }
                else if (LanguageUtils.EqualsResource(strings[0], "PhysicalEvaluationFormView.Walker"))
                {
                    stand_comBox1.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
                }
                else if (LanguageUtils.EqualsResource(strings[0], "PhysicalEvaluationFormView.Other"))
                {
                    stand_comBox1.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
                }
                //第二个框
                if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.RightFrontal"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.RightFrontal");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.RightLateral"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.RightLateral");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.LeftFrontal"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.LeftFrontal");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.LeftLateral"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.LeftLateral");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.BothFrontal"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.BothFrontal");
                }
                else if (LanguageUtils.EqualsResource(stand2, "PhysicalEvaluationFormView.BothLateral"))
                {
                    stand_comBox2.Text = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.BothLateral");
                }
            }

            stand_duty.Text = ppEyeOpenStand[4];

            //功能性前伸
            string[] ppFunctionProtract = Regex.Replace(physicalPower.PP_FunctionProtract, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppFunctionProtract[0], "PhysicalEvaluationFormView.Bothhands"))
            {
                protrack_twohands.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppFunctionProtract[0], "PhysicalEvaluationFormView.L"))
            {
                protrack_left.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppFunctionProtract[0], "PhysicalEvaluationFormView.R"))
            {
                protrack_right.IsChecked = true;
            }

            protrack_first.Text  = ppFunctionProtract[1];
            protrack_second.Text = ppFunctionProtract[2];
            if (LanguageUtils.EqualsResource(ppFunctionProtract[3], "PhysicalEvaluationFormView.Difficulttorisearmstoshoulder(ShoulderFlex)"))
            {
                protrack_curvature.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppFunctionProtract[3], "PhysicalEvaluationFormView.SeatedPosition"))
            {
                protrack_sit.IsChecked = true;
            }

            protrack_duty.Text = ppFunctionProtract[4];

            //坐姿体前屈
            string[] ppSitandReach = Regex.Replace(physicalPower.PP_SitandReach, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppSitandReach[0], "PhysicalEvaluationFormView.L"))
            {
                c17.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppSitandReach[0], "PhysicalEvaluationFormView.R"))
            {
                c18.IsChecked = true;
            }

            c_first.Text  = ppSitandReach[1];
            c_second.Text = ppSitandReach[2];
            if (LanguageUtils.EqualsResource(ppSitandReach[3], "PhysicalEvaluationFormView.KneeFlexion"))
            {
                c19.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppSitandReach[3], "PhysicalEvaluationFormView.NoKneeFlexion"))
            {
                c20.IsChecked = true;
            }
            c_duty.Text = ppSitandReach[4];

            //Time UP & GO
            string[] ppTimeUpGo = Regex.Replace(physicalPower.PP_TimeUpGo, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppTimeUpGo[0], "PhysicalEvaluationFormView.Basic"))
            {
                c21.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[0], "PhysicalEvaluationFormView.Modified"))
            {
                c22.IsChecked = true;
            }
            time_first.Text  = ppTimeUpGo[1];
            time_second.Text = ppTimeUpGo[2];
            if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.Independent"))
            {
                c23.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c24.IsChecked = true;
                comBox3.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c24.IsChecked = true;
                comBox3.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.Walker"))
            {
                c24.IsChecked = true;
                comBox3.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppTimeUpGo[3], "PhysicalEvaluationFormView.Other"))
            {
                c24.IsChecked = true;
                comBox3.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppTimeUpGo[3] != "")
            {
                c25.IsChecked = true;
                text1.Text    = ppTimeUpGo[3];
            }
            time_duty.Text = ppTimeUpGo[4];


            //5m步行,通常
            string[] ppWalk5MileGeneral = Regex.Replace(physicalPower.PP_Walk5MileGeneral, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[0], "PhysicalEvaluationFormView.Basic"))
            {
                c26.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[0], "PhysicalEvaluationFormView.Modified"))
            {
                c27.IsChecked = true;
            }
            five1_first.Text  = ppWalk5MileGeneral[1];
            five1_second.Text = ppWalk5MileGeneral[2];
            if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.Independent"))
            {
                c28.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c29.IsChecked = true;
                comBox4.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c29.IsChecked = true;
                comBox4.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.Walker"))
            {
                c29.IsChecked = true;
                comBox4.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileGeneral[3], "PhysicalEvaluationFormView.Other"))
            {
                c29.IsChecked = true;
                comBox4.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppWalk5MileGeneral[3] != "")
            {
                c30.IsChecked = true;
                text2.Text    = ppWalk5MileGeneral[3];
            }
            five1_duty.Text = ppWalk5MileGeneral[4];

            //5m步行,最快
            string[] ppWalk5MileFast = Regex.Replace(physicalPower.PP_Walk5MileFast, @"param\d", "").Split(new char[] { ',' });
            if (LanguageUtils.EqualsResource(ppWalk5MileFast[0], "PhysicalEvaluationFormView.Basic"))
            {
                c31.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[0], "PhysicalEvaluationFormView.Modified"))
            {
                c32.IsChecked = true;
            }

            five2_first.Text  = ppWalk5MileFast[1];
            five2_second.Text = ppWalk5MileFast[2];
            if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.Independent"))
            {
                c33.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c34.IsChecked = true;
                comBox5.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c34.IsChecked = true;
                comBox5.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.Walker"))
            {
                c34.IsChecked = true;
                comBox5.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppWalk5MileFast[3], "PhysicalEvaluationFormView.Other"))
            {
                c34.IsChecked = true;
                comBox5.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppWalk5MileFast[3] != "")
            {
                c35.IsChecked = true;
                text3.Text    = ppWalk5MileFast[3];
            }

            five2_duty.Text = ppWalk5MileFast[4];

            //10m步行
            string[] ppWalk10Mile = Regex.Replace(physicalPower.PP_Walk10Mile, @"param\d", "").Split(new char[] { ',' });
            string   methodStr    = "";

            if (ppWalk10Mile[0].Contains("通常") || ppWalk10Mile[0].Contains("Normal"))
            {
                methodStr = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Normal");
            }
            else if (ppWalk10Mile[0].Contains("最快") || ppWalk10Mile[0].Contains("utmost"))
            {
                methodStr = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.utmost");
            }
            method.Text = methodStr;
            if (ppWalk10Mile[0].Contains("基本方法") || ppWalk10Mile[0].Contains("Basic"))
            {
                c36.IsChecked = true;
            }
            else if (ppWalk10Mile[0].Contains("常规外方法") || ppWalk10Mile[0].Contains("Modified"))
            {
                c37.IsChecked = true;
            }

            ten_first.Text  = ppWalk10Mile[1];
            ten_second.Text = ppWalk10Mile[2];
            if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.Independent"))
            {
                c38.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c39.IsChecked = true;
                comBox6.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c39.IsChecked = true;
                comBox6.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.Walker"))
            {
                c39.IsChecked = true;
                comBox6.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppWalk10Mile[3], "PhysicalEvaluationFormView.Other"))
            {
                c39.IsChecked = true;
                comBox6.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppWalk10Mile[3] != "")
            {
                c40.IsChecked = true;
                text4.Text    = ppWalk10Mile[3];
            }

            ten_duty.Text = ppWalk10Mile[4];

            //6分钟步行
            string[] ppWalk6Minute = Regex.Replace(physicalPower.PP_Walk6Minute, @"param\d", "").Split(new char[] { ',' });
            six_first.Text  = ppWalk6Minute[1];
            six_second.Text = ppWalk6Minute[2];
            if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.Independent"))
            {
                c43.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c44.IsChecked = true;
                comBox7.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c44.IsChecked = true;
                comBox7.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.Walker"))
            {
                c44.IsChecked = true;
                comBox7.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppWalk6Minute[3], "PhysicalEvaluationFormView.Other"))
            {
                c44.IsChecked = true;
                comBox7.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppWalk6Minute[3] != "")
            {
                c45.IsChecked = true;
                text5.Text    = ppWalk6Minute[3];
            }

            six_duty.Text = ppWalk6Minute[4];

            //2分钟踏步
            string[] ppStep2Minute = Regex.Replace(physicalPower.PP_Step2Minute, @"param\d", "").Split(new char[] { ',' });
            two_first.Text  = ppStep2Minute[1];
            two_second.Text = ppStep2Minute[2];
            if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.Independent"))
            {
                c46.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.T-Kane"))
            {
                c47.IsChecked = true;
                comBox8.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.T-Kane");
            }
            else if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.Qtr-Cane"))
            {
                c47.IsChecked = true;
                comBox8.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Qtr-Cane");
            }
            else if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.Walker"))
            {
                c47.IsChecked = true;
                comBox8.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Walker");
            }
            else if (LanguageUtils.EqualsResource(ppStep2Minute[3], "PhysicalEvaluationFormView.Other"))
            {
                c47.IsChecked = true;
                comBox8.Text  = LanguageUtils.GetCurrentLanuageStrByKey("PhysicalEvaluationFormView.Other");
            }
            else if (ppStep2Minute[3] != "")
            {
                c48.IsChecked = true;
                text6.Text    = ppStep2Minute[3];
            }

            two_duty.Text = ppStep2Minute[4];

            //2分钟抬腿
            string[] ppLegRaise2Minute = Regex.Replace(physicalPower.PP_LegRaise2Minute, @"param\d", "").Split(new char[] { ',' });
            twoleg_first.Text  = ppLegRaise2Minute[1];
            twoleg_second.Text = ppLegRaise2Minute[2];
            if (LanguageUtils.EqualsResource(ppLegRaise2Minute[3], "PhysicalEvaluationFormView.Standing"))
            {
                c49.IsChecked = true;
            }
            else if (LanguageUtils.EqualsResource(ppLegRaise2Minute[3], "PhysicalEvaluationFormView.Seated"))
            {
                c50.IsChecked = true;
            }

            twoleg_duty.Text = ppLegRaise2Minute[4];

            //使用者感想
            string ppUserMemo = physicalPower.PP_UserMemo;

            user_think.Text = ppUserMemo;

            //工作人员感想
            string ppWorkerMemo = physicalPower.PP_WorkerMemo;

            worker_think.Text = ppWorkerMemo;
        }