예제 #1
0
        //Get skills Request Button
        private void getSkillsKnownButton_Click(object sender, EventArgs e)
        {
            try
            {
                IStudentSkillsSet _studentSkillSet = new StudentSkillsSet();

                _studentID = 700;
                Technlogies _resultTechDetails = _studentSkillSet.getStudentSkillSetById(_studentID);

                displayUIProgLangLabel.Text       = (_resultTechDetails.UIProgramming);
                displayProgrammingLangsLable.Text = _resultTechDetails.ProgrammingLang;
                displayDBLangLabel.Text           = _resultTechDetails.DbProgramming;
                tools1TextBox.Text          = _resultTechDetails.Tools;
                Certifications1TextBox.Text = _resultTechDetails.Certificates;
                commentsTextBox.Text        = _resultTechDetails.Comments;
                OthersTextBox.Text          = _resultTechDetails.Others;

                programmingCheckedListBox.ClearSelected();
                uiLanguagesCheckedListBox.ClearSelected();
                dbLanguagesCheckedListBox.ClearSelected();
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }
예제 #2
0
        //Function to update Skills Button
        private void updateSkillsButton_Click(object sender, EventArgs e)
        {
            try
            {
                IStudentSkillsSet _skills = new StudentSkillsSet();

                Technlogies tech = new Technlogies();

                StringBuilder _stringBuild = new StringBuilder();
                int           count        = 0;

                tech.StudentId = _studentID;

                foreach (var programmlangs in programmingCheckedListBox.CheckedItems)
                {
                    count++;

                    _stringBuild.Append(programmlangs);
                }

                if (_stringBuild.Length > 0)
                {
                    tech.ProgrammingLang = _stringBuild.ToString();
                }
                else
                {
                    tech.ProgrammingLang = "None";
                }
                _stringBuild.Clear();


                foreach (var clientLangs in uiLanguagesCheckedListBox.CheckedItems)
                {
                    count++;
                    _stringBuild.Append(clientLangs);
                }

                if (_stringBuild.Length > 0)
                {
                    tech.UIProgramming = _stringBuild.ToString();
                }
                else
                {
                    tech.UIProgramming = "None";
                }

                _stringBuild.Clear();

                foreach (var dbLangs in dbLanguagesCheckedListBox.CheckedItems)
                {
                    count++;
                    _stringBuild.Append(dbLangs);
                }

                if (_stringBuild.Length > 0)
                {
                    tech.DbProgramming = _stringBuild.ToString();
                }
                else
                {
                    tech.DbProgramming = " None";
                }
                _stringBuild.Clear();


                if (!string.IsNullOrEmpty(tools1TextBox.Text))
                {
                    count++;
                    _stringBuild.Append(tools1TextBox.Text);
                    if (!string.IsNullOrEmpty(tools2TextBox.Text))
                    {
                        count++;
                        _stringBuild.Append(",");
                        _stringBuild.Append(tools2TextBox.Text);
                    }
                }

                if (_stringBuild.Length > 0)
                {
                    tech.Tools = _stringBuild.ToString();
                }
                else
                {
                    tech.Tools = " None";
                }
                _stringBuild.Clear();

                if (!string.IsNullOrEmpty(Certifications1TextBox.Text))
                {
                    count++;
                    _stringBuild.Append(Certifications1TextBox.Text);
                    if (!string.IsNullOrEmpty(certification2TextBox.Text))
                    {
                        count++;
                        _stringBuild.Append(certification2TextBox.Text);
                    }

                    tech.Certificates = _stringBuild.ToString();
                    _stringBuild.Clear();
                }
                else
                {
                    tech.Certificates = "None";
                }

                if (!string.IsNullOrEmpty(OthersTextBox.Text))
                {
                    tech.Others = OthersTextBox.Text;
                }
                else
                {
                    tech.Others = "none";
                }

                if (!string.IsNullOrEmpty(commentsTextBox.Text))
                {
                    tech.Comments = commentsTextBox.Text;
                }
                else
                {
                    tech.Comments = "none";
                }

                tech.TotalScore = count;

                string _result = _skills.UpDateTechDetails(tech);

                MessageBox.Show(_result);
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }