Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int newid = database.workerSet.Count() > 0 ? database.workerSet.Max(w => w.Id) + 1 : 1;

            database.AddToworkerSet(worker.Createworker(0, this.tb_f_name, this.dtp_birth_date, this.tb_adress, this.tb_passport, this.cb_proff.SelectedValue, this.dtp_entry, this.tb_last_name, this.cb_dept));
            //this.tb_f_name, this.tb_last_name, this.tb_adress, this.tb_passport, this.tb_fio,
            database.SaveChanges();
        }