30-04-24, 06:32 PM
السلام عليكم
محتاج اضيف الكود فى موديل واستخدمه فى اكتر من فورم
مع تغير اسم الفورم والتكست بوكس حسب الفورم
كل شاشة فيها اسماء التكست بوكس مختلفة
الكود هيتكرر معايا فى المشروع كله
محتاج اضيف الكود فى موديل واستخدمه فى اكتر من فورم
مع تغير اسم الفورم والتكست بوكس حسب الفورم
كل شاشة فيها اسماء التكست بوكس مختلفة
الكود هيتكرر معايا فى المشروع كله
كود :
Try
Select Case selectName
Case "Vind"
frmVindors.txtRegionNameID.Text = dgv_Add.CurrentRow.Cells(0).Value
frmVindors.txtRegionName.Text = dgv_Add.CurrentRow.Cells(1).Value
Me.Close()
Case "Cust"
frmCustomers.txtRegionNameID.Text = dgv_Add.CurrentRow.Cells(0).Value
frmCustomers.txtRegionName.Text = dgv_Add.CurrentRow.Cells(1).Value
Me.Close()
Case "Shipping"
frmCustomers.txtRegionNameID.Text = dgv_Add.CurrentRow.Cells(0).Value
frmCustomers.txtRegionName.Text = dgv_Add.CurrentRow.Cells(1).Value
Me.Close()
Case "Region"
frmCustomers.txtRegionNameID.Text = dgv_Add.CurrentRow.Cells(0).Value
frmCustomers.txtRegionName.Text = dgv_Add.CurrentRow.Cells(1).Value
Me.Close()
Case Else
End Select
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try


