Ejemplo n.º 1
0
        private void BTNRetour_Click(object sender, EventArgs e)
        {
            this.Hide();
            FMenu Fmenu = new FMenu();

            Fmenu.Closed += (s, args) => this.Close();
            Fmenu.Show();
        }
Ejemplo n.º 2
0
        private void FMedicaments_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Hide();
            FMenu Fmenu = new FMenu();

            Fmenu.Closed += (s, args) => this.Close();
            Fmenu.Show();
        }
Ejemplo n.º 3
0
        private void refresh()
        {
            this.Hide();
            FMenu Fmenu = new FMenu();

            Fmenu.Closed += (s, args) => this.Close();
            Fmenu.Show();
        }
Ejemplo n.º 4
0
 private void TBXMdp_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == Convert.ToChar(Keys.Return))
     {
         if (TBXId.Text == "swiss" && TBXMdp.Text == "18-jun-2003")
         {
             this.Hide();
             FMenu Fmenu = new FMenu();
             Fmenu.Closed += (s, args) => this.Close();
             Fmenu.Show();
         }
         else
         {
             if (TBXId.Text == "Villechalane" && TBXMdp.Text == "11-dec-1992")
             {
                 this.Hide();
                 FMenu Fmenu = new FMenu();
                 Fmenu.Closed += (s, args) => this.Close();
                 Fmenu.Show();
             }
             else
             {
                 if (TBXId.Text == "Andre" && TBXMdp.Text == "26-aug-1991")
                 {
                     this.Hide();
                     FMenu Fmenu = new FMenu();
                     Fmenu.Closed += (s, args) => this.Close();
                     Fmenu.Show();
                 }
                 else
                 {
                     if (TBXId.Text == "Bentot" && TBXMdp.Text == "11-mar-1996")
                     {
                         this.Hide();
                         FMenu Fmenu = new FMenu();
                         Fmenu.Closed += (s, args) => this.Close();
                         Fmenu.Show();
                     }
                     else
                     {
                         MessageBox.Show("L'identifiant ou le mot de passe est incorrect.");
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 5
0
 private void BTNValider_Click(object sender, EventArgs e)
 {
     if (TBXId.Text == "swiss" && TBXMdp.Text == "18-jun-2003")
     {
         this.Hide();
         FMenu Fmenu = new FMenu();
         Fmenu.Closed += (s, args) => this.Close();
         Fmenu.Show();
     }
     else
     {
         if (TBXId.Text == "Villechalane" && TBXMdp.Text == "11-dec-1992")
         {
             this.Hide();
             FMenu Fmenu = new FMenu();
             Fmenu.Closed += (s, args) => this.Close();
             Fmenu.Show();
         }
         else
         {
             if (TBXId.Text == "Andre" && TBXMdp.Text == "26-aug-1991")
             {
                 this.Hide();
                 FMenu Fmenu = new FMenu();
                 Fmenu.Closed += (s, args) => this.Close();
                 Fmenu.Show();
             }
             else
             {
                 if (TBXId.Text == "Bentot" && TBXMdp.Text == "11-mar-1996")
                 {
                     this.Hide();
                     FMenu Fmenu = new FMenu();
                     Fmenu.Closed += (s, args) => this.Close();
                     Fmenu.Show();
                 }
                 else
                 {
                     MessageBox.Show("L'identifiant ou le mot de passe est incorrect.");
                 }
             }
         }
     }
 }
        private void FLGNBTN_Click(object sender, EventArgs e)
        {
            try
            {
                SqlConnection  tcon = new SqlConnection(@"Data Source =AD-PC\SQLEXPRESS10;Initial Catalog = tlogin; Integrated Security = True; Connect Timeout = 30; Encrypt = False; TrustServerCertificate = False; ApplicationIntent = ReadWrite; MultiSubnetFailover = False");
                SqlDataAdapter sda  = new SqlDataAdapter("select Count(*) from flogin where FacultyId = '" + FTXTBOXID.Text + "' and Pass='******'", tcon);
                DataTable      dt   = new DataTable();
                sda.Fill(dt);

                if (dt.Rows[0][0].ToString() == "1")
                {
                    Global.FacultyId = Int32.Parse(FTXTBOXID.Text);
                    MessageBox.Show(" ID No:'" + Global.FacultyId + "' Successfully Logged in");
                    this.Hide();

                    FMenu menu = new FMenu();
                    counter = 3;
                    if (menu.Enabled || counter == 3)
                    {
                        SMS.Text            = "Faculty ID : " + Global.FacultyId;
                        SMS.Visible         = true;
                        SMS.Icon            = new System.Drawing.Icon(Path.GetFullPath(@"C: \Users\AD\source\repos\Student Management System\WindowsFormsApp1\Resources\Black.ico"));
                        SMS.BalloonTipText  = "Faculty ID : '" + Global.FacultyId + "'  You're  Successfully Logged in  ";
                        SMS.BalloonTipTitle = "Have a Great Day Ahead :) :)";
                        SMS.ShowBalloonTip(100);
                        SMS.ContextMenuStrip.AllowTransparency = true;
                    }
                    menu.Show();
                }
                else
                {
                    MessageBox.Show("Check your Id or Password");
                }
            }
            catch (System.Exception)
            {
                MessageBox.Show("Please Enter Integer Value", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }