Beispiel #1
0
 private void Close_pictureBox_Click_1(object sender, EventArgs e)
 {
     if (add_Transer1.Visible == true && (add_Transer1.panel1.Enabled == true || add_Transer1.panel2.Enabled == true || add_Transer1.panel3.Enabled == true))
     {
         ErrorMSG E = new ErrorMSG();
         E.Button2.Visible        = true;
         E.Error_TITRE_Label.Text = "تحذير";
         E.Message_Label.Text     = "لم يتم إكتمال التحويلة:هل تريدالخروج من صفحت التحويلة";
         //E.Message_Label.Location = new Point(6, 38);
         E.BackColor = Color.FromArgb(255, 66, 66);
         E.Changerbuttoncouleur(E.Button1, 255, 66, 66);
         E.Changerbuttoncouleur(E.Button2, 255, 66, 66);
         E.Button1.ButtonText = "نعم";
         E.Button2.ButtonText = "لا";
         E.ChangeButtonLocation(E.Button1, 87, 55);
         E.ChangeButtonLocation(E.Button2, 216, 55);
         E.ChangeIcon(ArchiveAPPLICATION.Properties.Resources.Error);
         E.ShowDialog();
         if (E.Clicked() == 1)
         {
             this.Close();
             Login L = new Login();
             L.Show();
         }
     }
     else
     {
         this.Close();
         Login L = new Login();
         L.Show();
     }
 }
Beispiel #2
0
 private void Revise_Folders_Button_Click(object sender, EventArgs e)
 {
     if (add_Transer1.Visible == true && (add_Transer1.panel1.Enabled == true || add_Transer1.panel2.Enabled == true || add_Transer1.panel3.Enabled == true))
     {
         ErrorMSG E = new ErrorMSG();
         E.Button2.Visible        = true;
         E.Error_TITRE_Label.Text = "تحذير";
         E.Message_Label.Text     = "لم يتم إكتمال التحويلة:هل تريدالخروج من صفحت التحويلة";
         //E.Message_Label.Location = new Point(6, 38);
         E.BackColor = Color.FromArgb(255, 66, 66);
         E.Changerbuttoncouleur(E.Button1, 255, 66, 66);
         E.Changerbuttoncouleur(E.Button2, 255, 66, 66);
         E.Button1.ButtonText = "نعم";
         E.Button2.ButtonText = "لا";
         E.ChangeButtonLocation(E.Button1, 87, 55);
         E.ChangeButtonLocation(E.Button2, 216, 55);
         E.ChangeIcon(ArchiveAPPLICATION.Properties.Resources.Error);
         E.ShowDialog();
         if (E.Clicked() == 1)
         {
             acceuil_user1.Visible     = false;
             add_Transer1.Visible      = false;
             revise_transfers1.Visible = false;
             revise_Boxs1.Visible      = true;
         }
     }
 }
Beispiel #3
0
        private void Add_Verssement_Button_Click(object sender, EventArgs e)
        {
            ErrorMSG E = new ErrorMSG();

            E.Button2.Visible        = true;
            E.Error_TITRE_Label.Text = "إنتباه";
            E.Message_Label.Text     = "هل تريد إضافة تحويلة جديدة";
            //E.Message_Label.Location = new Point(112, 30);
            E.BackColor = Color.FromArgb(241, 196, 15);
            E.Changerbuttoncouleur(E.Button1, 241, 196, 15);
            E.Changerbuttoncouleur(E.Button2, 241, 196, 15);
            E.Button1.ButtonText = "نعم";
            E.Button2.ButtonText = "لا";
            E.ChangeButtonLocation(E.Button1, 87, 55);
            E.ChangeButtonLocation(E.Button2, 216, 55);
            E.ChangeIcon(ArchiveAPPLICATION.Properties.Resources.Attention);
            E.ShowDialog();
            if (E.Clicked() == 1)
            {
                add_Transer1.Visible = true;
                if (Program.Connection.State == ConnectionState.Closed)
                {
                    Program.Connection.Open();
                }

                SqlCommand CMD = new SqlCommand("insert into Verssements(Employe_ID) values(@Employé)", Program.Connection);
                CMD.Parameters.AddWithValue("@Employé", Login.Employe_ID);
                CMD.ExecuteNonQuery();
                CMD = new SqlCommand("Select  top(1)Numero_Verssement from Verssements where Employe_ID = @Employe_id order by Numero_Verssement desc", Program.Connection);
                CMD.Parameters.AddWithValue("@Employe_id", Login.Employe_ID);
                SqlDataReader Reader = CMD.ExecuteReader();
                DataTable     T      = new DataTable();
                T.Load(Reader);
                add_Transer1.Numero_Du_Transsmition_Label.Text = T.Rows[0][0].ToString();
                acceuil_user1.Visible     = false;
                revise_transfers1.Visible = false;
                revise_Boxs1.Visible      = false;
                Program.Connection.Close();
                Add_Verssement_Button.Enabled = false;
            }
            if (E.Clicked() == 2)
            {
            }
        }