コード例 #1
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            this.MyViewModel               = (AddDoctorsViewModel)this.DataContext;
            this.dbInvestigation           = new InvestigationSearch();
            InvestigationList.DataProvider = this.dbInvestigation;

            // dbProcedure
            this.dbProcedure            = new ProcedureSearch();
            ProceduresList.DataProvider = this.dbProcedure;
            // dhDoctors obj =  ((dhDoctors)this.DataContext);
            //  this.NewDoctorGrid.DataContext = new dhDoctors();
            this.DocInvestigations.ItemsSource = MyViewModel.ObjNewDoctor.DocInvestigations;
            this.DocProcedures.ItemsSource     = MyViewModel.ObjNewDoctor.DocProcedures;
        }
コード例 #2
0
        private void DocList_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (sender != null)
            {
                DataGridRow dgr = sender as DataGridRow;
                // get the obect and then Invoice ID opne the Id in readonly mode
                dhDoctors objTodisplay = new dhDoctors();
                // need to update to docview // first get view object then create new doctore obj
                dhDoctorView objtemp = ((dhDoctorView)dgr.Item);


                objTodisplay = this.MyViewModel.db.Doctors.Find(objtemp.IDocid);
                if (objTodisplay != null)
                {
                    objTodisplay.IUpdate = 1;
                    AddDoctorsViewModel ObjSetToEdit = new AddDoctorsViewModel(objTodisplay);
                    //objvm.SelectToEdit(new AddPartyViewModel(objTodisplay));
                    Globalized.LoadThisObject(ObjSetToEdit, "Edit Doctor '" + objTodisplay.VfName + " " + objTodisplay.VlName + "'", Globalized.AppModuleList.Where(xx => xx.VModuleName == "Doctors").FirstOrDefault().VShortDescription);
                }
            }
        }