Exemple #1
0
        private void metroButton1_Click(object sender, EventArgs e)
        {
            try
            {
                DateTime commYear = communicationSkillsDateTime.Value;

                int staffId       = employeeNo;
                int influence     = Int32.Parse(influenceTxtbox.Text);
                int presentation  = int.Parse(presentationTxtbox.Text);
                int relationships = Int32.Parse(relationshipTxtbox.Text);
                int listening     = int.Parse(listeningTxtbox.Text);
                int negotiation   = int.Parse(negotiationTxtbox.Text);


                int jobPerformanceNo = 0;


                CommunicationSkills cS = new CommunicationSkills(staffId, commYear, influence, presentation, relationships, listening, negotiation);

                Database.addCommunicationSkills(cS);
                Notification.showNotification();
            }
            catch (Exception ex) {
                MessageBox.Show("Something went wrong! + " + ex + "", "Update client", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        private void metroButton2_Click(object sender, EventArgs e)
        {
            try
            {
                int staffId       = employeeNo;
                int influence     = Int32.Parse(influenceTxtbox.Text);
                int presentation  = Int32.Parse(presentationTxtbox.Text);
                int relationships = Int32.Parse(relationshipTxtbox.Text);
                int listening     = Int32.Parse(listeningTxtbox.Text);
                int negotiation   = Int32.Parse(negotiationTxtbox.Text);



                CommunicationSkills cS = new CommunicationSkills(staffId, getDate(), influence, presentation, relationships, listening, negotiation);
                Database.updateCommunicationSkills(cS);
                //Notification.showNotification();
                notifyIcon1.Icon           = SystemIcons.Application;
                notifyIcon1.BalloonTipText = "Record Updated!";
                notifyIcon1.ShowBalloonTip(1000);
                CSAddBtn.Enabled    = true;
                CSUpdateBtn.Enabled = false;
            }
            catch (Exception) {
                MessageBox.Show("Integers Only", "Update client", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #3
0
 public static void updateCommunicationSkills(CommunicationSkills communicationSkillsObj)//This update works
 {
     try
     {
         DBConnection.updateDB("update communication_skills set influence = '" + communicationSkillsObj.Influence + "', presentation = '" + communicationSkillsObj.Presentation + "', relationship = '" + communicationSkillsObj.Relationships + "' , listening = '" + communicationSkillsObj.Listening + "', negotiation = '" + communicationSkillsObj.Negotiation + "' where comm_year = '" + communicationSkillsObj.CommYear.ToString("yyyy/M/d") + "'");
     }
     catch (Exception ex)
     {
         MessageBox.Show("Something went wrongYAYA! +'" + ex + "' ", "Update client", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #4
0
 public static void addCommunicationSkills(CommunicationSkills communicationSkillsObj)
 {
     try
     {
         DBConnection.updateDB("insert into communication_skills(staff_id, comm_year, influence, presentation, relationship, listening, negotiation)values('" + communicationSkillsObj.StaffId + "','" + communicationSkillsObj.CommYear + "', '" + communicationSkillsObj.Influence + "', '" + communicationSkillsObj.Presentation + "','" + communicationSkillsObj.Relationships + "','" + communicationSkillsObj.Listening + "','" + communicationSkillsObj.Negotiation + "')");
     }
     catch (Exception ex)
     {
         MessageBox.Show("Something went wrongYAYA! +'" + ex + "' ", "Update client", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }