public UC_ITEM_AccueilNewDoc(Int64 id)
 {
     InitializeComponent();
     Document myDoc = new Document((uint)id, "loc");
     UIElement myExpendItem = new UIElement();
     this.TextBlock_heure.Text = myDoc.dateTimeEditionBDD.ToString("dd/MM/yyyy");
     this.TextBlock_logoSection.Text = Logos.DisplayLogo(myDoc.section);
     if (myDoc.typeDocument == "DocNormales")
     {
         this.TextBlock_logoTypeDocument.Text = Logos.DisplayLogo("DOCUMENTS_TECHNIQUES");
         this.TextBlock_titre.Text = ((Document.DocNormales)myDoc.document).titreDocument;
         myExpendItem = new UC_ITEM_Document(id);
     }
     if (myDoc.typeDocument == "Consignes")
     {
         this.TextBlock_logoTypeDocument.Text = Logos.DisplayLogo("CONSIGNES");
         this.TextBlock_titre.Text = ((Document.Consignes)myDoc.document).objetConsigne;
         myExpendItem = new UC_ITEM_Consigne(id);
     }
     if (myDoc.typeDocument == "TachesJournalieres")
     {
         this.TextBlock_logoTypeDocument.Text = Logos.DisplayLogo("TACHES_JOURNALIERES");
         this.TextBlock_titre.Text = ((Document.TachesJournalieres)myDoc.document).titreAction;
         myExpendItem = new UC_ITEM_TacheJournaliere(id);
     }
     if (myDoc.typeDocument == "Verifications")
     {
         this.TextBlock_logoTypeDocument.Text = Logos.DisplayLogo("VERIFICATIONS");
         this.TextBlock_titre.Text = ((Document.Verifications)myDoc.document).titreAction;
         myExpendItem = new UC_ITEM_Verification(id);
     }
     this.myGridAdditionalContent.Children.Add(myExpendItem);
 }
        private void AddItemsInListPanel(string section, string systeme = null, string categorieDocument = null)
        {
            string tmpCmd = @"SELECT Documents.idDocument as id
                                FROM Documents
                                JOIN DocNormales
                                ON Documents.idDocument = DocNormales.idDocument
                                JOIN Contenus
                                ON Documents.idDocument = Contenus.idDocument
                                WHERE Documents.subdivision = 'Service' ";
            if (section != null)
            {
                tmpCmd += "AND Documents.section = '" + section + "' ";
            }
            if (systeme != null)
            {
                tmpCmd += "AND Documents.systeme = '" + systeme + "' ";
            }
            if (categorieDocument != null)
            {
                tmpCmd += "AND DocNormales.categorieDocument = '" + categorieDocument + "' ";
            }
            tmpCmd += "ORDER BY section ASC, titreDocument ASC";

            SqlDataReader Reader = ConnectorSqlServer.ExecCommandSql(tmpCmd);

            ClearListPanel();
            while (Reader.Read())
            {
                Document myDoc = new Document((uint)Reader.GetInt64(Reader.GetOrdinal("id")), "local");
                UC_ITEM_Document myNewItem = new UC_ITEM_Document(myDoc);
                myNewItem.Margin = new Thickness(10);
                myDocPanel.Children.Add(myNewItem);
            }
            ConnectorSqlServer.Close(Reader);
        }
 protected void AddItemToDisplayArea(Document myDoc)
 {
     UC_ITEM_Document docRetour = new UC_ITEM_Document(myDoc);
     docRetour.Margin = new Thickness(10, 10, 0, 0);
     this.myDocPanel.Children.Add(docRetour);
 }