public void LoadData(object sender, DoWorkEventArgs e)
        {
            PatientList = hms.getPatientList();
            DoctorList  = hms.getDoctors();
            NurseList   = hms.getNurses();
            RoomList    = hms.getRooms();
            IndoorList  = hms.getIndoors();
            this.Dispatcher.Invoke(new Action(delegate
            {
                Add_Employee.IsEnabled = true;
                Add_Patient.IsEnabled  = true;
                btnAdd_Nurse.IsEnabled = true;
                btnAdd_Room.IsEnabled  = true;

                dataGrid_Doctor.ItemsSource  = DoctorList;
                dataGrid_Patient.ItemsSource = PatientList;
                dataGrid_Nurse.ItemsSource   = NurseList;
                dataGrid_Room.ItemsSource    = RoomList;
                dataGrid_Indoor.ItemsSource  = IndoorList;

                cboGovernedBy.ItemsSource = NurseList;
                cboRoomNo.ItemsSource     = RoomList;
                cboCategory.ItemsSource   = hms.getCategories();
            }));
        }
예제 #2
0
 public Add_Doctor(List <doctor> docList)
 {
     InitializeComponent();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     hms          = new DataLayer.HmsDA();
     this.docList = docList;
     cboSpecialization.ItemsSource = hms.getCategories();
     this.DataContext = new EmpViewModel();
 }
예제 #3
0
 private void Grid_Loaded(object sender, RoutedEventArgs e)
 {
     comboCat.ItemsSource       = hms.getCategories();
     comboCat.DisplayMemberPath = "name";
     comboCat.SelectedValuePath = "catid";
 }