public RecepciosMainWindow(People sessionUser, StMungoServiceClient smc)
     {
         this.smc = smc;
         InitializeComponent();
         recepciosViewModel = new RecepciosViewModel(smc.mungoSystem(),sessionUser);
 
     }
        public EszkozAddModWindow(KorhaziEszkoz newEszkoz,MungoSystem ms,bool Igeny,People sessionUser)
        {
            InitializeComponent();
            this.DataContext = newEszkoz;
            igeny = Igeny;
            originalMegnevezes = newEszkoz.Megnevezes;

         

            ms.KorhaziEszkozok_Fej.Load();
            if (sessionUser.Group!=4)
            {
                checkBox.IsEnabled = false;
            }
            if (newEszkoz.Statusz==true)
            {
                comboCsoport.Visibility = Visibility.Hidden;
                labelCombo.Visibility = Visibility.Hidden;
            }
            else
            {
                ObservableCollection<KorhaziEszkozok_Fej> comboSource =
                new ObservableCollection<KorhaziEszkozok_Fej>(
                ms.KorhaziEszkozok_Fej.Where
                (x => x.Deleted == 0));
                comboCsoport.ItemsSource = comboSource;

                comboCsoport.DisplayMemberPath = "Megnevezes";
                comboCsoport.SelectedValuePath = "Eszkoz_FejID";
            }
        }
 public ApoloMainWindow(MungoSystem mungoSystem,People sessionUser)
 {
     InitializeComponent();
     smc = new StMungoServiceClient();
     this.mungoSystem = mungoSystem;
     this.sessionUser = sessionUser;
 }
 public OrvosAsszisztensWindow(MungoSystem ms, People orvos)
 {           
     ovm = OrvosViewModel.Get();
     ovm.Orvos = orvos;
     ovm.MungoSystemInitial(ms);
     InitializeComponent();
     this.DataContext = ovm;
 }
 public OrvosAsszisztensLazlapWindow(People sessionUser)
 {
     this.sessionUser = sessionUser;
     ovm = OrvosViewModel.Get();
     InitializeComponent();
     ovm.SelectedBetegLazlapja();
     ovm.SelectedBetegGyogyszerei();
     this.DataContext = ovm;
 }
 public ApoloLazlapWindow(Lazlap lazlap,People sessionUser,MungoSystem ms)
 {
     InitializeComponent();
     this.lazlap = lazlap;
     this.sessionUser = sessionUser;
     this.ms = ms;
     this.DataContext = lazlap;
     this.originalMegjegyzes = lazlap.ApoloMegjegyzes;
 }
 public OrvosAsszisztensWindow(People orvos, StMungoServiceClient smc)
 {
     this.smc = smc;
     ovm = OrvosViewModel.Get();
     ovm.Orvos = orvos;
     ovm.MungoSystemInitial(smc);
     InitializeComponent();
     smc = new StMungoServiceClient();
     this.DataContext = ovm;
 }
 public GazdAlkMainWindow(People sessionUser, StMungoServiceClient smc)
 {
     InitializeComponent();
     this.smc = smc;
     this.sessionUser = sessionUser;
     smc.gyogyszer_getLoad();
     smc.KorhaziEszkoz_getLoad();
     smc.KorhaziEszkozok_Fej_getLoad();
     this.DataContext = sessionUser;
     refreshTask = new Task(Refresh);
     refreshTask.Start();
     gyogyszerek = new ObservableCollection<Gyogyszer>(smc.mungoSystem().Gyogyszer.Where(gy => gy.Deleted==0));
     eszkozok_fej = new ObservableCollection<KorhaziEszkozok_Fej>(smc.mungoSystem().KorhaziEszkozok_Fej.Where(kef=>kef.Deleted==0));
 }
        public IgenyMainWindow(People sessionUser,MungoSystem ms)
        {
            InitializeComponent();
            this.sessionUser = sessionUser;
            DataContext = sessionUser;
            this.ms = ms;
            ms.KorhaziEszkozok_Fej.Load();
            ms.KorhaziEszkoz.Load();

            igenyCsoport = new ObservableCollection<KorhaziEszkozok_Fej>(
                ms.KorhaziEszkozok_Fej.Where(x=>x.Deleted==0));
            listBoxEszkozGroupIgeny.ItemsSource = igenyCsoport;

            
        }
        public IgenyMainWindow(People sessionUser, StMungoServiceClient smc)
        {
            InitializeComponent();
            this.sessionUser = sessionUser;
            DataContext = sessionUser;
            this.smc = smc;
            smc.KorhaziEszkozok_Fej_getLoad();
            smc.KorhaziEszkoz_getLoad();

            igenyCsoport = new ObservableCollection<KorhaziEszkozok_Fej>(
                smc.mungoSystem().KorhaziEszkozok_Fej.Where(x=>x.Deleted==0));
            listBoxEszkozGroupIgeny.ItemsSource = igenyCsoport;

            
        }
        public OrvosAsszisztensGyogyszerWindow(bool lvo,People sessionuser)
        {

            InitializeComponent();
            this.ovm = OrvosViewModel.Get();
            LazlapVagyOrvos = lvo;

            this.sessionuser = sessionuser;

            this.DataContext = ovm;
            ObservableCollection<Gyogyszer> comboSource = new ObservableCollection<Gyogyszer>(ovm.Gyogyszerek.Where(x => x.Deleted == 0));
            gyogyszerCMB.ItemsSource = comboSource;
            // itt kell folytatnom 

            gyogyszerCMB.DisplayMemberPath = "Megnevezes";
            // comboCsoport.SelectedValuePath = "Eszkoz_FejID";
        }
        public GazdAlkMainWindow(MungoSystem mungoSystem,People sessionUser)
        {
            InitializeComponent();
            this.sessionUser = sessionUser;
            this.mungoSystem = mungoSystem;

            mungoSystem.Gyogyszer.Load();
            mungoSystem.KiadottGyogyszer.Load();
            mungoSystem.KorhaziEszkoz.Load();
            mungoSystem.KorhaziEszkozok_Fej.Load();
            mungoSystem.Kortortenet_fej.Load();
            mungoSystem.Kortortenet_tetel.Load();
            mungoSystem.Lazlap.Load();

            this.DataContext = sessionUser;
            refreshTask = new Task(Refresh);
            refreshTask.Start();
            gyogyszerek = new ObservableCollection<Gyogyszer>(mungoSystem.Gyogyszer.Where(gy => gy.Deleted==0));
            eszkozok_fej = new ObservableCollection<KorhaziEszkozok_Fej>(mungoSystem.KorhaziEszkozok_Fej.Where(kef=>kef.Deleted==0));
        }
 public BetegWindow(MungoSystem mungoSys, People sessionUsr)
 {
     InitializeComponent();
     controller = new BetegMainController(mungoSys, sessionUsr);
 }
     public RecepciosMainWindow(MungoSystem mungoSystem, People sessionUser)
     {
         InitializeComponent();
         recepciosViewModel = new RecepciosViewModel(mungoSystem,sessionUser);
 
     }
Example #15
0
 public RecepciosMainWindow(People sessionUser, StMungoServiceClient smc)
 {
     this.smc = smc;
     InitializeComponent();
     recepciosViewModel = new RecepciosViewModel(smc.mungoSystem(), sessionUser);
 }
 public BetegWindow(MungoSystem mungoSys,People sessionUsr)
 {
     InitializeComponent();
     controller = new BetegMainController(mungoSys,sessionUsr);
 }
Example #17
0
 public void Ujbeteg(People beteg, string taj) {
     ++pID;
     ms.People.Local.Add(beteg);
     ms.Betegek.Local.Add(new Betegek() {TAJ=taj, Deleted=0 , PeopleID=pID});
     
     Mentes();
     ms.People.Load();
     ms.Betegek.Load();
     MungoSystemInitial(this.ms);
 }
        private void mentesBTN_Click(object sender, RoutedEventArgs e)
        {
            BetegAdatai beteg = recepciosViewModel.KivalasztottBeteg;

            if (kivbet != null && kivpeo != null)
            {
                kivbet.TAJ      = beteg.TAJ;
                kivbet.Deleted  = 0;
                kivpeo.Address  = beteg.Cim;
                kivpeo.Deleted  = 0;
                kivpeo.Email    = beteg.Email;
                kivpeo.Gender   = beteg.Nem;
                kivpeo.Group    = 1;
                kivpeo.Name     = beteg.Nev;
                kivpeo.Password = beteg.Password;
                kivpeo.Phone    = beteg.Phone;
                kivpeo.UserName = beteg.UserName;
            }
            else
            {
                try
                {
                    People p = new People()
                    {
                        Address = beteg.Cim, Deleted = 0, Email = beteg.Email, Gender = beteg.Nem, Group = 1, Name = beteg.Nev, Password = beteg.Password, Phone = beteg.Phone, UserName = beteg.UserName
                    };
                    mungoSystem.People.Local.Add(p);
                    Console.WriteLine(mungoSystem.SaveChanges());

                    mungoSystem.People.Load();

                    mungoSystem.Betegek.Load();
                    mungoSystem.Betegek.Local.Add(new Betegek()
                    {
                        Deleted = 0, PeopleID = p.PeopleID, TAJ = beteg.TAJ
                    });

                    Console.WriteLine(mungoSystem.SaveChanges());

                    mungoSystem.Kortortenet_fej.Load();
                    mungoSystem.Betegek.Load();

                    mungoSystem.Kortortenet_fej.Local.Add(new Kortortenet_fej()
                    {
                        Deleted = 0, BetegID = mungoSystem.Betegek.Where(x => x.Deleted == 0 && x.PeopleID == p.PeopleID).First().BetegID
                    });
                }
                catch (Exception ex2) { Console.WriteLine(ex2.Message); }
            }

            try

            {
                Console.WriteLine(mungoSystem.SaveChanges());
            }
            catch (System.Data.Entity.Validation.DbEntityValidationException ex)
            {
                foreach (var err in ex.EntityValidationErrors)
                {
                    foreach (var err2 in err.ValidationErrors)
                    {
                        Console.WriteLine(err2.ErrorMessage);
                    }
                }
            }

            DialogResult = true;
        }
Example #19
0
        public void Ujbeteg(People beteg, string taj) {
            //++pID;
            ms.People.Local.Add(beteg);
            Mentes();
            pID = ms.People.OrderByDescending(x => x.PeopleID).First().PeopleID;
            ms.Betegek.Local.Add(new Betegek() {TAJ=taj, Deleted=0 , PeopleID=pID});
            //ms.Kortortenet_fej.Local.Add(new Kortortenet_fej() { Deleted = 0, BetegID = ms.Betegek.Where(x => x.Deleted == 0 && x.PeopleID == pID).First().BetegID });

            Mentes();
            ms.People.Load();
            ms.Betegek.Load();
            ms.Kortortenet_fej.Local.Add(new Kortortenet_fej() { Deleted = 0, BetegID = ms.Betegek.Where(x => x.Deleted == 0 && x.PeopleID == pID).First().BetegID });
            Mentes();
            ms.Kortortenet_fej.Load();
            MungoSystemInitial(this.ms);
            kortortenetFej = ms.Kortortenet_fej.Local;
              }