Example #1
0
        private void miAnniversaire_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                DataTable dt = sess_emp.AnniversaireAVenir();
                dt.Columns.Add("Jour").DataType = ("string").GetType();
                dt.Columns["Jour"].SetOrdinal(0);

                foreach (DataRow dr in dt.Rows)
                {
                    DateTime date       = DateTime.Parse(dr["DateNaissance"].ToString());
                    string   dateString = date.ToString("dd MMMM", new System.Globalization.CultureInfo("fr-fr"));
                    dr["Jour"] = dateString;
                }

                dt.Columns.Remove("DateNaissance");

                mdiChild.Content =
                    new FenRapport(this.MainMdiContainer, "Anniversaires Proches", dt);
                mdiChild.Title      = "Rapport d'Employés";
                mdiChild.Height     = 400;
                mdiChild.Width      = 600;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #2
0
        private void miRechercheNom_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                mdiChild.Content    = new FenRechercherEmploye(this, this.MainMdiContainer, TargetRecherche.Nom);
                mdiChild.Title      = "Recherche d'Employés";
                mdiChild.Height     = 650;
                mdiChild.Width      = 1000;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #3
0
        private void EmbaucherEmploye_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                mdiChild.Content    = new FenEmploye(this.MainMdiContainer, "embaucher");
                mdiChild.Title      = "Embaucher un Employé";
                mdiChild.Height     = 630;
                mdiChild.Width      = 900;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #4
0
        private void miEmplois_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                mdiChild.Content =
                    new FenRapport(this.MainMdiContainer, "Emplois de l'Hôtel", sess_emp.Emplois());
                mdiChild.Title      = "Rapport d'Employés";
                mdiChild.Height     = 600;
                mdiChild.Width      = 400;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #5
0
        private void miComptageEmploye_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                mdiChild.Content =
                    new FenRapport(this.MainMdiContainer, "Nombre d'Employés par Département", sess_emp.ComptageEmployeParDepartement());
                mdiChild.Title      = "Rapport d'Employés";
                mdiChild.Height     = 500;
                mdiChild.Width      = 400;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #6
0
        private void miEmployeStatut_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                mdiChild.Content =
                    new FenRapport(this.MainMdiContainer, "Liste des Employés avec leur Statut", sess_emp.EmployeAvecStatut());
                mdiChild.Title      = "Rapport d'Employés";
                mdiChild.Height     = 650;
                mdiChild.Width      = 900;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #7
0
        private void miCalculerPayroll_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                Payroll pay = sess_emp.GetPayroll();
                mdiChild.Content =
                    new FenRapport(this.MainMdiContainer, pay);
                mdiChild.Title      = "Rapport d'Employés";
                mdiChild.Height     = 650;
                mdiChild.Width      = 900;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #8
0
        public void RetourConge(string code_emp)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                Employe emp = sess_emp.EmployePourModification(code_emp);

                mdiChild.Content    = new FenConge(this.MainMdiContainer, emp, "Retour");
                mdiChild.Title      = "Validation de Retour de Congé";
                mdiChild.Height     = 600;
                mdiChild.Width      = 900;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #9
0
        public void RevocationEmploye(string code_emp)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                Employe emp = sess_emp.EmployePourModification(code_emp);

                mdiChild.Content    = new FenCarriere(this.MainMdiContainer, emp, CarriereMotif.Revocation);
                mdiChild.Title      = "Révocation d'un Employé";
                mdiChild.Height     = 600;
                mdiChild.Width      = 900;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #10
0
        public void ModifierEmploye(string code_emp)
        {
            try
            {
                Employe emp = sess_emp.EmployePourModification(code_emp);

                MdiChild mdiChild = new MdiChild();

                mdiChild.Content    = new FenEmploye(this.MainMdiContainer, "modifier", emp);
                mdiChild.Title      = "Modifier Employé";
                mdiChild.Height     = 630;
                mdiChild.Width      = 900;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #11
0
        private void miPresenceAnnee_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                DateTime date = DateTime.Now;

                // 1ere Fenetre - Absences Annuelles
                MdiChild  mdiChild1 = new MdiChild();
                string    titre     = "Absences de l'Année " + date.Year;
                DataTable dt        = sess_emp.AbsenceAnnuelle(date);
                mdiChild1.Content    = new FenRapport(this.MainMdiContainer, titre, dt);
                mdiChild1.Title      = "Absences de l'Année";
                mdiChild1.Position   = new Point(0, 0);
                mdiChild1.Height     = 650;
                mdiChild1.Width      = 700;
                mdiChild1.Background = MyGradientBrush.getBackgroundBrush();
                this.MainMdiContainer.Children.Add(mdiChild1);


                // 2eme Fenetre - Retards Annuels
                MdiChild mdiChild2 = new MdiChild();
                titre                = "Retards de l'Année " + date.Year;
                dt                   = sess_emp.RetardAnnuel(date);
                mdiChild2.Content    = new FenRapport(this.MainMdiContainer, titre, dt);
                mdiChild2.Title      = "Retards de l'Année";
                mdiChild2.Position   = new Point(510, 0);
                mdiChild2.Height     = 650;
                mdiChild2.Width      = 700;
                mdiChild2.Background = MyGradientBrush.getBackgroundBrush();
                this.MainMdiContainer.Children.Add(mdiChild2);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #12
0
        private void miPresenceMois_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MdiChild mdiChild = new MdiChild();

                DateTime  date       = DateTime.Now;
                string    dateString = date.ToString("MMMM yyyy", new System.Globalization.CultureInfo("fr-fr"));
                string    titre      = "Présence de " + dateString;
                DataTable dt         = sess_emp.PresenceMensuelle(date);

                mdiChild.Content    = new FenRapport(this.MainMdiContainer, titre, dt);
                mdiChild.Title      = "Présence du Mois";
                mdiChild.Height     = 650;
                mdiChild.Width      = 700;
                mdiChild.Background = MyGradientBrush.getBackgroundBrush();

                this.MainMdiContainer.Children.Add(mdiChild);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }