예제 #1
0
 private void button_save_Click(object sender, EventArgs e)
 {
     try
     {
         _managementservice.Add(new Entities.Concrete.Management
         {
             Name           = name_text.Text,
             Surname        = surname_text.Text,
             Age            = Convert.ToInt32(numeric_age.Value),
             Sex            = sex_text.Text,
             CountryNo      = Convert.ToInt32(countryNo_text.Text),
             Country        = country_combo.SelectedItem.ToString(),
             City           = state_text.Text,
             PostalCode     = Convert.ToInt32(postalcode_text.Text),
             PhoneNumber    = Convert.ToInt32(number_text.Text),
             EMail          = email_text.Text,
             Academy        = academy_text.Text,
             Faculty        = faculty_text.Text,
             Department     = department_combo.SelectedItem.ToString(),
             Position       = position_text.SelectedItem.ToString(),
             Wage           = Convert.ToInt32(numeric_wage.Value),
             DateOfReg      = dateOfReg_picker.Value,
             PreviousJob    = previousJob_text.Text,
             Certifications = certifications_text.Text
         });
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message);
     }
 }