예제 #1
0
        public void InitializeDoctorList()
        {
            tabDoctorCards.Controls.Clear();
            List <GetBriefQueue_Result> allQueues = null;

            allQueues = MerkDBBusinessLogicEngine.GetBriefQueue(null, null, null, null);

            List <IGrouping <int, GetBriefQueue_Result> > groupedByList = allQueues.GroupBy(item => item.DoctorID).ToList();

            if (groupedByList.Count == 0)
            {
                return;
            }

            if (CheckButtonDictionaryList == null)
            {
                CheckButtonDictionaryList = new Dictionary <int, QueueManager_DoctorCard_UC>();
            }

            foreach (IGrouping <int, GetBriefQueue_Result> queueResults in groupedByList)
            {
                QueueManager_DoctorCard_UC doctorCard = new QueueManager_DoctorCard_UC();
                doctorCard.Dock = DockStyle.Right;
                Doctor_cu doctor =
                    Doctor_cu.ItemsList.Find(item => Convert.ToInt32(item.Person_CU_ID).Equals(Convert.ToInt32(queueResults.Key)));
                if (doctor == null)
                {
                    continue;
                }
                doctorCard.Initiaize(doctor, this);
                tabDoctorCards.Controls.Add(doctorCard);

                CheckButtonDictionaryList.Add(doctor.Person_CU_ID, doctorCard);
            }
        }
예제 #2
0
 public void SetDoctorCheckState(bool isChecked, int checkButtonKey)
 {
     if (CheckButtonDictionaryList != null)
     {
         if (CheckButtonDictionaryList.TryGetValue(checkButtonKey, out _checkedDoctor))
         {
             foreach (KeyValuePair <int, QueueManager_DoctorCard_UC> keyValuePair in CheckButtonDictionaryList)
             {
                 QueueManager_DoctorCard_UC chkButton = keyValuePair.Value;
                 chkButton.IsCheckChanged = false;
                 if (keyValuePair.Key.Equals(checkButtonKey))
                 {
                     chkButton.IsCheckChanged = true;
                     chkButton.SetCheckState(true);
                     continue;
                 }
                 chkButton.IsCheckChanged = true;
                 chkButton.SetCheckState(false);
             }
         }
     }
 }