private void AddButton_Click(object sender, EventArgs e)
        {
            if (
                !(SkillNameBox.Text == "Skill Name") && !string.IsNullOrEmpty(SkillNameBox.Text) &&
                !(ProficiencyBox.Text == "Proficiency") && !string.IsNullOrEmpty(ProficiencyBox.Text) &&
                !(InterestBox.Text == "Interest") && !string.IsNullOrEmpty(InterestBox.Text) &&
                !(YearsOfExperience.Text == "Years of Experience") && !string.IsNullOrEmpty(YearsOfExperience.Text)
                )
            {
                SqlConnection con = new SqlConnection(@"Data Source=OLA\SQLSERVER;Initial Catalog=ApplicantTrackingSystem;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False");
                con.Open();

                string     SkillInsertCommand = "INSERT INTO [Skill](Username,SkillName,Proficiency,Interest,ExperienceYears) VALUES (@Username,@SkillName,@Proficiency,@Interest,@ExperienceYears)";
                SqlCommand SkillInsert        = new SqlCommand(SkillInsertCommand, con);

                //@Username,@SkillName,@Proficiency,@Interest,@ExperienceYears
                SkillInsert.Parameters.AddWithValue("@Username", UserID);
                SkillInsert.Parameters.AddWithValue("@SkillName", SkillNameBox.Text);
                SkillInsert.Parameters.AddWithValue("@Proficiency", ProficiencyBox.Text);
                SkillInsert.Parameters.AddWithValue("@Interest", InterestBox.Text);
                SkillInsert.Parameters.AddWithValue("@ExperienceYears", YearsOfExperience.Text);

                SkillInsert.ExecuteNonQuery();
                con.Close();
                MessageBox.Show("Skill has been added successfully");
                ViewSkillsPanel.Show();
                AddSkillPanel.Hide();
            }
            else
            {
                MessageBox.Show("Please Fill the Empty Boxes");
            }
        }
 public CandidateSkillsManager()
 {
     InitializeComponent();
     UserID = UserLogin.LocalUsername;
     AddSkillPanel.Show();
     ViewSkillsPanel.Hide();
 }
Example #3
0
 private void CareerInterestsTab_Click(object sender, EventArgs e)
 {
     CareerPanel.Show();
     PersonalInfoPanel.Hide();
     ViewSkillsPanel.Hide();
     ViewExperiencesPanel.Hide();
     ResumePanel.Hide();
 }
Example #4
0
 private void resumeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ResumePanel.Show();
     ViewExperiencesPanel.Hide();
     PersonalInfoPanel.Hide();
     CareerPanel.Hide();
     ViewSkillsPanel.Hide();
 }
 private void ViewSkills_Click(object sender, EventArgs e)
 {
     ViewSkillsPanel.Show();
     AddSkillPanel.Hide();
 }