142
// GetTable.Get("INSERT INTO CoWorker ( Фамилия, Имя, Отчество, Пол, [Дата
рождения], Образование, Стаж , Оклад, Должность, [Дата принятия на работу],
Заявление) VALUES ( '" + txtSurname.Text + "', '" + txtName.Text + "', '" +
txtSecondName.Text + "','" + cbGender.Text + "', '" + dtpBirtday.Text.Replace('.',
'/') + "', '" + txtEducation.Text + "','" + txtExperience.Text + "', " + txtRub.Text
+ "," + txtKop.Text + ", '" + txtPost.Text + "', '" + dtpWork.Text.Replace('.', '/')
+ "', '" + File + "') ");
GetTable.Get("INSERT INTO CoWorker (Фамилия, Имя, Отчество, Пол, [Дата рождения],
Образование, Стаж, Оклад, Должность, [Дата принятия на работу], Заявление, Фото)
VALUES ('"+txtSurname.Text+"', '"+txtName.Text+"', '"+txtSecondName.Text+"'
,'"+cbGender.Text+"' ,
'"+dtpBirtday.Text.Replace('.','/')+"','"+txtEducation.Text+"',
'"+txtExperience.Text+"', '" + txtRub.Text + "," + txtKop.Text+"',
'"+txtPost.Text+"', '"+dtpWork.Text.Replace('.','/')+"', '"+File+"','"+Photo+"')");
GetTable.Get("INSERT INTO CoWorkerEducation ([Дата окончания], [Название учебного
заведения], [Полученое образование], Степень, [Номер диплома], [Дата выдачи диплома],
Специальность, Квалификация) VALUES ('" + FormDialog.EndType.Replace(".", "/") +
"','"
+ FormDialog.VUZ + "','" + FormDialog.Education + "','" + FormDialog.Degree +
"', '" + FormDialog.Diploma + "','" + FormDialog.Issuance.Replace(".", "/") + "', '"
+ FormDialog.Specialty + "', '" + FormDialog.Qualification + "')");
FormDialog.Education = null;
Close();
//// }
// catch (Exception ex)
// {
// if (ex.Source == "mscorlib")
// {
// MessageBox.Show("Файл заявления с таким именем существует, используйте
другой файл и повторите попытку. ");
// }
// }
}
else MessageBox.Show("Заполните все данные");
}
private void fmAddCoWorker_Activated(object sender, EventArgs e)
{
if (FormDialog.Education != null)
{
txtEducation.Text = FormDialog.Education;
}
else
{
txtEducation.Text = "<Образование>";
}
}
private void chPhoto_Click(object sender, EventArgs e)
{
if (sender is CheckBox)
((CheckBox)sender).Checked = !((CheckBox)sender).Checked;
}