Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            cdeContext = new cdeEntities();

            var query = from enfants in cdeContext.enfantsJeu
                        select enfants;

            StatusBar mainStatusBar = new StatusBar();

            StatusBarPanel helpPanel = new StatusBarPanel() ;
            StatusBarPanel InfosPanel = new StatusBarPanel();
            StatusBarPanel heurePanel = new StatusBarPanel();

            helpPanel.AutoSize = StatusBarPanelAutoSize.Spring;
            mainStatusBar.Panels.Add(helpPanel);

            bg.Tick += (s, ev) => { heurePanel.Text = string.Format("{0:H:m}", DateTime.Now.ToString()); };
            bg.Interval = 500;
            bg.Start();
            //heurePanel.AutoSize = StatusBarPanelAutoSize.Spring;
            heurePanel.Width = 200;
            heurePanel.Alignment = HorizontalAlignment.Right;
            mainStatusBar.Panels.Add(heurePanel);

            mainStatusBar.ShowPanels = true;

            Controls.Add(mainStatusBar);

            InfosPanel.Text = "Connecté en tant que " + Environment.UserDomainName + "\\" + Environment.UserName;
            //InfosPanel.AutoSize = StatusBarPanelAutoSize.Spring;
            InfosPanel.Width = 200;
            InfosPanel.Alignment = HorizontalAlignment.Right;

            mainStatusBar.Panels.Add(InfosPanel);
        }
Exemplo n.º 2
0
        private void ConsultDossier_Load(object sender, EventArgs e)
        {
            enfantsContext = new cdeEntities();

            var query = from enfants in enfantsContext.enfantsJeu
                        where enfants.ID == n_id
                        select enfants;

            this.listView1.View = System.Windows.Forms.View.Details;

            ColumnHeader columnheader0 = new ColumnHeader();
            columnheader0.Text = "Mesure";

            ColumnHeader columnheader1 = new ColumnHeader();
            columnheader1.Text = "Date de début";
            columnheader1.Width = 150;
            columnheader1.TextAlign = HorizontalAlignment.Left;

            ColumnHeader columnheader2 = new ColumnHeader();
            columnheader2.Text = "Date de fin";
            columnheader2.Width = 120;
            columnheader2.TextAlign = HorizontalAlignment.Left;

            ColumnHeader columnheader3 = new ColumnHeader();
            columnheader3.Text = "Juge des enfants";
            columnheader3.TextAlign = HorizontalAlignment.Left;
            columnheader3.Width = -2;

            ColumnHeader columnheader4 = new ColumnHeader();
            columnheader4.Text = "Prochaine audience";
            columnheader4.TextAlign = HorizontalAlignment.Left;
            columnheader4.Width = -2;

            listView1.Columns.Add(columnheader0);
            listView1.Columns.Add(columnheader1);
            listView1.Columns.Add(columnheader2);
            listView1.Columns.Add(columnheader3);
            listView1.Columns.Add(columnheader4);
            listView1.Sorting = SortOrder.Ascending;

            foreach (var value in query)
            {
                this.Text = string.Format(@"Consultation d'un dossier : {0} {1}", value.prenom_enfant, value.nom_enfant.ToUpper());

                lbl_nomprenom.Text = string.Format(@"{0} {1}", value.nom_enfant, value.prenom_enfant);
                lbl_num_dossier.Text = value.num_dossier;
                lbl_date_naiss.Text = (string.IsNullOrEmpty(value.lieu_naissance.ToString())) ? value.date_naissance : value.date_naissance + " à " + value.lieu_naissance;
                label5.Text = value.date_admission;
                label6.Text = value.service;
                txb_nom_pere.Text = value.nom_pere;
                txb_nais_pere.Text = (string.IsNullOrEmpty(value.ln_pere)) ? value.dn_pere : value.dn_pere + " à " + value.ln_pere;
                txb_adrr_pere.Text = value.adresse_pere;
                txb_cp_pere.Text = value.cp_pere;
                txb_ville_pere.Text = value.ville_pere;
                txb_phonepere.Text = (string.IsNullOrEmpty(value.tel_pere)) ? "*" : value.tel_pere;
                txb_mobilepere.Text = (string.IsNullOrEmpty(value.mobile_pere)) ? "*" : value.mobile_pere;
            }
        }
