Пример #1
0
        private void tbFunction_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            switch (e.Button.Tag.ToString())
            {
            case "JOURFERIER":
                new FormJourFerier(_ColJourFerier, _formMain.AppConfig).ShowDialog(this);
                UpdateBoldedDate();
                SetDate();
                break;

            case "REFRESH":
                RefreshView();
                break;

            case "SHOWCLIENT":
                if (tabControl1.SelectedTab.Tag.ToString() == "DAY")
                {
                    _formMain.CreationListClient(listViewEx1.SelectedItems[0].SubItems[1].Text);
                }
                else
                {
                    _formMain.CreationListClient(_SelectedItemsInfos.ContratNumber);
                }
                break;

            case "SHOWSEANCE":
                if (tabControl1.SelectedTab.Tag.ToString() == "DAY")
                {
                    if (clientControl1.ShowCours() == DialogResult.OK)
                    {
                        RefreshView();
                    }
                }
                else
                {
                    clientControl1.Client = _ClientList.GetClient(_SelectedItemsInfos.ContratNumber);
                    if (clientControl1.ShowCours() == DialogResult.OK)
                    {
                        RefreshView();
                    }
                }
                break;

            case "PRINT":
                PrintNormal();
                break;

            case "DELETENOTES":
                DeleteAllNotes();
                break;
            }
        }
Пример #2
0
        /// <summary>
        /// Supprime l'étudiant sélectionné et le transfère dans le groupe 0
        /// </summary>
        private void DeleteSelectedStudent()
        {
            Customer client;

            foreach (ListViewItem item in listFindResult.SelectedItems)
            {
                client = _ClientList.GetClient(item.Text);

                if (client != null)
                {
                    client.NumeroGroupe = 0;
                    item.Remove();
                    UpdateNbEleve();
                }
            }
        }
Пример #3
0
 private void lvClient_SelectedIndexChanged(object sender, EventArgs e)
 {
     try {
         clientControl1.Client = _ClientList.GetClient(lvClient.SelectedItems[0].SubItems[1].Text);
         cmdAccept.Enabled     = true;
     }
     catch {
         clientControl1.CloseClient();
         cmdAccept.Enabled = false;
     };
 }
Пример #4
0
        //private void FindClient(bool AddCoursTerminer, string CoursNumbers)
        //{
        //    listFindResult.Items.Clear();


        //    var ListClientTous = from V in _clientList.Cast<Customer>()
        //                         where V.ContratNumber.Contains(ContainContractNumber) && V.GetCustomerType() == _groupe.Type
        //                         select V;

        //    var ListClient = from V in _clientList.Cast<Customer>()
        //                     where V.ContratNumber.Contains(ContainContractNumber) && V.GetCustomerType() == _groupe.Type && V.TypeClient != ProfileType.CoursTerminer
        //                     select V;


        //    //Recherche dans tous les clients
        //    if (AddCoursTerminer)
        //        foreach (Customer client in ListClientTous)
        //            AddClientToList(client);
        //    else
        //        foreach (Customer client in ListClient)
        //            AddClientToList(client);
        //}

        /// <summary>
        /// Transfere toute client selectionner vers le groupe cible this._groupnumber
        /// </summary>
        private void MakeGroup()
        {
            //Ferme le client ouvert dans FormClient si la from est ouverte.

            //Applique le changement de groupe
            Customer client;

            foreach (ListViewItem item in listFindResult.CheckedItems)
            {
                client = _clientList.GetClient(item.Text);
                client.NumeroGroupe = _groupe.GroupeNumber;
            }
        }
Пример #5
0
        private void cmdAddClient_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show(this, "Voulez-vous vraiment effectuer les changements sur tous les élèves de votre groupe ?", _AppConfig.ApplicationName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                foreach (Customer client in _ClientList.GetClient(_Groupe.GroupeNumber))
                {
                    //Supprimer la seance No. Seancepicker1.seancenumber de chaque client
                    foreach (Seance cours in client.SeancesTheorique)
                    {
                        if (cours.SceanceNumber == seancePicker1.NumeroSeance)
                        {
                            client.SeancesTheorique.Remove(cours);
                            break;
                        }
                    }

                    client.SeancesTheorique.Add(seancePicker1.Seance);
                }
            }
        }
Пример #6
0
        /// <summary>
        /// Mise a jour de la recherche après modification
        /// </summary>
        private void UpdateFind()
        {
            Customer client = _clientlist.GetClient(ListCours.SelectedItems[0].Text);

            for (int i = 0; i < 15; i++)
            {
                ListCours.SelectedItems[0].SubItems[i + 4].Text = " ";
            }

            switch (client.ProgramMoto)
            {
            case ProgramMoto.Program2015:
                ListCours.SelectedItems[0].SubItems[13].Text = "Nouveau";
                break;

            case ProgramMoto.ProgramNormal:
                ListCours.SelectedItems[0].SubItems[13].Text = "Ancien";
                break;
            }

            switch (tbbActivateModePratique.Pushed)
            {
            case false:
                for (int j = 0; j < client.SeancesTheorique.Count; j++)
                {
                    if (client.ProgramMoto == ProgramMoto.Program2015)
                    {
                        switch (client.SeancesTheorique[j].SceanceNumber)
                        {
                        case 1:
                            ListCours.SelectedItems[0].SubItems[4].Text = "X";
                            break;

                        case 6:
                            ListCours.SelectedItems[0].SubItems[5].Text = "X";
                            break;
                        }
                    }
                    else
                    {
                        switch (client.SeancesTheorique[j].SceanceNumber)
                        {
                        case 1:
                            ListCours.SelectedItems[0].SubItems[4].Text = "X";
                            break;

                        case 2:
                            ListCours.SelectedItems[0].SubItems[5].Text = "X";
                            break;

                        case 3:
                            ListCours.SelectedItems[0].SubItems[6].Text = "X";
                            break;
                        }
                    }
                }
                break;

            case true:
                for (int j = 0; j < client.Seances.Count; j++)
                {
                    if (client.ProgramMoto == ProgramMoto.Program2015)
                    {
                        switch (client.Seances[j].SceanceNumber)
                        {
                        case 2:
                            ListCours.SelectedItems[0].SubItems[4].Text = "X";
                            break;

                        case 3:
                            ListCours.SelectedItems[0].SubItems[5].Text = "X";
                            break;

                        case 4:
                            ListCours.SelectedItems[0].SubItems[6].Text = "X";
                            break;

                        case 5:
                            ListCours.SelectedItems[0].SubItems[7].Text = "X";
                            break;

                        case 7:
                            ListCours.SelectedItems[0].SubItems[8].Text = "X";
                            break;

                        case 8:
                            ListCours.SelectedItems[0].SubItems[9].Text = "X";
                            break;

                        case 9:
                            ListCours.SelectedItems[0].SubItems[10].Text = "X";
                            break;

                        case 10:
                            ListCours.SelectedItems[0].SubItems[11].Text = "X";
                            break;

                        case 11:
                            ListCours.SelectedItems[0].SubItems[12].Text = "X";
                            break;
                        }
                    }
                    else
                    {
                        switch (client.Seances[j].SceanceNumber)
                        {
                        case 1:
                            ListCours.SelectedItems[0].SubItems[4].Text = "X";
                            break;

                        case 2:
                            ListCours.SelectedItems[0].SubItems[5].Text = "X";
                            break;

                        case 3:
                            ListCours.SelectedItems[0].SubItems[6].Text = "X";
                            break;

                        case 4:
                            ListCours.SelectedItems[0].SubItems[7].Text = "X";
                            break;

                        case 5:
                            ListCours.SelectedItems[0].SubItems[8].Text = "X";
                            break;

                        case 6:
                            ListCours.SelectedItems[0].SubItems[9].Text = "X";
                            break;

                        case 7:
                            ListCours.SelectedItems[0].SubItems[10].Text = "X";
                            break;

                        case 8:
                            ListCours.SelectedItems[0].SubItems[11].Text = "X";
                            break;

                        case 9:
                            ListCours.SelectedItems[0].SubItems[12].Text = "X";
                            break;
                        }
                    }
                }
                break;
            }
        }
