public void ShowUpdateInterpersonal(InterpersonalSkills interpersonalSkill) { var interpersonalSkills = applicationDbContext.InterpersonalSkills .Where(x => x.InterpersonalSkillsId == interpersonalSkill.InterpersonalSkillsId) .SingleOrDefault(); interpersonalSkills.InterpersonalSkillsId = interpersonalSkill.InterpersonalSkillsId; interpersonalSkills.InterpersonalSkillName = interpersonalSkill.InterpersonalSkillName; applicationDbContext.SaveChanges(); }
public void addInterpersonalSkill(InterpersonalSkills interpersonalSkills) { InterpersonalSkills interpersonalSkill = new InterpersonalSkills() { InterpersonalSkillName = interpersonalSkills.InterpersonalSkillName, }; applicationDbContext.InterpersonalSkills.Add(interpersonalSkill); applicationDbContext.SaveChanges(); }
public static void updateInterpersonalSkills(InterpersonalSkills interpersonalSkillsObj) { try { DBConnection.updateDB("update interpersonal_skills set interaction_with_customers ='" + interpersonalSkillsObj.InteractionWithCoworkers + "' , interaction_with_supervisors = '" + interpersonalSkillsObj.InteractionWithSupervisors + "', interaction_with_clients = '" + interpersonalSkillsObj.InteractionWithClients + "', motivational_skills = '" + interpersonalSkillsObj.MotivationalSkills + "', leadership = '" + interpersonalSkillsObj.Leadership + "' where inter_year = '" + interpersonalSkillsObj.InterYear.ToString("yyyy/M/d") + "'"); } catch (Exception) { MessageBox.Show("Something went wrong!", "Update client", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static void addInterpersonalSkills(InterpersonalSkills interpersonalSkillsObj) { try { DBConnection.updateDB("insert into interpersonal_skills(staff_id, inter_year, interaction_with_customers, interaction_with_supervisors, interaction_with_clients, motivational_skills, leadership)values('" + interpersonalSkillsObj.StaffId + "','" + interpersonalSkillsObj.InterYear.ToString("yyyy/M/d") + "', '" + interpersonalSkillsObj.InteractionWithCoworkers + "', '" + interpersonalSkillsObj.InteractionWithSupervisors + "','" + interpersonalSkillsObj.InteractionWithClients + "','" + interpersonalSkillsObj.MotivationalSkills + "','" + interpersonalSkillsObj.Leadership + "')"); } catch (Exception) { MessageBox.Show("Something went wrong!", "Update client", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public InterpersonalSkills UpdateInterpersonalSkill(int interpersonalSkillId) { var interpersonalSkills = applicationDbContext.InterpersonalSkills .Where(x => x.InterpersonalSkillsId == interpersonalSkillId).SingleOrDefault(); InterpersonalSkills interpersonalSkills1 = new InterpersonalSkills { InterpersonalSkillsId = interpersonalSkills.InterpersonalSkillsId, InterpersonalSkillName = interpersonalSkills.InterpersonalSkillName, }; return(interpersonalSkills1); }
private void metroButton2_Click(object sender, EventArgs e) { //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; try { int staffId = employeeNo; int interactionWithCoworkers = Int32.Parse(interactionWithCoworkersTxtbox.Text); int interactionWithSupervisors = Int32.Parse(interactionWithSupervisorsTxtbox.Text); int interactionWithClients = Int32.Parse(interactionWithClientsTxtbox.Text); int motivationalSkills = Int32.Parse(motivationalSkillsTxtbox.Text); int leadership = Int32.Parse(LeadershipTxtbox.Text); InterpersonalSkills iPS = new InterpersonalSkills(staffId, getDate(), interactionWithCoworkers, interactionWithSupervisors, interactionWithClients, motivationalSkills, leadership); Database.updateInterpersonalSkills(iPS); notifyIcon1.Icon = SystemIcons.Application; notifyIcon1.BalloonTipText = "Record Updated!"; notifyIcon1.ShowBalloonTip(1000); ISaddBtn.Enabled = true; ISupdateBtn.Enabled = false; } catch (Exception ex) { MessageBox.Show("Something went wrong! + " + ex + "", "Update client", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void metroButton2_Click(object sender, EventArgs e) { try { DateTime interYear = interpersonalSkillsDateTime.Value; int staffId = employeeNo; int interactionWithCoworkers = Int32.Parse(interactionWithCoworkersTxtbox.Text); int interactionWithSupervisors = Int32.Parse(interactionWithSupervisorsTxtbox.Text); int interactionWithClients = Int32.Parse(interactionWithClientsTxtbox.Text); int motivationalSkills = Int32.Parse(motivationalSkillsTxtbox.Text); int leadership = Int32.Parse(LeadershipTxtbox.Text); InterpersonalSkills iPS = new InterpersonalSkills(staffId, interYear, interactionWithCoworkers, interactionWithSupervisors, interactionWithClients, motivationalSkills, leadership); Database.updateInterpersonalSkills(iPS); Notification.showNotification(); ISaddBtn.Enabled = true; ISupdateBtn.Enabled = false; interpersonalSkillsDateTime.Enabled = true; } catch (Exception ex) { MessageBox.Show("Something went wrong! + " + ex + "", "Update client", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public IActionResult InterpersonalSkillEdit(InterpersonalSkills interpersonalSkills) { userSkillsRepository.ShowUpdateInterpersonal(interpersonalSkills); return(RedirectToAction("InterpersonalSkills", "Skill")); }
public IActionResult InterpersonalSkillEdit(int interpersonalSkillId) { InterpersonalSkills interpersonalSkills = userSkillsRepository.UpdateInterpersonalSkill(interpersonalSkillId); return(View(interpersonalSkills)); }
public IActionResult CreateInterpersonalSkill(InterpersonalSkills interpersonalSkills) { userSkillsRepository.addInterpersonalSkill(interpersonalSkills); return(RedirectToAction("InterpersonalSkills", "Skill")); }