Exemplo n.º 3
0
        private void listeEnfants_Load(object sender, EventArgs e)
        {
            cdeContext = new cdeEntities();

            var query = from enfants in cdeContext.enfantsJeu
                        let total = cdeContext.enfantsJeu.Count()
                                    select enfants;

            this.listView1.View = System.Windows.Forms.View.Details;

            ColumnHeader col_numdossier = new ColumnHeader();

            col_numdossier.Text  = "N° dossier";
            col_numdossier.Width = 20;

            ColumnHeader col_nom = new ColumnHeader();

            col_nom.Text  = "NOM";
            col_nom.Width = 200;

            ColumnHeader col_prenom = new ColumnHeader();

            col_prenom.Text  = "Prénom";
            col_prenom.Width = 200;

            ColumnHeader col_service = new ColumnHeader();

            col_service.Text = "Service";

            listView1.Columns.Add(col_numdossier);
            listView1.Columns.Add(col_nom);
            listView1.Columns.Add(col_prenom);
            listView1.Columns.Add(col_service);

            foreach (var enfant in query)
            {
                ListViewItem lvi = new ListViewItem(enfant.ID.ToString());
                lvi.SubItems.Add(enfant.nom_enfant);
                lvi.SubItems.Add(enfant.prenom_enfant);
                lvi.SubItems.Add(enfant.service);

                listView1.Items.Add(lvi);
            }
            this.toolStripStatusLabel1.Text = string.Format(@"{0} résultats", query.Count());
        }
Exemplo n.º 4
0
        private void listeEnfants_Load(object sender, EventArgs e)
        {
            cdeContext = new cdeEntities();

            var query = from enfants in cdeContext.enfantsJeu
                        let total = cdeContext.enfantsJeu.Count()
                        select enfants;

            this.listView1.View = System.Windows.Forms.View.Details;

            ColumnHeader col_numdossier = new ColumnHeader();
            col_numdossier.Text = "N° dossier";
            col_numdossier.Width = 20;

            ColumnHeader col_nom = new ColumnHeader();
            col_nom.Text = "NOM";
            col_nom.Width = 200;

            ColumnHeader col_prenom = new ColumnHeader();
            col_prenom.Text = "Prénom";
            col_prenom.Width = 200;

            ColumnHeader col_service = new ColumnHeader();
            col_service.Text = "Service";

            listView1.Columns.Add(col_numdossier);
            listView1.Columns.Add(col_nom);
            listView1.Columns.Add(col_prenom);
            listView1.Columns.Add(col_service);

            foreach (var enfant in query)
            {
                ListViewItem lvi = new ListViewItem(enfant.ID.ToString());
                lvi.SubItems.Add(enfant.nom_enfant);
                lvi.SubItems.Add(enfant.prenom_enfant);
                lvi.SubItems.Add(enfant.service);

                listView1.Items.Add(lvi);
            }
            this.toolStripStatusLabel1.Text = string.Format(@"{0} résultats", query.Count());
        }
