示例#1
0
        public void Delete(int index)
        {
            Lekari lekar = this.Lekari[index];

            this.Lekari.RemoveAt(index);
            this.LekariRespository.Remove(lekar);
        }
示例#2
0
        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();
        }
示例#3
0
        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;
        }
示例#4
0
 public void Update(int index, Lekari lekar)
 {
     this.Lekari[index] = lekar;
     this.LekariRespository.Update(lekar);
 }
示例#5
0
 public void Add(Lekari lekar)
 {
     this.Lekari.Add(lekar);
     this.LekariRespository.Insert(lekar);
 }
示例#6
0
 internal void Remove(Lekari lekar)
 {
     throw new NotImplementedException();
     this.context.lekar.Remove(lekar);
     this.context.SaveChanges();
 }
示例#7
0
 public void Insert(Lekari lek)
 {
     //this.context.lekar.Add(lek);
     this.context.SaveChanges();
 }