Beispiel #1
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         Code1 = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
         day   = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
         per   = dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString();
         name  = dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString();
         حجز_حالات_الحوادث_بالطوارىء ff = new حجز_حالات_الحوادث_بالطوارىء(Code1, day, per, name);
         ff.Focus();
         this.DialogResult = DialogResult.OK;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + "");
     }
 }
Beispiel #2
0
        /*   private void fill(object sender, DataGridViewCellMouseEventArgs e)
         * {
         *
         *
         *    // MessageBox.Show("asad");
         *     string a = this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
         *     id = int.Parse(a);
         *     string b = this.dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
         *     string c = this.dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();
         *     // h = int.Parse(c);
         *     حجز_حالات_الحوادث_بالطوارىء d = new حجز_حالات_الحوادث_بالطوارىء(id, b);
         *     d.Show();
         *
         * }
         */

        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            // MessageBox.Show("asad");
            // MessageBox.Show("asad");
            try
            {
                string a = this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
                id = int.Parse(a);
                string b = this.dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
                string c = this.dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();
                // h = int.Parse(c);
                حجز_حالات_الحوادث_بالطوارىء d = new حجز_حالات_الحوادث_بالطوارىء(id, b);
                d.Show();
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }