Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            int?supplierID = 0;

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