private void mentesBTN_Click(object sender, RoutedEventArgs e) { //ovm.Ms.People.Add(new People() { Name = nevTB.Text, Address = lakcimTB.Text, Gender = nemTB.Text, Email = emailTB.Text, Password = jszTB.Text, Phone = telTB.Text, Deleted = 0, Group = 4, UserName = felhTB.Text }); //ovm.Mentes(); //ovm.Ms.People.Load(); //int id = ovm.Ms.People.Local.Where(elem => elem.Name == nevTB.Text).First().PeopleID; //ovm.Ms.Betegek.Add(new Betegek() { Deleted = 0, PeopleID = id, TAJ=tajTB.Text}); //ovm.Mentes(); //ovm.Ms.Betegek.Load(); //ovm.MungoSystemInitial(ovm.Ms); ovm.Ujbeteg(new People() { Name = nevTB.Text, Address = lakcimTB.Text, Gender = nemTB.Text, Email = emailTB.Text, Password = jszTB.Text, Phone = telTB.Text, Deleted = 0, Group = 1, UserName = felhTB.Text }, tajTB.Text); this.Close(); }
private void mentesBTN_Click(object sender, RoutedEventArgs e) { //ovm.Ms.People.Add(new People() { Name = nevTB.Text, Address = lakcimTB.Text, Gender = nemTB.Text, Email = emailTB.Text, Password = jszTB.Text, Phone = telTB.Text, Deleted = 0, Group = 4, UserName = felhTB.Text }); //ovm.Mentes(); //ovm.Ms.People.Load(); //int id = ovm.Ms.People.Local.Where(elem => elem.Name == nevTB.Text).First().PeopleID; //ovm.Ms.Betegek.Add(new Betegek() { Deleted = 0, PeopleID = id, TAJ=tajTB.Text}); //ovm.Mentes(); //ovm.Ms.Betegek.Load(); //ovm.MungoSystemInitial(ovm.Ms); if (nevTB.Text != "" && emailTB.Text != "" && tajTB.Text != "" && felhTB.Text != "" && jszTB.Text != "" && telTB.Text != "" && lakcimTB.Text != "") { ovm.Ujbeteg(new People() { Name = nevTB.Text, Address = lakcimTB.Text, Gender = nemTB.Text, Email = emailTB.Text, Password = jszTB.Text, Phone = telTB.Text, Deleted = 0, Group = 1, UserName = felhTB.Text }, tajTB.Text); this.Close(); } else { MessageBox.Show("HIBA: a következők közül legalább egy nincs megadva:\n\tNév\n\tFelhasználó név\n\tJelszó\n\tEmail cím\n\tTelefonszám\n\tLakcím"); } }