Example #1
0
 private void barButtonItem2_ItemClick(object sender, ItemClickEventArgs e)
 {
     timer2.Start();
     if (SplashScreenManager.Default != null && SplashScreenManager.Default.IsSplashFormVisible)
     {
         SplashScreenManager.CloseForm();
     }
     SplashScreenManager.ShowForm(typeof(WaitForm1));
     if (tableau == null)
     {
         tableau = new tableau_bord();
     }
     else
     {
         wait = 1;
     }
     tableau.MdiParent = this;
     tableau.Show();
     tableau.BringToFront();
 }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //****************** gestion Stock****************************//

            if (login1.depart == "Utilisateur")
            {
                ////visualiser gestion stock
                if (login1.vis_stock == "OUI")
                {
                    Group_stock.Visible = true; nav_gest_stock.Visible = true;
                }
                else
                {
                    Group_stock.Visible = false; nav_gest_stock.Visible = false;
                }

                if (login1.his_alim == "OUI")
                {
                    Group_stock.Visible = true; nav_suivi_alime.Visible = true;
                }
                else
                {
                    nav_suivi_alime.Visible = false;
                }

                if (login1.his_sort == "OUI")
                {
                    nav_sort_stock.Visible = true;
                }
                else
                {
                    nav_sort_stock.Visible = false;
                }



                //clients
                if (login1.vis_clt == "OUI")
                {
                    Group_cde_clt.Visible = true; nav_gest_clt.Visible = true;
                }
                else
                {
                    Group_cde_clt.Visible = false; nav_gest_clt.Visible = false;
                }


                if (login1.aj_clt == "OUI")
                {
                    nav_liste_cde_clt.Visible = true; nav_ajou_cde_clt.Visible = true;
                }
                else
                {
                    nav_liste_cde_clt.Visible = false; nav_ajou_cde_clt.Visible = false;
                }

                //vfeur

                if (login1.vis_feur == "OUI")
                {
                    group_feur.Visible = true; nav_gerer_feur.Visible = true;
                }
                else
                {
                    group_feur.Visible = false; nav_gerer_feur.Visible = false;
                }

                if (login1.aj_feur == "OUI")
                {
                    nav_cde_feur.Visible = true;
                }
                else
                {
                    nav_cde_feur.Visible = false;
                }

                //devis

                if (login1.vis_devis == "OUI")
                {
                    group_devis.Visible = true; nav_gest_devis.Visible = true;
                }
                else
                {
                    group_devis.Visible = false; nav_gest_devis.Visible = false;
                }

                //stat

                if (login1.stat == "OUI")
                {
                    navBarItem10.Visible = true; seuil_stock.Visible = true;
                }
                else
                {
                    navBarItem10.Visible = false; seuil_stock.Visible = false;
                }

                //notification

                if (login1.not == "OUI")
                {
                    Group_not.Visible = true; navBarItem14.Visible = true;
                }
                else
                {
                    Group_not.Visible = false; navBarItem14.Visible = false;
                }

                if (login1.not == "OUI")
                {
                    Group_not.Visible = true; navBarItem14.Visible = true;
                }
                else
                {
                    Group_not.Visible = false; navBarItem14.Visible = false;
                }



                if (login1.conta == "OUI")
                {
                    navBarItem7.Visible = true;
                }
                else
                {
                    navBarItem7.Visible = false;
                }

                if (login1.stat_conta == "OUI")
                {
                    navBarItem9.Visible = true;
                }
                else
                {
                    navBarItem9.Visible = false;
                }

                if (login1.stat_conta == "OUI" || login1.conta == "OUI")
                {
                    navBarGroup1.Visible = true;
                }
                else
                {
                    navBarGroup1.Visible = false;
                }


                Groupe_admin.Visible = false;
            }



            ////********************** Admin *****************************//
            if (login1.depart == "Administrateur")
            {
                Group_stock.Visible    = true;
                nav_gest_stock.Visible = true;
                nav_histo_act.Visible  = true;
                nav_sort_stock.Visible = true;

                Group_cde_clt.Visible     = true;
                nav_gest_clt.Visible      = true;
                nav_liste_cde_clt.Visible = true;
                nav_ajou_cde_clt.Visible  = true;

                group_feur.Visible     = true;
                nav_gerer_feur.Visible = true;
                nav_cde_feur.Visible   = true;

                group_devis.Visible    = true;
                nav_gest_devis.Visible = true;

                navBarItem10.Visible = true;
                seuil_stock.Visible  = true;

                Group_not.Visible    = true;
                navBarItem14.Visible = true;

                Groupe_admin.Visible = true;

                ribbonPageGroup4.Visible = true;
                timer2.Start();
                if (SplashScreenManager.Default != null && SplashScreenManager.Default.IsSplashFormVisible)
                {
                    SplashScreenManager.CloseForm();
                }
                SplashScreenManager.ShowForm(typeof(WaitForm1));
                if (tableau == null)
                {
                    tableau = new tableau_bord();
                }
                else
                {
                    wait = 1;
                }

                tableau.MdiParent = this;
                tableau.Show();
                tableau.BringToFront();
            }

            barStaticItem1.Caption = login1.nom + " " + login1.prenom;


            notifi.Start();
            PrepareNotifcation();
            RunAlert();
            siStatus.Caption = System.DateTime.Now.ToLongDateString();
            siInfo.Caption   = System.DateTime.Now.ToShortTimeString();
            deconn           = "no";
            timer1.Start();
        }