private void btnUpdateWorker_Click(object sender, EventArgs e) { if (IsTitlesValid()) { WorkerView.PersNum = tbPersNum.Text; WorkerView.FullName = tbFullName.Text; WorkerView.Birthday = Convert.ToDateTime(dtpBirthday.Value.ToShortDateString()); WorkerView.HiringDay = Convert.ToDateTime(dtpHiringDay.Value.ToShortDateString()); WorkerView.Salary = Convert.ToDecimal(tbSalary.Text); WorkerView.ProfArea = tbProfArea.Text; WorkerView.Gender = cbGender.Text; workerRepo.Edit(WorkerView); this.Close(); } }
public void Edit(Worker model) { _workerRepository.Edit(model); }