예제 #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();
     }
 }
예제 #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;
         }
     }
 }
예제 #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)
            {
            }
        }
예제 #4
0
 private void Add_Box_Button_Click_1(object sender, EventArgs e)
 {
     if (Codes_of_Proces_ComboBox.Text != string.Empty && Date_Jujment_NumiricUpDown.Value != 0 && Type_of_Archive_DataLabel.Text != "....")
     {
         panel2.Enabled = true;
         panel1.Enabled = false;
         if (Program.Connection.State == ConnectionState.Closed)
         {
             Program.Connection.Open();
         }
         SqlCommand CMD = new SqlCommand("INSERT INTO Carton(Numero_Verssement,Type_Archive,Numero_Box,Id_Address,Code_Proce,Anné_proce) VALUES(@N_Ver,@Type_Arch,@N_Box,@id_address,@Code_Proce,@Anné_proce)", Program.Connection);
         CMD.Parameters.AddWithValue("@N_Ver", int.Parse(Numero_Du_Transsmition_Label.Text));
         CMD.Parameters.AddWithValue("@Type_Arch", Type_of_Archive_DataLabel.Text);
         CMD.Parameters.AddWithValue("@N_Box", int.Parse(The_Numbers_of_Box_Label.Text));
         CMD.Parameters.AddWithValue("@id_address", id_adress);
         CMD.Parameters.AddWithValue("@Code_Proce", Codes_of_Proces_ComboBox.Text);
         CMD.Parameters.AddWithValue("@Anné_proce", Date_Jujment_NumiricUpDown.Value);
         CMD.ExecuteNonQuery();
         Program.Connection.Close();
         Program.Connection.Open();
         CMD = new SqlCommand("UPDATE Addressage SET Libre_Etat = 1 WHERE Id_Address = @Id_Addre", Program.Connection);
         CMD.Parameters.AddWithValue("@Id_Addre", id_adress);
         CMD.ExecuteNonQuery();
         Program.Connection.Close();
         ErrorMSG E = new ErrorMSG();
         E.Button1.Location       = new Point(150, 55);
         E.Error_TITRE_Label.Text = "تم إدخال العلبة بنجاح";
         E.Message_Label.Text     = "المرجوا إدخال معلومات ملفات العلبة";
         //E.Message_Label.Location = new Point(83, 38);
         E.BackColor = Color.FromArgb(46, 204, 113);
         E.Changerbuttoncouleur(E.Button1, 46, 204, 113);
         E.Button1.ButtonText = "نعم";
         E.ChangeIcon(ArchiveAPPLICATION.Properties.Resources.success);
         E.ShowDialog();
     }
     else
     {
         ErrorMSG E = new ErrorMSG();
         E.Message_Label.Text = "يجب ملئ جميع خانات العلبة";
         E.Button1.Location   = new Point(151, 55);
         E.Button1.ButtonText = "حسنا";
         E.ShowDialog();
     }
 }
