private void UserRecord_SelectEducation_Habilitation(Education_Agent userRecord) { if (userRecord.Education_Habilitation != null) { comboBoxEducation_Habilitation.SelectedIndex = comboBoxEducation_Habilitation.FindStringExact(userRecord.Education_Habilitation.Habilitation_Name); } }
public void UserRecord_FillAdmin(Education_Agent userRecord) { if (userRecord.Agent_Admin != null) { } textBoxAdmin.Text = userRecord.Agent_Admin; }
public void UserRecord_SelectEquipe(Education_Agent userRecord) { if (userRecord.Education_SousService != null) { comboBoxEquipe.SelectedIndex = comboBoxEquipe.FindStringExact(userRecord.Education_SousService.SousService_Name); } }
public void UserRecord_PickDateFunction(Education_Agent userRecord) { if (userRecord.Education_Function != null) { dateTimePickerLastFunction.Value = Convert.ToDateTime(userRecord.Agent_DateFunction); } }
public void UserRecord_FillMatricule(Education_Agent userRecord) { if (userRecord.Agent_Matricule != null) { labelMatricule.Text = userRecord.Agent_Matricule.ToString(); } }
public void UserRecord_FillLabels(Education_Agent userRecord) { if (userRecord.Agent_FirstName != null && userRecord.Agent_Name != null) { labelNameOfUser.Text = userRecord.Agent_FirstName + " " + userRecord.Agent_Name.ToUpper(); } }
public void UserRecord_PickDateOfEntry(Education_Agent userRecord) { if (userRecord.Agent_DateOfEntry != null) { dateTimePicker_DateOfEntry.Value = Convert.ToDateTime(userRecord.Agent_DateOfEntry); } }
public void UserRecord_PickUser_DateSeniority(Education_Agent userRecord) { if (userRecord.Agent_DateSeniority != null) { dateTimePickerSeniority.Value = Convert.ToDateTime(userRecord.Agent_DateSeniority); } }
private void UserRecord_LoadUserVisualisation(long AgentMatricule) { Education_Agent userRecord = MainWindow.globalListAgents.Where(x => x.Agent_Matricule == AgentMatricule).FirstOrDefault(); CurrentAgent = userRecord; if (userRecord != null) { UserRecord_FillLabels(userRecord); UserRecord_FillLabelsActif(userRecord); UserRecord_FillMatricule(userRecord); UserRecord_FillAdmin(userRecord); UserRecord_SelectEquipe(userRecord); UserRecord_PickDateOfEntry(userRecord); UserRecord_PickUser_DateSeniority(userRecord); UserRecord_PickDateFunction(userRecord); UserRecord_FillRemarks(userRecord); UserRecord_SelectRespHiérarchique(userRecord); UserRecord_SelectStatut(userRecord); UserRecord_SelectFunction(userRecord); UserRecord_SelectRoleEPI(userRecord); UserRecord_SelectRoleAstreinte(userRecord); UserRecord_SelectEducation_Habilitation(userRecord); UserRecord_CheckRescueCheckBox(userRecord); UserRecord_CheckIsWorksManager(userRecord); UserRecord_LoadEducation_FormationsOfUser(userRecord); } }
public List <Education_AgentPassportSafety> LoadPassportSafety(Education_Agent agent) { return(db.Education_AgentPassportSafety .Include("Education_PassportSafety") .Where(x => x.Education_Agent.Agent_Id == agent.Agent_Id) .ToList()); }
public void UserRecord_SelectStatut(Education_Agent userRecord) { if (userRecord.Education_AgentStatus != null) { comboBoxStatut.SelectedIndex = comboBoxStatut.FindStringExact(userRecord.Education_AgentStatus.AgentStatus_Name); } }
private void UserRecord_SelectRoleAstreinte(Education_Agent userRecord) { if (userRecord.Agent_RoleAstreinte != null) { comboBoxAstreinte.SelectedIndex = comboBoxAstreinte .FindStringExact(userRecord.Education_RoleAstreinte.RoleAstreinte_Name); } }
private void UserRecord_SelectRoleEPI(Education_Agent userRecord) { if (userRecord.Education_RoleEPI != null) { comboBoxEPI.SelectedIndex = comboBoxEPI .FindStringExact(userRecord.Education_RoleEPI.RoleEPI_Name); } }
public void UserRecord_SelectRespHiérarchique(Education_Agent userRecord) { if (userRecord.Education_RoleEPI != null) { comboBoxEPI.SelectedIndex = comboBoxRespHierarchique .FindStringExact(userRecord.Education_RoleEPI.RoleEPI_Name); } }
public MyColumnCollectionDGAgentCertification(Education_Agent obj) { try { _obj = obj; } catch (Exception ex) { } }
private void UserRecord_LoadEducation_FormationsOfUser(Education_Agent userRecord) { List <Education_Formation> listEducation_Formation = dbEducation_Formation.LoadAllEducation_FormationOfSingleAgent(userRecord); //foreach (Control ctrl in this.tabControlAgentList.Controls[1].Controls) //{ // Console.WriteLine(ctrl.Controls); //} dg_TABFormationsOfAgent.DataSource = listEducation_Formation; }
internal void RemoveAgentFromGroup(Education_Agent agent, Education_GroupLearner selectedGrpLearner) { var agentGrp = db.Education_GroupLearner_Agent //.Include("Education_Matrice") .Where(x => x.GroupLearnerAgent_Agent == agent.Agent_Id && x.GroupLearnerAgent_GroupeLearner == selectedGrpLearner.GroupLearner_Id) .FirstOrDefault(); db.Education_GroupLearner_Agent.Remove(agentGrp); db.SaveChanges(); }
private void UserRecord_CheckRescueCheckBox(Education_Agent userRecord) { if (userRecord.Agent_IsRescueWorker == true) { checkBoxSecouriste.Checked = true; } else { checkBoxSecouriste.Checked = false; } }
private void UserRecord_CheckIsWorksManager(Education_Agent userRecord) { if (userRecord.Agent_IsWorksManager == true) { checkBox_IsWorkManager.Checked = true; } else { checkBox_IsWorkManager.Checked = false; } }
public void UserRecord_FillRemarks(Education_Agent userRecord) { if (userRecord.Agent_Remarks != null) { richTextBoxRemarks.Text = userRecord.Agent_Remarks; } else { richTextBoxRemarks.Text = ""; } }
public Education_GroupLearner_Agent AddGrpLearnerAgent(Education_Agent agent, Education_GroupLearner grpLearner) { Education_GroupLearner_Agent grpAgent = new Education_GroupLearner_Agent() { GroupLearnerAgent_GroupeLearner = grpLearner.GroupLearner_Id, GroupLearnerAgent_Agent = agent.Agent_Id }; db.Education_GroupLearner_Agent.Add(grpAgent); db.SaveChanges(); return(grpAgent); }
public List <Education_Formation> LoadAllEducation_FormationOfSingleAgent(Education_Agent education_Agent) { List <Education_Formation> listEducation_Formations = new List <Education_Formation>(); var Education_FormationUserTemp = db.Education_Agent_Formation.Where(x => x.AgentFormation_Agent == education_Agent.Agent_Id).ToList(); foreach (var Education_FormationTemp in Education_FormationUserTemp) { listEducation_Formations.Add(db.Education_Formation.Where(y => y.Formation_Id == Education_FormationTemp.AgentFormation_Formation) .FirstOrDefault()); } return(listEducation_Formations); }
public async void SaveAgent(Education_Agent userToUpdate) { if (userToUpdate != null) { var user = db.Education_Agent.Where(x => x.Agent_Id == userToUpdate.Agent_Id).FirstOrDefault(); user = userToUpdate; await db.SaveChangesAsync(); } else { db.Education_Agent.Add(userToUpdate); await db.SaveChangesAsync(); } }
public void UserRecord_FillLabelsActif(Education_Agent userRecord) { if (userRecord.Agent_Etat == true) { labelActif.Text = "Actif"; } else { if (userRecord.Agent_Etat == false) { labelActif.Text = "Inactif"; } } labelActif.Text = userRecord.Agent_Etat == null | false ? "Inactif" : "Actif"; }
public FrmCertificate(string type, bool isNew, long PassportId, Education_Agent agent) { InitializeComponent(); typeCertificate = type; AgentSelected = agent; isNewCertificate = isNew; if (isNewCertificate) { LoadNewForm(typeCertificate); } else { switch (typeCertificate) { case "Safety": AgentPassportSafetySelected = PassportSafetyRepository.LoadSinglePassport(PassportId); break; case "Business": AgentPassportBusinessSelected = PassportBusinessRepository.LoadSinglePassport(PassportId); break; case "Function": AgentCertifElecFuncSelected = CertificateElecFuncRepository.LoadSinglePassport(PassportId); break; case "OPP": AgentCertifElecOPPSelected = CertificateElecOPPRepository.LoadSinglePassport(PassportId); break; case "Design": AgentPassportDesignSelected = PassportDesignRepository.LoadSinglePassport(PassportId); break; case "Divers": AgentPassportDiversSelected = AgentCertifDiversRepository.LoadSingleCertificate(PassportId); break; } LoadForm(typeCertificate); } }
public void AssignAgentToRoute(Education_Matrice matriceSelected, Education_Agent agentSelected) { foreach (var matriceformation in matriceSelected.Education_Matrice_Formation) { Education_Matrice_Agent newRecord = new Education_Matrice_Agent() { MatriceAgent_MatriceFormation = matriceformation.MatriceFormation_Id, MatriceAgent_Agent = agentSelected.Agent_Id, MatriceAgent_Actif = true }; db.Education_Matrice_Agent.Add(newRecord); db.SaveChanges(); //var matriceFormation = db.Education_Matrice_Formation.Where(x => x.) Education_Agent_Formation newRecordAF = new Education_Agent_Formation() { AgentFormation_Agent = agentSelected.Agent_Id, AgentFormation_Formation = matriceformation.Education_Formation.Formation_Id }; db.Education_Agent_Formation.Add(newRecordAF); db.SaveChanges(); } }
public List <Education_AgentPassportBusiness> LoadPassportBusinessAgent(Education_Agent agent) { return(db.Education_AgentPassportBusiness.Where(x => x.Education_Agent.Agent_Id == agent.Agent_Id) .ToList()); }
public Education_Matrice_Agent LoadSingleTrajetAgent(Education_Matrice matriceAgent, Education_Agent agent) { return(db.Education_Matrice_Agent .Where(x => x.Education_Matrice_Formation.MatriceFormation_Matrice == matriceAgent.Matrice_Id && x.MatriceAgent_Agent == agent.Agent_Id) .FirstOrDefault()); }
public MyColumnCollectionDGAgent(Education_Agent obj) { _obj = obj; }
private void comboAgents_SelectedIndexChanged(object sender, EventArgs e) { SelectedAgent = (Education_Agent)comboAgents.SelectedItem; }