Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int?customerID = 0;

            if (dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["CustomerID"].Value != null)
            {
                if (MessageBox.Show("هل نت متأكد من تعديل حساب هذا العميل؟", "تحذير", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    customerID = Convert.ToInt32(dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["CustomerID"].Value);
                    frmCustomerAccountEdit _frmCustomerAccountEdit = new frmCustomerAccountEdit(customerID.Value, this);
                    _frmCustomerAccountEdit.ShowDialog();
                }
                else
                {
                    return;
                }
            }
            else
            {
                MessageBox.Show("لابد من اختيار عميل");
            }
        }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     int? customerID = 0;
     if (dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["CustomerID"].Value != null)
     {
         if (MessageBox.Show("هل نت متأكد من تعديل حساب هذا العميل؟", "تحذير", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             customerID = Convert.ToInt32(dgrid_Result.Rows[dgrid_Result.SelectedCells[0].RowIndex].Cells["CustomerID"].Value);
             frmCustomerAccountEdit _frmCustomerAccountEdit = new frmCustomerAccountEdit(customerID.Value, this);
             _frmCustomerAccountEdit.ShowDialog();
         }
         else
         {
             return;
         }
     }
     else
     {
         MessageBox.Show("لابد من اختيار عميل");
     }
 }