예제 #5
0
        private void Add_Files_Button_Click_1(object sender, EventArgs e)
        {
            int Etat = -1;

            for (int i = 0; i < Insert_Folders_DataGridView.Rows.Count - 1; i++)
            {
                for (int j = 0; j < Insert_Folders_DataGridView.Columns.Count; j++)
                {
                    if (Insert_Folders_DataGridView.Rows[i].Cells[j].Value == null)
                    {
                        Etat = 0;
                    }
                }
            }
            if (Insert_Folders_DataGridView.Rows[0].Cells[0].Value == null)
            {
                Etat = 0;
            }
            if (Etat == 0)
            {
                ErrorMSG E = new ErrorMSG();
                E.Message_Label.Text = "يوجد خانة لم يتم إملائها";
                //E.Message_Label.Location = new Point(124, 38);
                E.Button1.Location   = new Point(151, 55);
                E.Button1.ButtonText = "حسنا";
                E.ShowDialog();
            }
            if (Etat == -1)
            {
                if (int.Parse(The_Numbers_of_Box_Label.Text) != Number_Of_Boxs_numericUPDOWN.Value)
                {
                    for (int i = 0; i < Insert_Folders_DataGridView.Rows.Count - 1; i++)
                    {
                        if (Program.Connection.State == ConnectionState.Closed)
                        {
                            Program.Connection.Open();
                        }
                        SqlCommand CMD1 = new SqlCommand("insert into Dossier(Id_Dossier,Numero_Dossier,Anne_Ouverture,Numero_jujment,description,Numero_Ver,Type_Archi,Numero_BoX) Values(@id_Dossier,@Numero_Dossier,@Ann_over,@N_jujment,@Description,@Numero_V,@T_Arch,@N_Box)", Program.Connection);
                        CMD1.Parameters.AddWithValue("@id_Dossier", Insert_Folders_DataGridView.Rows[i].Cells[0].Value);
                        CMD1.Parameters.AddWithValue("@Numero_Dossier", Insert_Folders_DataGridView.Rows[i].Cells[1].Value);
                        CMD1.Parameters.AddWithValue("@Ann_over", Insert_Folders_DataGridView.Rows[i].Cells[2].Value);
                        CMD1.Parameters.AddWithValue("@N_jujment", Insert_Folders_DataGridView.Rows[i].Cells[3].Value);
                        CMD1.Parameters.AddWithValue("@Description", Insert_Folders_DataGridView.Rows[i].Cells[4].Value);
                        CMD1.Parameters.AddWithValue("@Numero_V", int.Parse(Numero_Du_Transsmition_Label.Text));
                        CMD1.Parameters.AddWithValue("@T_Arch", Type_of_Archive_DataLabel.Text);
                        CMD1.Parameters.AddWithValue("@N_Box", int.Parse(The_Numbers_of_Box_Label.Text));
                        CMD1.ExecuteNonQuery();
                    }
                    Program.Connection.Close();
                    Program.Connection.Open();
                    SqlCommand CMD2 = new SqlCommand("UPDATE Carton SET NBRdossier = @nbrdossier WHERE Numero_Verssement = @N_ver AND Type_Archive = @Typ_Arch AND Numero_Box = @id_File", Program.Connection);
                    CMD2.Parameters.AddWithValue("NBRdossier", Insert_Folders_DataGridView.Rows.Count - 1);
                    CMD2.Parameters.AddWithValue("N_ver", int.Parse(Numero_Du_Transsmition_Label.Text));
                    CMD2.Parameters.AddWithValue("@Typ_Arch", Type_of_Archive_DataLabel.Text);
                    CMD2.Parameters.AddWithValue("@id_File", int.Parse(The_Numbers_of_Box_Label.Text));
                    CMD2.ExecuteNonQuery();
                    Program.Connection.Close();
                    Program.Connection.Open();
                    SqlCommand    CMD    = new SqlCommand("SELECT TOP(1)Position,Id_Address FROM Addressage WHERE Libre_Etat = 0 ", Program.Connection);
                    SqlDataReader Reader = CMD.ExecuteReader();
                    DataTable     T      = new DataTable();
                    T.Load(Reader);
                    Box_Cord_Label.Text = T.Rows[0][0].ToString();
                    id_adress           = Convert.ToInt32(T.Rows[0][1]);
                    Program.Connection.Close();
                    panel1.Enabled = true;
                    panel2.Enabled = false;
                    Insert_Folders_DataGridView.Rows.Clear();
                    The_Numbers_of_Box_Label.Text = (int.Parse(The_Numbers_of_Box_Label.Text) + 1).ToString();
                    ResetControls(panel1);
                    Type_of_Archive_DataLabel.Text = "....";

                    ErrorMSG E = new ErrorMSG();
                    E.Button1.Location       = new Point(150, 55);
                    E.Error_TITRE_Label.Text = "تم إدخال معلومات الملفات بنجاح";
                    E.Message_Label.Text     = "المرجوا إدخال معلومات العلبة رقم " + The_Numbers_of_Box_Label.Text;
                    //E.Message_Label.Location = new Point(83, 38);
                    E.BackColor = Color.FromArgb(46, 204, 113);
                    E.Changerbuttoncouleur(E.Button1, 46, 204, 113);
                    E.Button1.ButtonText = "نعم";
                    E.ChangeIcon(ArchiveAPPLICATION.Properties.Resources.success);
                    E.ShowDialog();
                }
                else
                {
                    if (Program.Connection.State == ConnectionState.Closed)
                    {
                        Program.Connection.Open();
                    }
                    SqlCommand CMD2 = new SqlCommand("UPDATE Carton SET NBRdossier = @nbrdossier WHERE Numero_Verssement = @N_ver AND Type_Archive = @Typ_Arch AND Numero_Box = @id_File", Program.Connection);
                    CMD2.Parameters.AddWithValue("NBRdossier", Insert_Folders_DataGridView.Rows.Count - 1);
                    CMD2.Parameters.AddWithValue("N_ver", int.Parse(Numero_Du_Transsmition_Label.Text));
                    CMD2.Parameters.AddWithValue("@Typ_Arch", Type_of_Archive_DataLabel.Text);
                    CMD2.Parameters.AddWithValue("@id_File", int.Parse(The_Numbers_of_Box_Label.Text));
                    CMD2.ExecuteNonQuery();
                    Insert_Folders_DataGridView.Rows.Clear();
                    ResetControls(panel1);
                    ResetControls(panel2);
                    ResetControls(panel3);
                    Numero_Du_Transsmition_Label.Text    = "....";
                    Date_of_Transfer_Creation_Label.Text = "....";
                    Type_of_Archive_DataLabel.Text       = "....";
                    Longeur_Label.Text = "....";
                    panel3.Enabled     = true;
                    panel2.Enabled     = false;

                    ErrorMSG E = new ErrorMSG();
                    E.Button1.Location       = new Point(150, 55);
                    E.Error_TITRE_Label.Text = "لقد تم إدخال جميع الملفات في التحويلة";
                    E.Message_Label.Text     = "يمكنك إضافة تحولية جديدة أو مراجعة التحويلة في القائمة على اليمين";
                    //E.Message_Label.Location = new Point(83, 38);
                    E.BackColor = Color.FromArgb(46, 204, 113);
                    E.Changerbuttoncouleur(E.Button1, 46, 204, 113);
                    E.Button1.ButtonText = "نعم";
                    E.ChangeIcon(ArchiveAPPLICATION.Properties.Resources.success);
                    E.ShowDialog();
                    Form1.Home_button_Click_Value = 1;
                }
            }
        }
