public void Delete(int index) { Lekari lekar = this.Lekari[index]; this.Lekari.RemoveAt(index); this.LekariRespository.Remove(lekar); }
public void Update(Lekari lek) { Lekari db = this.context.lekar.Find(lek.Id); db.Jmeno = lek.Jmeno; db.Prijmeni = lek.Prijmeni; db.DatumNarozeni = lek.DatumNarozeni; db.Specializace = lek.Specializace; db.DatumUkonceniSkoly = lek.DatumUkonceniSkoly; db.Email = lek.Email; db.Telefon = lek.Telefon; db.Role = lek.Role; db.Heslo = lek.Heslo; this.context.SaveChanges(); }
public Form_Lekar(Lekari lkr) { InitializeComponent(); this.comboBox1.Items.Add("Chirurg"); this.comboBox1.Items.Add("Gynekolog"); this.comboBox1.Items.Add("Kardiolog"); this.comboBox1.Items.Add("Neurolog"); this.comboBox1.Items.Add("Psychiatr"); this.comboBox1.Items.Add("Sexuolog"); this.comboBox1.SelectedItem = 0; this.lekari = lkr; this.textBox_Jmeno.Text = lkr.Jmeno; this.textBox_Prijemni.Text = lkr.Prijmeni; this.dateTimePicker1.Value = lkr.DatumNarozeni; this.comboBox1.SelectedItem = lkr.Specializace; this.dateTimePicker2.Value = lkr.DatumUkonceniSkoly; this.textBox_Email.Text = lkr.Email; this.textBox_Telefon.Text = lkr.Telefon.ToString(); this.textBox_Role.Text = lkr.Role; this.textBox_Heslo.Text = lkr.Heslo; }
public void Update(int index, Lekari lekar) { this.Lekari[index] = lekar; this.LekariRespository.Update(lekar); }
public void Add(Lekari lekar) { this.Lekari.Add(lekar); this.LekariRespository.Insert(lekar); }
internal void Remove(Lekari lekar) { throw new NotImplementedException(); this.context.lekar.Remove(lekar); this.context.SaveChanges(); }
public void Insert(Lekari lek) { //this.context.lekar.Add(lek); this.context.SaveChanges(); }