Exemplo n.º 5
0
        private void Form1_Load(object sender, EventArgs e)
        {
            cdeContext = new cdeEntities();


            var query = from enfants in cdeContext.enfantsJeu
                        select enfants;

            StatusBar mainStatusBar = new StatusBar();

            StatusBarPanel helpPanel  = new StatusBarPanel();
            StatusBarPanel InfosPanel = new StatusBarPanel();
            StatusBarPanel heurePanel = new StatusBarPanel();

            helpPanel.AutoSize = StatusBarPanelAutoSize.Spring;
            mainStatusBar.Panels.Add(helpPanel);

            bg.Tick    += (s, ev) => { heurePanel.Text = string.Format("{0:H:m}", DateTime.Now.ToString()); };
            bg.Interval = 500;
            bg.Start();
            //heurePanel.AutoSize = StatusBarPanelAutoSize.Spring;
            heurePanel.Width     = 200;
            heurePanel.Alignment = HorizontalAlignment.Right;
            mainStatusBar.Panels.Add(heurePanel);

            mainStatusBar.ShowPanels = true;

            Controls.Add(mainStatusBar);

            InfosPanel.Text = "Connecté en tant que " + Environment.UserDomainName + "\\" + Environment.UserName;
            //InfosPanel.AutoSize = StatusBarPanelAutoSize.Spring;
            InfosPanel.Width     = 200;
            InfosPanel.Alignment = HorizontalAlignment.Right;

            mainStatusBar.Panels.Add(InfosPanel);
        }
Exemplo n.º 6
0
        private void ConsultDossier_Load(object sender, EventArgs e)
        {
            enfantsContext = new cdeEntities();


            var query = from enfants in enfantsContext.enfantsJeu
                        where enfants.ID == n_id
                        select enfants;

            this.listView1.View = System.Windows.Forms.View.Details;

            ColumnHeader columnheader0 = new ColumnHeader();

            columnheader0.Text = "Mesure";


            ColumnHeader columnheader1 = new ColumnHeader();

            columnheader1.Text      = "Date de début";
            columnheader1.Width     = 150;
            columnheader1.TextAlign = HorizontalAlignment.Left;

            ColumnHeader columnheader2 = new ColumnHeader();

            columnheader2.Text      = "Date de fin";
            columnheader2.Width     = 120;
            columnheader2.TextAlign = HorizontalAlignment.Left;

            ColumnHeader columnheader3 = new ColumnHeader();

            columnheader3.Text      = "Juge des enfants";
            columnheader3.TextAlign = HorizontalAlignment.Left;
            columnheader3.Width     = -2;

            ColumnHeader columnheader4 = new ColumnHeader();

            columnheader4.Text      = "Prochaine audience";
            columnheader4.TextAlign = HorizontalAlignment.Left;
            columnheader4.Width     = -2;


            listView1.Columns.Add(columnheader0);
            listView1.Columns.Add(columnheader1);
            listView1.Columns.Add(columnheader2);
            listView1.Columns.Add(columnheader3);
            listView1.Columns.Add(columnheader4);
            listView1.Sorting = SortOrder.Ascending;

            foreach (var value in query)
            {
                this.Text = string.Format(@"Consultation d'un dossier : {0} {1}", value.prenom_enfant, value.nom_enfant.ToUpper());

                lbl_nomprenom.Text   = string.Format(@"{0} {1}", value.nom_enfant, value.prenom_enfant);
                lbl_num_dossier.Text = value.num_dossier;
                lbl_date_naiss.Text  = (string.IsNullOrEmpty(value.lieu_naissance.ToString())) ? value.date_naissance : value.date_naissance + " à " + value.lieu_naissance;
                label5.Text          = value.date_admission;
                label6.Text          = value.service;
                txb_nom_pere.Text    = value.nom_pere;
                txb_nais_pere.Text   = (string.IsNullOrEmpty(value.ln_pere)) ? value.dn_pere : value.dn_pere + " à " + value.ln_pere;
                txb_adrr_pere.Text   = value.adresse_pere;
                txb_cp_pere.Text     = value.cp_pere;
                txb_ville_pere.Text  = value.ville_pere;
                txb_phonepere.Text   = (string.IsNullOrEmpty(value.tel_pere)) ? "*" : value.tel_pere;
                txb_mobilepere.Text  = (string.IsNullOrEmpty(value.mobile_pere)) ? "*" : value.mobile_pere;
            }
        }