Beispiel #1
0
        private void mnuUpdate_Click(object sender, EventArgs e)
        {
            if (!clsValidation.ValidateTextBox(txtSkillID))
            {
                txtSkillID.Focus();
                return;
            }
            if (!clsValidation.ValidateTextBox(txtSkillName))
            {
                txtSkillName.Focus();
                return;
            }
            if (!clsValidation.ValidateForAlphabet(txtSkillName))
            {
                txtSkillName.Focus();
                return;
            }
            if (!clsValidation.ValidateTextBox(txtSkillDescription))
            {
                txtSkillDescription.Focus();
                return;
            }
            clsSkills objSkills = new clsSkills(Convert.ToInt32(txtSkillID.Text), txtSkillName.Text, txtSkillDescription.Text);

            objSkills.Update();
            MessageBox.Show("Skill successfully updated");
            objSkills.ViewAll(dgvSkills);
        }
Beispiel #2
0
        private void mnuDelete_Click(object sender, EventArgs e)
        {
            if (!clsValidation.ValidateTextBox(txtSkillID))
            {
                txtSkillID.Focus();
                return;
            }

            clsSkills objSkills = new clsSkills(Convert.ToInt32(txtSkillID.Text));

            objSkills.Delete();
            MessageBox.Show("Skill successfully deleted");
            objSkills.ViewAll(dgvSkills);
        }
Beispiel #3
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (!clsValidation.ValidateTextBoxForNumeric(txtSkillID))
            {
                txtSkillID.Focus();
                return;
            }
            clsSkills objSkills = new clsSkills(Convert.ToInt32(txtSkillID.Text));
            bool      valid     = objSkills.Search();

            if (valid)
            {
                txtSkillName.Text        = objSkills.SkillName;
                txtSkillDescription.Text = objSkills.SkillDescription;
            }
        }
Beispiel #4
0
        private void mnuAdd_Click(object sender, EventArgs e)
        {
            if (!clsValidation.ValidateTextBox(txtSkillName))
            {
                txtSkillName.Focus();
                return;
            }
            if (!clsValidation.ValidateForAlphabet(txtSkillName))
            {
                txtSkillName.Focus();
                return;
            }
            if (!clsValidation.ValidateTextBox(txtSkillDescription))
            {
                txtSkillDescription.Focus();
                return;
            }
            clsSkills objSkills = new clsSkills(txtSkillName.Text, txtSkillDescription.Text);

            objSkills.Add();
            MessageBox.Show("Skill successfully added");
            objSkills.ViewAll(dgvSkills);
        }
Beispiel #5
0
        private void SkillsForm_Load(object sender, EventArgs e)
        {
            clsSkills objSkills = new clsSkills();

            objSkills.ViewAll(dgvSkills);
        }
Beispiel #6
0
        private void mnuViewAll_Click(object sender, EventArgs e)
        {
            clsSkills objSkills = new clsSkills();

            objSkills.ViewAll(dgvSkills);
        }