Пример #1
0
        //ListBox에서 더블클릭한 환자 정보 띄우기
        private void OpenPatient(object p)
        {
            PatientData t = PatientSearchList.ElementAt((int)p);

            PatientName   = t.PatientName;
            PatientGender = t.PatientGender;

            if (PatientGender == "남")
            {
                VisibleMaleIcon   = false;
                VisibleFemaleIcon = true;
            }
            else if (PatientGender == "여")
            {
                VisibleMaleIcon   = true;
                VisibleFemaleIcon = false;
            }
        }
        //private ICommand _AddCommand;
        //public ICommand AddCommand
        //{
        //    get
        //    {
        //        if (_AddCommand == null)
        //            _AddCommand = new RelayCommand(p => this.Add(p));
        //        return _AddCommand;
        //    }
        //}


        #endregion

        #region Methods
        private void Search(object p)
        {
            for (int i = 0; i < PatientList.Count; i++)
            {
                if (_SearchNameNumber == PatientList.ElementAt(i).PatientName ||
                    _SearchNameNumber == PatientList.ElementAt(i).PatientNumber)
                {
                    PatientData data = new PatientData()
                    {
                        PatientName   = PatientList.ElementAt(i).PatientName,
                        PatientNumber = PatientList.ElementAt(i).PatientNumber,
                        PatientGender = PatientList.ElementAt(i).PatientGender,
                        PatientAge    = PatientList.ElementAt(i).PatientAge
                    };
                    PatientSearchList.Add(data);
                }
            }
            PatientTempList   = PatientList;
            PatientList       = PatientSearchList;
            PatientSearchList = PatientTempList;
        }