예제 #1
0
        private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            الأمر a = new الأمر();

            a.ShowDialog();
        }
예제 #2
0
 private void simpleButton7_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentRow != null)
     {
         الأمر f = new الأمر();
         f.txb_num_orderValue     = (string)dataGridView1.CurrentRow.Cells[0].Value;
         f.combobox1Value         = (string)dataGridView1.CurrentRow.Cells[9].Value;
         f.txtMofawadValue        = (string)dataGridView1.CurrentRow.Cells[3].Value;
         f.cbVilleValue           = (string)dataGridView1.CurrentRow.Cells[4].Value;
         f.cb_genre_trubinalValue = (string)dataGridView1.CurrentRow.Cells[5].Value;
         f.signeOrderValue        = (string)dataGridView1.CurrentRow.Cells[1].Value;
         f.decisionValue          = (string)dataGridView1.CurrentRow.Cells[8].Value;
         SqlConnection cn  = connection.getConnection();
         SqlCommand    cmd = new SqlCommand();
         SqlDataReader dr;
         if (cn.State == ConnectionState.Closed)
         {
             cn.Open();
         }
         cmd.Connection  = cn;
         cmd.CommandText = "select id_client_order,id_adversaire_order from orderr where id_order = @id";
         cmd.Parameters.Add("@id", (string)dataGridView1.CurrentRow.Cells[0].Value);
         dr = cmd.ExecuteReader();
         dr.Read();
         int idcl = (int)dr["id_client_order"];
         int idad = (int)dr["id_adversaire_order"];
         dr.Close();
         dr.Dispose();
         cmd.Parameters.Clear();
         cmd.CommandText = "select * from client_order where id_client_order=@id";
         cmd.Parameters.Add("@id", idcl);
         dr = cmd.ExecuteReader();
         dr.Read();
         f.idclient              = dr["id_client_order"].ToString();
         f.cbGenreClientValue    = (string)dr["type_client_order"];
         f.txbCinClientValue     = (string)dr["cin"];
         f.txbNomClientValue     = (string)dr["nom"];
         f.txbTelValue           = (string)dr["telephone"];
         f.txbJuridiqueValue     = (string)dr["representant_legal"];
         f.txbNumSocieteValue    = (string)dr["registre_commerce"];
         f.txbAdresseClientValue = (string)dr["adresse"];
         dr.Close();
         dr.Dispose();
         cmd.Parameters.Clear();
         cmd.CommandText = "select * from adv_order where id_adv_order=@id";
         cmd.Parameters.Add("@id", idad);
         dr = cmd.ExecuteReader();
         dr.Read();
         f.txbIdAdvValue         = dr["id_adv_order"].ToString();
         f.txbGenreAdvValue      = (string)dr["type_adv_order"];
         f.txbCinAdvValue        = (string)dr["cin"];
         f.txbNameAdvValue       = (string)dr["nom"];
         f.txbJuridiqueAdvValue  = (string)dr["representant_legal"];
         f.txbNumSocieteAdvValue = (string)dr["registre_commerce"];
         f.txbAdresseAdvValue    = (string)dr["adresse"];
         dr.Close();
         dr.Dispose();
         cmd.Parameters.Clear();
         cn.Close();
         f.showEditButton = true;
         f.Show();
     }
     else
     {
         MessageBox.Show("يجب  اختيار السطر المراد التعديل عليه");
     }
 }