Пример #7
0
        /// <summary>
        /// Mise a jour de la recherche après modification
        /// </summary>
        private void UpdateFind()
        {
            Customer client = _clientlist.GetClient(ListCours.SelectedItems[0].Text);

            for (int i = 0; i < 15; i++)
            {
                ListCours.SelectedItems[0].SubItems[i + 4].Text = " ";
            }

            switch (tbbActivateModePratique.Pushed)
            {
            case false:
                for (int j = 0; j < client.SeancesTheorique.Count; j++)
                {
                    switch (client.SeancesTheorique[j].SceanceNumber)
                    {
                    case 1:
                        ListCours.SelectedItems[0].SubItems[4].Text = "X";
                        break;

                    case 2:
                        ListCours.SelectedItems[0].SubItems[5].Text = "X";
                        break;

                    case 3:
                        ListCours.SelectedItems[0].SubItems[6].Text = "X";
                        break;

                    case 4:
                        ListCours.SelectedItems[0].SubItems[7].Text = "X";
                        break;

                    case 5:
                        ListCours.SelectedItems[0].SubItems[8].Text = "X";
                        break;

                    case 6:
                        ListCours.SelectedItems[0].SubItems[9].Text = "X";
                        break;

                    case 7:
                        ListCours.SelectedItems[0].SubItems[10].Text = "X";
                        break;

                    case 8:
                        ListCours.SelectedItems[0].SubItems[11].Text = "X";
                        break;

                    case 9:
                        ListCours.SelectedItems[0].SubItems[12].Text = "X";
                        break;

                    case 10:
                        ListCours.SelectedItems[0].SubItems[13].Text = "X";
                        break;

                    case 11:
                        ListCours.SelectedItems[0].SubItems[14].Text = "X";
                        break;

                    case 12:
                        ListCours.SelectedItems[0].SubItems[15].Text = "X";
                        break;
                    }
                }
                break;

            case true:
                for (int j = 0; j < client.Seances.Count; j++)
                {
                    switch (client.Seances[j].SceanceNumber)
                    {
                    case 1:
                        ListCours.SelectedItems[0].SubItems[4].Text = "X";
                        break;

                    case 2:
                        ListCours.SelectedItems[0].SubItems[5].Text = "X";
                        break;

                    case 3:
                        ListCours.SelectedItems[0].SubItems[6].Text = "X";
                        break;

                    case 4:
                        ListCours.SelectedItems[0].SubItems[7].Text = "X";
                        break;

                    case 5:
                        ListCours.SelectedItems[0].SubItems[8].Text = "X";
                        break;

                    case 6:
                        ListCours.SelectedItems[0].SubItems[9].Text = "X";
                        break;

                    case 7:
                        ListCours.SelectedItems[0].SubItems[10].Text = "X";
                        break;

                    case 8:
                        ListCours.SelectedItems[0].SubItems[11].Text = "X";
                        break;

                    case 9:
                        ListCours.SelectedItems[0].SubItems[12].Text = "X";
                        break;

                    case 10:
                        ListCours.SelectedItems[0].SubItems[13].Text = "X";
                        break;

                    case 11:
                        ListCours.SelectedItems[0].SubItems[14].Text = "X";
                        break;

                    case 12:
                        ListCours.SelectedItems[0].SubItems[15].Text = "X";
                        break;

                    case 13:
                        ListCours.SelectedItems[0].SubItems[16].Text = "X";
                        break;

                    case 14:
                        ListCours.SelectedItems[0].SubItems[17].Text = "X";
                        break;

                    case 15:
                        ListCours.SelectedItems[0].SubItems[18].Text = "X";
                        break;
                    }
                }
                break;
            }
        }