コード例 #1
0
ファイル: AddOrEditWorker.cs プロジェクト: Vlanker/divisions
 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();
     }
 }
コード例 #2
0
 public void Edit(Worker model)
 {
     _workerRepository.Edit(model);
 }