private void lnkLbl_ExistantFailure_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (this.failureType != null)
            {
                //get the list of failures
                frm_ListOf frm = new frm_ListOf(Subject.FailureSbjct, this.failureType);
                frm.ShowDialog();

                if (frm.Tag != null)
                {
                    this.Failure = (Panne)frm.Tag;

                    txtBx_Failure.Text = this.Failure.getName();
                    FailureDesc        = this.Failure.getDescription();
                    this.procedure.setPanne(this.Failure);
                    try
                    {
                        this.Failure.setTypePanne(this.failureType);
                    }
                    catch (Exception) { }
                }
            }
            else
            {
                MessageBox.Show(this, "Sélectionnez un type de panne d'abord", "Message d'erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public async Task <ActionResult <Panne> > PostPanne(Panne panne)
        {
            _context.pannes.Add(panne);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPanne", new { id = panne.Id }, panne));
        }
        public async Task <IActionResult> PutPanne(int id, Panne panne)
        {
            if (id != panne.Id)
            {
                return(BadRequest());
            }

            _context.Entry(panne).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!PanneExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemple #4
0
        /// <summary>
        /// inserts a panne to "panne.xml".
        /// </summary>
        /// <param name="expert">The object holding the data</param>
        /// <returns></returns>
        private static bool insert(Panne failure)
        {
            try
            {
                XmlDocument       XmlDoc = new XmlDocument();
                XPathNavigator    Navigator;
                XPathNodeIterator Nodes;
                Int32             ID; /* Variable utilisée pour savoir quel est l'ID qu'il faut affecter au nouveau
                                       * noeud créé */
                string rslt = Helper.service.LoadFile("panne.xml").ToString();

                StreamWriter sw = new StreamWriter(System.Windows.Forms.Application.StartupPath + "\\temp.xml");
                sw.Write(rslt);
                sw.Close();


                XmlDoc.Load(System.Windows.Forms.Application.StartupPath + "\\temp.xml");
                Navigator = XmlDoc.CreateNavigator();

                /* Recherche du noeud MaxID pour déterminer quelle sera l'ID du nouveau
                 * procedure. */
                string ExpXPath = "//MaxID";
                Nodes = Navigator.Select(Navigator.Compile(ExpXPath));
                Nodes.MoveNext();
                /* On place l'ID le plus élevé du document dans la variable ID */
                ID = Nodes.Current.ValueAsInt;

                /* On incrémente la valeur du noeud MaxID car une fois notre nouveau noeud
                 * créé, l'ID le plus élevé du document sera aussi incrémenté */
                Nodes.Current.SetValue((ID + 1).ToString());
                /* On se place sur le noeud ayant l'ID le plus élevé */
                ExpXPath = "//panne[@id='" + ID.ToString() + "']";
                Nodes    = Navigator.Select(Navigator.Compile(ExpXPath));
                if (Nodes.Count != 0)
                {
                    Nodes.MoveNext();
                    /* On crée le noeud principal (panne). */
                    Nodes.Current.InsertElementAfter("", "panne", "", "");
                    /* On se place sur le noeud ainsi créé. */
                    Nodes.Current.MoveToNext(XPathNodeType.Element);
                    ID++; /* On incrémente ID pour que sa valeur soit identique à celle se
                           * trouvant dans le noeud MaxID. */
                    /* Encodage des données */
                    Nodes.Current.CreateAttribute("", "id", "", ID.ToString());
                    Nodes.Current.AppendChildElement("", "libelle", "", failure.getName());
                    Nodes.Current.AppendChildElement("", "description", "", failure.getDescription());
                    Nodes.Current.AppendChildElement("", "type_panne", "", failure.getTypePanne().getId().ToString());
                    //XmlDoc.Save((Stream)Helper.service.LoadFile("panne.xml");
                    Helper.service.SaveXmlFile("panne.xml", XmlDoc);
                }
                else
                {
                    return(false);
                }
            }
            catch (System.IO.FileNotFoundException x) { }catch (Exception x) {// System.Windows.Forms.MessageBox.Show(x.ToString());
            }
            return(true);
        }
Exemple #5
0
 public Intervention(float dureePrevue, string description, Panne unePanne)
 {
     this._dureePrevue = dureePrevue;
     this._description = description;
     this._laPanne     = unePanne;
     this._dureeReelle = 0;
     this._statut      = "paul";
     _collInterventions.Add(this);
 }
Exemple #6
0
        /// <summary>
        /// Creates the file "panne.xml" and inserts the first panne to it.
        /// </summary>
        /// <param name="expert">The object holding the data.</param>
        /// <returns></returns>
        private static bool firstAdd(Panne failure)
        {
            try
            {
                XmlWriterSettings wSettings = new XmlWriterSettings();
                wSettings.Indent = true;
                MemoryStream ms = new MemoryStream();
                XmlWriter    xw = XmlWriter.Create(ms, wSettings);// Write Declaration
                xw.WriteStartDocument();

                // Write the root node
                xw.WriteStartElement("Pannes");//<Pannes>

                // Write the expert and the expert elements
                xw.WriteStartElement("panne");//<panne>
                xw.WriteStartAttribute("id");
                xw.WriteString("0");
                xw.WriteEndAttribute();
                //----------------
                xw.WriteStartElement("libelle");     //<libelle>
                xw.WriteString(failure.getName());
                xw.WriteEndElement();                //</libelle>
                //-----------------
                xw.WriteStartElement("description"); //<description>
                xw.WriteString(failure.getDescription());
                xw.WriteEndElement();                //</description>
                //-----------------
                xw.WriteStartElement("type_panne");  //<type_panne>
                xw.WriteString(failure.getTypePanne().getId().ToString());
                xw.WriteEndElement();                //</type_panne>
                //-----------------
                xw.WriteEndElement();                //</panne>

                xw.WriteStartElement("MaxID");       //<MaxID>
                xw.WriteString("0");
                xw.WriteEndElement();                //</MaxID>

                // Close the document
                xw.WriteEndDocument();//</Pannes>

                // Flush the write
                xw.Flush();

                Byte[] buffer = new Byte[ms.Length];
                buffer = ms.ToArray();
                string xmlOutput = System.Text.Encoding.UTF8.GetString(buffer);

                //File.WriteAllText((Stream)Helper.service.LoadFile("panne.xml", xmlOutput);
                Helper.service.CreateXmlFile("panne.xml", xmlOutput);
            }
            catch (System.IO.FileNotFoundException x) { }
            catch (Exception x) {// System.Windows.Forms.MessageBox.Show(x.ToString());
            }
            return(true);
        }
Exemple #7
0
        public static Panne GetById(int id)
        {
            /* On déclare et on crée une instance des variables nécéssaires pour la recherche */
            Panne panne = new Panne();

            try
            {
                string rslt = Helper.service.LoadFile("panne.xml").ToString();

                StreamWriter sw = new StreamWriter(System.Windows.Forms.Application.StartupPath + "\\temp.xml");
                sw.Write(rslt);
                sw.Close();


                //XPathDocument XPathDocu = new XPathDocument((Stream)Helper.service.LoadFile("Experts.xml"));
                XPathDocument     XPathDocu = new XPathDocument(System.Windows.Forms.Application.StartupPath + "\\temp.xml");
                XPathNavigator    Navigator;
                XPathNodeIterator Nodes;

                /* On affecte false à  la
                 * /* On crée un navigateur */
                Navigator = XPathDocu.CreateNavigator();

                string ExpXPath = "//panne[@id='" + id + "']";
                /* On lance la recherche */
                Nodes = Navigator.Select(Navigator.Compile(ExpXPath));
                /* On vérifie si la recherche a été fructueuse */
                if (Nodes.Count != 0)
                {
                    Nodes.MoveNext(); // NOTE: Necéssaire pour se placer sur le noeud recherché
                    /* Encodage des données dans la classe Etape */
                    panne.setId(id);
                    Nodes.Current.MoveToFirstChild(); /* On se déplace sur le premier noeud
                                                       * enfant "Libelle" */
                    panne.setName(Nodes.Current.Value);
                    Nodes.Current.MoveToNext();       // On se déplace sur le noeud suivant "Description"
                    panne.setDescription(Nodes.Current.Value);
                    Nodes.Current.MoveToNext();       // On se déplace sur le noeud suivant "type_panne"
                    panne.setTypePanne(XMLFailureType.GetById(Convert.ToInt32(Nodes.Current.Value)));
                }
                /* Si aucun expert n'a été trouvé */
                else
                {
                    panne = null;
                }
            }
            catch (System.IO.FileNotFoundException x) { }catch (Exception x)
            {
                System.Windows.Forms.MessageBox.Show(x.ToString());
            }
            /* Renvoi de toutes les données dans une instance de la classe "etape" */
            return(panne);
        }
Exemple #8
0
 public static bool Add(Panne failure)
 {
     //If the file exists we insert a new element.
     if (Helper.service.FileExists("panne.xml"))
     {
         return(insert(failure));
     }
     else //Otherwise we create the file and insert the first elemet.
     {
         return(firstAdd(failure));
     }
 }
Exemple #9
0
        /// <summary>
        /// Modifies the Dailure Data.
        /// </summary>
        /// <param name="login">The id of the target Failure object.</param>
        /// <param name="admin">The object that holds the new data.</param>
        /// <returns></returns>
        public static bool Update(int id, Panne failure)
        {
            try
            {
                /* On utilise un XmlDocument et non un XPathDocument car ce dernier ne permet
                 * pas l'édition des données XML. */
                XmlDocument       XmlDoc = new XmlDocument();
                XPathNavigator    Navigator;
                XPathNodeIterator Nodes;
                string            rslt = Helper.service.LoadFile("panne.xml").ToString();

                StreamWriter sw = new StreamWriter(System.Windows.Forms.Application.StartupPath + "\\temp.xml");
                sw.Write(rslt);
                sw.Close();


                XmlDoc.Load(System.Windows.Forms.Application.StartupPath + "\\temp.xml");
                Navigator = XmlDoc.CreateNavigator();
                string ExpXPath = "//panne[@id='" + id.ToString() + "']";
                Nodes = Navigator.Select(Navigator.Compile(ExpXPath));
                if (Nodes.Count != 0)
                {
                    /* Encodage des nouvelles données */
                    Nodes.MoveNext();
                    Nodes.Current.MoveToFirstAttribute();
                    Nodes.Current.SetValue(failure.getId().ToString());
                    Nodes.Current.MoveToParent();

                    Nodes.Current.MoveToFirstChild();
                    //System.Windows.Forms.MessageBox.Show(Nodes.Current.Name.ToString() + " | " + Nodes.Current.Value.ToString());
                    Nodes.Current.SetValue(failure.getName());
                    Nodes.Current.MoveToNext(XPathNodeType.Element);
                    Nodes.Current.SetValue(failure.getDescription());
                    Nodes.Current.MoveToNext(XPathNodeType.Element);
                    Nodes.Current.SetValue(failure.getTypePanne().getId().ToString());
                    //XmlDoc.Save((Stream)Helper.service.LoadFile("panne.xml");
                    Helper.service.SaveXmlFile("panne.xml", XmlDoc);
                }
                else
                {
                    return(false);
                }
            }
            catch (System.IO.FileNotFoundException x) { }catch (Exception x)
            { System.Windows.Forms.MessageBox.Show(x.ToString()); }
            return(true);
        }
        public static Tournee TourneePlusProche(Panne unePanne)
        {// Peremt de returné la tourné qui est en cours où se trouve la prochaine panne la plus proche
            int     distance = Int32.MaxValue;
            Tournee maTournee;

            foreach (Tournee uneTournee in Tournee.CollLesTournees)
            {
                foreach (Intervention uneIntervention in uneTournee.LesInterventions)
                {
                    if (distance >= DistanceDeuxLampadaire(uneIntervention.LaPanne.LeLampadaire, unePanne.LeLampadaire))
                    {
                        distance  = DistanceDeuxLampadaire(uneIntervention.LaPanne.LeLampadaire, unePanne.LeLampadaire);
                        maTournee = uneTournee;
                    }
                }
            }
            return(maTournee);
        }
Exemple #11
0
        private void lnkLbl_ExistantFailureType_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            //get the list of types of failure
            frm_ListOf frm = new frm_ListOf(Subject.FailureTypeSbjct);

            frm.ShowDialog();

            if (frm.Tag != null)
            {
                this.failureType = (TypePanne)frm.Tag;

                txtBx_FailureType.Text = this.failureType.getName();
                FailureTypeDesc        = this.failureType.getDescription();

                this.Failure = null;
                txtBx_Failure.Clear();
            }
        }
        private void btn_Save_DataBase_Click(object sender, EventArgs e)
        {
            //try
            {
                //
                //Remember that this button could be used to add new elements to the DB as it could be used to update them.
                //Put in mind to treat this issue.Abdelalim
                //

                //Check for emty fields.
                if (Check_Fields())
                {
                    if (this.procedure.steps.Count > 0)
                    {
                        //Set the procedure final values
                        this.procedure.setName(txtBx_Title.Text);
                        this.procedure.setDescription(txtBx_Description.Text);

                        //Set the failuretype final values
                        if (this.failureType == null)
                        {
                            this.failureType = new TypePanne();
                        }
                        this.failureType.setName(txtBx_FailureType.Text);
                        this.failureType.setDescription(FailureTypeDesc);

                        //Set the failure final values
                        if (this.Failure == null)
                        {
                            this.Failure = new Panne();
                        }
                        this.Failure.setName(txtBx_Failure.Text);
                        this.Failure.setDescription(FailureDesc);
                        this.failureType.addPanne(Failure);

                        //Add new proecedure.
                        if (this._Operation == Operation.AddNew)
                        {
                            //If no existing Failure type is chosen create new one.
                            if (this.failureType == null)
                            {
                                //Get the Id of the new failure type (type de panne).
                                this.failureType = new TypePanne();
                                this.failureType.setName(txtBx_FailureType.Text);
                                this.failureType.setDescription(FailureTypeDesc);
                            }
                            //If no existing Failure is chosen create new one.
                            if (this.Failure == null)
                            {
                                this.Failure = new Panne();
                                this.Failure.setName(txtBx_Failure.Text);
                                this.Failure.setDescription(FailureDesc);

                                //Add _Failure to the list of failures of the FailureType object.
                                this.failureType.addPanne(this.Failure);
                            }

                            //Addthe procedure to the Failure's list of procedures.
                            this.Failure.addProcedure(procedure);

                            //Save the failure type (le type de panne).
                            if (!failureType.Exists())//If a new type is created we save it to the data base.
                            {
                                failureType.Add();
                                Failure.Add();// Save the failure to the DB since it belongs to a newly created FailureType.
                            }
                            else//If the FailureType exists we check for the the failure(panne).
                            //Save the failure (la panne).
                            {
                                failureType.Update(failureType.getId());
                                if (!Failure.Exists())//If a new type is created we save it to the data base.
                                {
                                    Failure.Add();
                                }
                                else
                                {
                                    Failure.Update(Failure.getId());
                                }
                            }
                            //
                            //Saving the procedure.
                            //
                            procedure.AddToDB();
                            //MessageBox.Show("Proc.Steps.count: " + this.procedure.getEtapes().Count, "frm_AddProcedure.btn_Save");
                            //Save the steps.
                            foreach (Etape step in this.procedure.getEtapes())
                            {
                                //Associates each step with the current procedure.
                                //procedure.addEtape(step);
                                step.setprocedure(this.procedure);
                                //MessageBox.Show("Etape.Proc: " + step.getprocedure().getId(), "frm_AddProcedure.btn_Save");
                                //Save the step and its objects to the file etape.xml.
                                step.Add();
                            }
                        }
                        else//Update an existing procedure.
                        {
                            //Addthe procedure to the Failure's list of procedures.
                            this.Failure.addProcedure(procedure);
                            //MessageBox.Show("Falure.name: " + Failure.getId(), "frm_AddPrecedure.btn_Save");
                            //
                            //Saving the procedure.
                            //
                            procedure.Update(this.procedure.getId());

                            //Save the steps.
                            if (StepsRemoved)
                            {
                                //Remove all the steps of the current procedure from the data base.
                                //MessageBox.Show("Proc.steps.count: " + this.procedure.getEtapes().Count, "frm_AddProcedure.btn_Save");
                                Etape.RemoveByProcedure(this.procedure.getId());
                            }

                            //In case we allow the user to update the failure and its type from this GUI.
                            //Update the FailureType.
                            failureType.Update(failureType.getId());
                            //Update the failure (la panne).
                            Failure.Update(Failure.getId());

                            //MessageBox.Show("Steps.Count: "+this.procedure.getEtapes().Count, "frm_AddProcedure.btn_Save");
                            foreach (Etape step in this.procedure.steps)
                            {
                                //Associates each step with the current procedure.
                                step.setprocedure(this.procedure);
                                //If the current step exists in the DB means we're about to update it.
                                if (step.Exists())
                                {
                                    step.Update(step.getId());
                                }
                                else
                                {
                                    //Save the step and its objects to the file etape.xml.
                                    step.Add();
                                    //MessageBox.Show("Step "+step.getName()+" added","frm_AddProcedure.btn_Save");
                                }
                            }
                        }
                    }
                    else
                    {
                        MessageBox.Show(this, "La procedure doit avoir au minimum une étape.", "Message d'erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                }
                else
                {
                    MessageBox.Show(this, "Remplir les champs importants d'abord.", "Message d'erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                MessageBox.Show(this, "Opération terminée avec succès.", "Message d'information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Tag = this.procedure;
                this.Close();
            }
            //catch (Exception x) { MessageBox.Show(x.ToString()); }
        }
        public frm_AddProcedure(TypePanne type, Panne failure, Procedure procedure, Operation operation)
        {
            InitializeComponent();

            //Initialize the attributes.
            failureType       = type;
            Failure           = failure;
            this.procedure    = procedure;
            this.StepsRemoved = false;
            this._Operation   = operation;

            //Use the GUI to add a new procedure.
            if (this._Operation == Operation.AddNew)
            {
                if (this.procedure == null)
                {
                    this.procedure = new Procedure();
                    //Create the list of steps for the current procedure.
                    this.procedure.steps = new List <Etape>();
                }
            }
            //Use the GUI to update a procedure.
            else
            {
                if (type != null)
                {
                    //txtBx_FailureType.ReadOnly = true;
                    //txtBx_FailureType.Enabled = false;
                    txtBx_FailureType.Text = failureType.getName();
                    FailureTypeDesc        = type.getDescription();
                }
                else
                {
                    MessageBox.Show("Type est null", "frm_AddProcedure.Constructor");
                    throw new ArgumentNullException();
                }
                if (failure != null)
                {
                    //txtBx_Failure.ReadOnly = true;
                    //txtBx_Failure.Enabled = false;
                    txtBx_Failure.Text = failure.getName();
                    FailureDesc        = failure.getDescription();
                }
                else
                {
                    MessageBox.Show("Panne est null", "frm_AddProcedure.Constructor");
                    throw new ArgumentNullException();
                }

                if (this.procedure != null)
                {
                    txtBx_Title.Text       = this.procedure.getName();
                    txtBx_Description.Text = this.procedure.getDescription();


                    if (this.procedure.steps != null && this.procedure.steps.Count > 0)
                    {
                        foreach (Etape step in this.procedure.getEtapes())
                        {
                            //Fill the list view with the step's data.
                            ListViewItem item = new ListViewItem(new string[] { step.getId().ToString(), step.getName(), step.getDescription() });
                            lstVew_Steps.Items.Add(item);
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Procedure est null", "frm_AddProcedure.Constructor");
                    throw new ArgumentNullException();
                }
            }
            //Set the value of the Id textBox.
            txtBx_Id.Text = this.procedure.getId().ToString();

            #region Load the form text fields to Fields list.
            Fields.Add(txtBx_Title);
            if (failureType == null)
            {
                Fields.Add(txtBx_FailureType);
            }
            if (Failure == null)
            {
                Fields.Add(txtBx_Failure);
            }
            #endregion

            #region Load the form labels to FieldLabels list.
            FieldLabels.Add(lbl_Title);
            if (failureType == null)
            {
                FieldLabels.Add(lbl_FailureType);
            }
            if (Failure == null)
            {
                FieldLabels.Add(lbl_Failure);
            }
            #endregion
        }
Exemple #14
0
        /// <summary>
        /// Returns the list of the procedures.
        /// </summary>
        /// <returns></returns>
        public static List <Procedure> GetAllProcedures()
        {
            /* On déclare et on crée une instance des variables nécéssaires pour la recherche */
            List <Procedure> procedures = new List <Procedure>();
            Procedure        procedure  = new Procedure();

            try
            {
                string rslt = Helper.service.LoadFile("procedure.xml").ToString();

                StreamWriter sw = new StreamWriter(System.Windows.Forms.Application.StartupPath + "\\temp.xml");
                sw.Write(rslt);
                sw.Close();


                //XPathDocument XPathDocu = new XPathDocument((Stream)Helper.service.LoadFile("Experts.xml"));
                XPathDocument     XPathDocu = new XPathDocument(System.Windows.Forms.Application.StartupPath + "\\temp.xml");
                XPathNavigator    Navigator;
                XPathNodeIterator Nodes;

                /* On affecte false à  la
                 * /* On crée un navigateur */
                Navigator = XPathDocu.CreateNavigator();

                string ExpXPath = "//procedure";
                /* On lance la recherche */
                Nodes = Navigator.Select(Navigator.Compile(ExpXPath));
                /* On vérifie si la recherche a été fructueuse */
                //System.Windows.Forms.MessageBox.Show("Node.count. "+Nodes.Count,"XMLProcedure.GetAllProcedures");
                if (Nodes.Count != 0)
                {
                    // NOTE: Necéssaire pour se placer sur le noeud recherché
                    /* Encodage des données dans la classe Etape */

                    int tillCount = 0;
                    while (tillCount < Nodes.Count)
                    {
                        Nodes.MoveNext();
                        procedure = new Procedure();
                        procedure.setId(Convert.ToInt32(Nodes.Current.GetAttribute("id", "")));
                        //System.Windows.Forms.MessageBox.Show("Attrib. " + Nodes.Current.GetAttribute("id", ""), "XMLProcedure.GetAllProcedures");
                        Nodes.Current.MoveToFirstChild(); /* On se déplace sur le premier noeud
                                                           * enfant "Libelle" */
                        //System.Windows.Forms.MessageBox.Show("Current: " + Nodes.Current.Name + "    Current.Value " + Nodes.Current.Value, "XMLProcedure.GetAllProcedures");
                        procedure.setName(Nodes.Current.Value);
                        //System.Windows.Forms.MessageBox.Show("libelle. " + Nodes.Current.Value, "XMLProcedure.GetAllProcedures");
                        Nodes.Current.MoveToNext(); // On se déplace sur le noeud suivant "Description"
                        //System.Windows.Forms.MessageBox.Show("Description. " + Nodes.Current.Value, "XMLProcedure.GetAllProcedures");
                        procedure.setDescription(Nodes.Current.Value);
                        //System.Windows.Forms.MessageBox.Show("Type.Description. " +type.getDescription() , "XMLProcedure.GetAllProcedures");
                        Nodes.Current.MoveToNext(); // On se déplace sur le noeud suivant "Failure"
                        procedure.setPanne(Panne.GetByID(Convert.ToInt32(Nodes.Current.Value)));
                        procedures.Add(procedure);
                        tillCount++;
                        Nodes.Current.MoveToParent();
                    }
                }
                /* Si aucun expert n'a été trouvé */
                else
                {
                    procedure = null;
                }
            }
            catch (System.IO.FileNotFoundException x) { }catch (Exception x)
            {
                //System.Windows.Forms.MessageBox.Show(x.ToString());
            }
            /* Renvoi de toutes les données dans une instance de la classe "etape" */
            return(procedures);
        }
 public async Task <string> PostPanne([FromBody] Panne action) =>
 await(new PostGenericHandler <Panne>(GenericRepository)).Handle(new PostGenericCommand <Panne>(action), new CancellationToken());
 public async Task <string> PutPanne([FromBody] Panne projet) =>
 await(new PutGenericHandler <Panne>(GenericRepository)).Handle(new PutGenericCommand <Panne>(projet), new CancellationToken());