Esempio n. 1
0
        static void LoadUsersThread()
        {
            Thread y = new Thread(LoadCertificateAgents);

            y.Start();
            AgentDataAccess db = new AgentDataAccess();

            globalListAgents = db.LoadAllAgents();
        }
Esempio n. 2
0
 static void LoadUsersThread()
 {
     //Thread y = new Thread(LoadCertificateAgents);
     //y.Start();
     using (AgentDataAccess dbRep = new AgentDataAccess())
     {
         globalListAgents = dbRep.LoadAllAgents();
         UC_Certification.staticDataSource = UC_Certification.GetDataSourceStatic(globalListAgents.ToPagedList(1, globalListAgents.Count()));
     }
 }
Esempio n. 3
0
        private void RemoveUserFromGroup_CLick(object sender, EventArgs e)
        {
            AgentDataAccess agentDataAccess = new AgentDataAccess();
            var             agent           = AgentDataAccess.LoadSingleUserWithMatricule(UserIDSelected);
            DialogResult    res             = MessageBox.Show("Etes-vous certain de vouloir retirer l'agent " + agent.Agent_FullName + "du groupe?",
                                                              "Confirmation",
                                                              MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (res == DialogResult.Yes)
            {
                grpLearnearAgentRepository.RemoveAgentFromGroup(agent, SelectedGrpLearner);
                listAgentPaged        = grpLearnearAgentRepository.LoadAgentOfSelectedGroup(SelectedGrpLearner).ToPagedList(1, 50);
                dgGrpAgent.DataSource = GetDataSource(listAgentPaged);
            }
        }