예제 #6
0
 private void Add_Transfer_Button_Click_1(object sender, EventArgs e)
 {
     if (Tribunal_ComboBox.Text != string.Empty && Tribunal_Codes_ComboBox.Text != string.Empty && Responsable_ComboBox.Text != string.Empty && Adminstration_ComboBox.Text != string.Empty && Number_Of_Boxs_numericUPDOWN.Value != 0 && (Non_radio.Checked == true || Oui_radio.Checked == true))
     {
         panel1.Enabled = true;
         panel3.Enabled = false;
         if (Program.Connection.State == ConnectionState.Closed)
         {
             Program.Connection.Open();
         }
         if (Non_radio.Checked == true)
         {
             //DateTime.Now.ToShortDateString() + "'," + Number_Of_Boxs_numericUPDOWN.Value + "," + float.Parse(Metrage) + ")"
             string     Metrage = Longeur_Label.Text.TrimEnd('M');
             SqlCommand CMD     = new SqlCommand("UPDATE Verssements SET Code_Tribunal = @Code_Tribunal,Nom_Administration = @Nom_Admin ,Responsable=@Responsable ,Date_Vessement= @Date_ver,Nombre_Box = @Nbr_Box,Metrage = @Metrage Where Numero_Verssement = @Num_Ver ", Program.Connection);
             CMD.Parameters.AddWithValue("@Code_Tribunal", Tribunal_Codes_ComboBox.Text);
             CMD.Parameters.AddWithValue("@Nom_Admin", Adminstration_ComboBox.Text);
             CMD.Parameters.AddWithValue("@Responsable", Responsable_ComboBox.Text);
             CMD.Parameters.AddWithValue("@Date_ver", DateTime.Now.ToShortDateString());
             CMD.Parameters.AddWithValue("@Nbr_Box", Number_Of_Boxs_numericUPDOWN.Value);
             CMD.Parameters.AddWithValue("@Metrage", float.Parse(Metrage));
             CMD.Parameters.AddWithValue("@Num_Ver", int.Parse(Numero_Du_Transsmition_Label.Text));
             CMD.ExecuteNonQuery();
             if (Tribunal_ComboBox.Text == "محكمة الاستئناف ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إبتدائية-محكمة الاستئناف'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة الاستئناف الإداريه ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة الاستئناف الإداريه'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة الاستئناف التجارية")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة تجارية-محكمة الاستئناف التجارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة إبتدائية")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إبتدائية-محكمة الاستئناف'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة إدارية")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إدارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة تجارية ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة تجارية-محكمة الاستئناف التجارية' or Tribunal = 'محكمة تجارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "مركز القاضي المقيم ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إبتدائية-محكمة الاستئناف' or Tribunal = 'محكمة تجارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "مراكز حكام الجماعات ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إبتدائية-محكمة الاستئناف' or Tribunal = 'محكمة تجارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             Program.Connection.Close();
             if (Program.Connection.State == ConnectionState.Closed)
             {
                 Program.Connection.Open();
             }
             CMD = new SqlCommand("SELECT TOP(1)Position,Id_Address FROM Addressage WHERE Libre_Etat = 0 ", Program.Connection);
             SqlDataReader Reader = CMD.ExecuteReader();
             DataTable     T      = new DataTable();
             T.Load(Reader);
             Box_Cord_Label.Text = T.Rows[0][0].ToString();
             id_adress           = Convert.ToInt32(T.Rows[0][1]);
         }
         if (Oui_radio.Checked == true)
         {
             string     Metrage = Longeur_Label.Text.TrimEnd('M');
             SqlCommand CMD     = new SqlCommand("UPDATE Verssements SET Code_Tribunal = @Code_Tribunal,Nom_Administration = @Nom_Admin ,Responsable=@Responsable ,Date_Vessement= @Date_ver,Nombre_Box = @Nbr_Box,Metrage = @Metrage, Stocker = @Stocker,Date_Stockage = @Date_Stockage WHERE Numero_Verssement = @Num_Ver ", Program.Connection);
             CMD.Parameters.AddWithValue("@Code_Tribunal", Tribunal_Codes_ComboBox.Text);
             CMD.Parameters.AddWithValue("@Nom_Admin", Adminstration_ComboBox.Text);
             CMD.Parameters.AddWithValue("@Responsable", Responsable_ComboBox.Text);
             CMD.Parameters.AddWithValue("@Date_ver", DateTime.Now.ToShortDateString());
             CMD.Parameters.AddWithValue("@Nbr_Box", Number_Of_Boxs_numericUPDOWN.Value);
             CMD.Parameters.AddWithValue("@Metrage", float.Parse(Metrage));
             CMD.Parameters.AddWithValue("@Stocker", 1);
             CMD.Parameters.AddWithValue("@Date_Stockage", DateTime.Now.ToShortDateString());
             CMD.Parameters.AddWithValue("@Num_Ver", int.Parse(Numero_Du_Transsmition_Label.Text));
             CMD.ExecuteNonQuery();
             if (Tribunal_ComboBox.Text == "محكمة الاستئناف ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إبتدائية-محكمة الاستئناف'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة الاستئناف الإداريه ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة الاستئناف الإداريه'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة الاستئناف التجارية")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة تجارية-محكمة الاستئناف التجارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة إبتدائية")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إبتدائية-محكمة الاستئناف'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة إدارية")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إدارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "محكمة تجارية ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة تجارية-محكمة الاستئناف التجارية' or Tribunal = 'محكمة تجارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "مركز القاضي المقيم ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إبتدائية-محكمة الاستئناف' or Tribunal = 'محكمة تجارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             if (Tribunal_ComboBox.Text == "مراكز حكام الجماعات ")
             {
                 Codes_of_Proces_ComboBox.Items.Clear();
                 Program.CMD        = new SqlCommand("SELECT Code_Proces,Nom_Proces,Duree_Archive FROM Proces WHERE Tribunal = 'محكمة إبتدائية-محكمة الاستئناف' or Tribunal = 'محكمة تجارية'", Program.Connection);
                 Program.DataReader = Program.CMD.ExecuteReader();
                 while (Program.DataReader.Read())
                 {
                     Codes_of_Proces_ComboBox.Items.Add(Program.DataReader[0]);
                 }
             }
             Program.Connection.Close();
             if (Program.Connection.State == ConnectionState.Closed)
             {
                 Program.Connection.Open();
             }
             CMD = new SqlCommand("SELECT TOP(1)Position,Id_Address FROM Addressage WHERE Libre_Etat = 0 ", Program.Connection);
             SqlDataReader Reader = CMD.ExecuteReader();
             DataTable     T      = new DataTable();
             T.Load(Reader);
             Box_Cord_Label.Text = T.Rows[0][0].ToString();
             id_adress           = Convert.ToInt32(T.Rows[0][1]);
         }
         The_Numbers_of_Box_Label.Text = "1";
         ErrorMSG E = new ErrorMSG();
         E.Button1.Location       = new Point(150, 55);
         E.Error_TITRE_Label.Text = "تم إدخال التحويلة بنجاح";
         E.Message_Label.Text     = "المرجوا إدخال معلومات العلبة رقم 1";
         //E.Message_Label.Location = new Point(83, 38);
         E.BackColor = Color.FromArgb(46, 204, 113);
         E.Changerbuttoncouleur(E.Button1, 46, 204, 113);
         E.Button1.ButtonText = "نعم";
         E.ChangeIcon(ArchiveAPPLICATION.Properties.Resources.success);
         E.ShowDialog();
     }
     else
     {
         ErrorMSG E = new ErrorMSG();
         E.Message_Label.Text = "يجب ملئ جميع الخانات";
         E.Button1.ButtonText = "حسنا";
         E.Button1.Location   = new Point(148, 55);
         E.ShowDialog();
     }
 }