-
Notifications
You must be signed in to change notification settings - Fork 0
/
elibility_form.cs
52 lines (49 loc) · 2.21 KB
/
elibility_form.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace project_bueno_vista
{
public partial class elibility_form : Form
{
Form1 main = new Form1();
public elibility_form()
{
InitializeComponent();
}
private void check_eligibility_button_Click(object sender, EventArgs e)
{
int eligibility_score = 0;
bool academic_condition = associate_s_radioButton.Checked == true || bachelor_s_degree_radioButton.Checked == true || master_s_degree_radioButton.Checked == true || doctorate_radioButton.Checked == true;
bool dot_net_projects = Convert.ToInt32(dot_net_projects_textBox.Text) >= 5;
bool knows_c_sharp = programming_language_comboBox.SelectedItem == "C#";
bool knows_mysql = primary_database_combobox.SelectedItem == "MySQL" || primary_database_combobox.SelectedItem == "Microsoft SQL Server";
bool has_linkedin = yes_radio_button.Checked == true;
if (academic_condition && dot_net_projects && knows_c_sharp && knows_mysql && has_linkedin)
{
MessageBox.Show("The applicant information has been considered eligible for database entry.", "Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
try
{
main.Enabled = true;
main.nameTextBox.Focus();
main.bueno_vista_databaseDataSet.Applicants.AddApplicantsRow(main.bueno_vista_databaseDataSet.Applicants.NewApplicantsRow());
main.applicantsBindingSource.MoveLast();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
main.panel1.Enabled = false;
MessageBox.Show("The applicant information has not been considered eligible for database entry.", "Result", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
}