private void barButtonItem2_ItemClick_1(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { الموضوع m = new الموضوع(); m.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void simpleButton1_Click(object sender, EventArgs e) { if (cn.State == ConnectionState.Closed) { cn.Open(); } if (dataGridView1.SelectedRows.Count > 0) { //ادارة_الموكلين a = new ادارة_الموكلين(this); الموضوع frm = new الموضوع(); frm.edit_button.Visible = true; frm.simpleButtonAjouterCause.Visible = false; frm.simpleButtonNouveauCause.Visible = false; frm.txtMarjiaCause1.Enabled = false; cmd = new SqlCommand("select * from cause c,client_cause cl,adversaire_cause ad where c.id_cause='" + dataGridView1.SelectedRows[0].Cells[0].Value.ToString() + "' and c.id_client=cl.id_client_cause and c.id_adv=ad.id_adversaire_cause", cn); reader = cmd.ExecuteReader(); while (reader.Read()) { frm.txtMarjiaCause1.Text = reader["id_cause"].ToString().Trim(); frm.dateTimePickeDateCause.Text = reader["date_creation"].ToString(); frm.txt_juge.Text = reader["juge"].ToString().Trim(); frm.txt_signe_cause.Text = reader["signe_cause"].ToString().Trim(); frm.txt_type_cause.Text = reader["type_cause"].ToString().Trim(); frm.txtNumCause.Text = reader["num_cause_tribunal"].ToString().Trim(); frm.txt_avocat_adversaire.Text = reader["avocat_adv"].ToString().Trim(); frm.txt_commisaire_judiciaire.Text = reader["commisaire_judiciaire"].ToString().Trim(); frm.textBoxCauseProfMoukalaf.Text = reader["nom_avocat"].ToString().Trim();; // frm.cb_appel.Text = reader["appel"].ToString().Trim(); frm.cb_appel.Text = reader["appel"].ToString().Trim(); frm.comboBoxTypeTribunal.Text = reader["tribunal"].ToString().Trim(); frm.comboBoxVilleCause.Text = reader["ville"].ToString().Trim(); // MessageBox.Show((string)reader["tribunal"]); frm.cb_porsuit.Text = reader["poursuite"].ToString().Trim(); frm.textBoxTypeClient.Text = reader["type_client"].ToString().Trim(); frm.textBoxNomClient.Text = reader["nom"].ToString().Trim(); frm.textBoxTelClient.Text = (string)reader["telephone"].ToString().Trim(); frm.textBoxAdresseClient.Text = (string)reader["adresse"].ToString().Trim(); frm.textBoxCINClient.Text = (string)reader["cin"].ToString().Trim(); frm.textBoxMoumatilQanouniClient.Text = (string)reader["representant_legal"].ToString().Trim(); frm.textBoxSijilTijariClient.Text = (string)reader["registre_commerce"].ToString().Trim(); frm.textBoxTypeAdver.Text = (string)reader["type_adv"].ToString().Trim(); frm.textBoxNomAdv.Text = (string)reader["nom_adv"].ToString().Trim(); frm.textBoxSijilTijariAdv.Text = (string)reader["registre_commerce_adv"].ToString().Trim(); frm.textBoxAdresseAdv.Text = (string)reader["adresse_adv"].ToString().Trim(); frm.textBoxCINAdv.Text = (string)reader["cin_adv"].ToString().Trim(); frm.textBoxMoumatilQanouniAdv.Text = (string)reader["representant_legal_adv"].ToString().Trim(); frm.txt_montant.Text = reader["total_paiement"].ToString().Trim(); frm.txt_duree.Text = reader["duree"].ToString().Trim(); } //(this.Owner as الموضوع).edit_button.Visible = true; frm.abc += new الموضوع.DoEvent(fm_Refresh); frm.ShowDialog(); this.Close(); //frm.ShowDialog(); } else { //MessageBox.Show("you should shoose a rows"); } cn.Close(); }