Click here to Skip to main content
15,914,013 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: dotnet dll distribution Pin
Colin Angus Mackay9-Sep-05 9:12
Colin Angus Mackay9-Sep-05 9:12 
GeneralRe: dotnet dll distribution Pin
rwestgraham9-Sep-05 9:56
rwestgraham9-Sep-05 9:56 
GeneralRe: dotnet dll distribution Pin
Colin Angus Mackay9-Sep-05 10:02
Colin Angus Mackay9-Sep-05 10:02 
GeneralBootstrapping dotnetfx.exe Pin
rwestgraham9-Sep-05 10:12
rwestgraham9-Sep-05 10:12 
QuestionCrystal Reports Hell Pin
Len Miller9-Sep-05 7:43
Len Miller9-Sep-05 7:43 
AnswerRe: Crystal Reports Hell Pin
nguyenthai20109-Sep-05 23:13
nguyenthai20109-Sep-05 23:13 
GeneralRe: Crystal Reports Hell Pin
Len Miller12-Sep-05 4:15
Len Miller12-Sep-05 4:15 
Questionpassing values from a form to a dialog form Pin
macupryk9-Sep-05 5:48
macupryk9-Sep-05 5:48 
I have declared the following variables in the form transoverride.vb

Dim Account_Name, PolicyNumber, TransCodeOrig, TransEffDate, Override_Action, Override_New_Renewal, Override_Transaction_Code, ModifiedDate, ModifiedUID, Plan_Year As String
Dim RowNum As Integer

The goal of this question is that I want to pass the above variables to a dialog form called edittransoverride.
Public Sub DoModify()

Dim dTable As DataTable = Me.DataGrid1.DataSource
Dim bm As BindingManagerBase = Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember)
Dim dRow As DataRow = CType(bm.Current, DataRowView).Row
Me.lbNumRec.Text = Me.DsTransOverride1.Tables(0).Rows.Count.ToString()
Dim cEditTransOverride As New EditTransOverride
cEditTransOverride.ShowDialog()
cEditTransOverride.Dispose()

Me.SqlDataAdapter1.Update(Me.DsTransOverride1)
Me.DsTransOverride1.Tables(0).Clear()
Me.SqlDataAdapter1.Fill(Me.DsTransOverride1)
Me.DataGrid1.Refresh()

End Sub



In the subroutine that belogs to transoverride.vb I assign them values before passing to the dialog form.
Private Sub highLightRow(ByVal sender As Object, ByVal e As MouseEventArgs)

Dim pt = New Point(e.X, e.Y)
Dim grd As DataGrid = CType(sender, DataGrid)
Dim hit As DataGrid.HitTestInfo = grd.HitTest(pt)


If hit.Type = grd.HitTestType.Cell Then
grd.CurrentCell = New DataGridCell(hit.Row, hit.Column)
RowNum = hit.Row
grd.Select(RowNum)
Account_Name = Convert.ToString(grd.Item(RowNum, 0))
PolicyNumber = Convert.ToString(grd.Item(RowNum, 1))
TransCodeOrig = Convert.ToString(grd.Item(RowNum, 2))
TransEffDate = Convert.ToString(grd.Item(RowNum, 3))
Override_Action = Convert.ToString(grd.Item(RowNum, 4))
Override_New_Renewal = Convert.ToString(grd.Item(RowNum, 5))
Override_Transaction_Code = Convert.ToString(grd.Item(RowNum, 6))
ModifiedUID = Convert.ToString(grd.Item(RowNum, 7))
ModifiedDate = Convert.ToString(grd.Item(RowNum, 8))
Plan_Year = Convert.ToString(grd.Item(RowNum, 9))
End If
End Sub


Now I must get these values in the load of the edittransoverride.vb dialog form.

Private Sub EditForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Save old values

oldPolicyNumber = PolicyNumber
oldTransCode = TransCodeOrig
oldTransEffDate = TransEffDate

' Verify for Null fields
FillTextBox(txtAccountName, Account_Name)
FillTextBox(txtPolicyNumber, PolicyNumber)
FillTextBox(txtUserId, ModifiedUID)
dteEffDt.Text = TransEffDate.ToShortDateString()
dteEffDt.Value = TransEffDate.ToShortDateString()
FillTextBox(txtDate, ModifiedDate)
FillComboBox(cmbOriginalTransCode, TransCodeOrig)
FillComboBox(cmbOverrideAction, Override_Action)
FillComboBox(cmbOverrideNR, Override_New_Renewal)
FillComboBox(cmbOverrideTransactionCode, Override_Transaction_Code)
txtPlanYear.Text = Plan_Year
Me.lbRecNum.Text = RowNum

End Sub

How do I go about defining these variables so I can use them in my Load routine of the Dialog form.?


AnswerRe: passing values from a form to a dialog form Pin
rwestgraham9-Sep-05 10:22
rwestgraham9-Sep-05 10:22 
GeneralRe: passing values from a form to a dialog form Pin
macupryk9-Sep-05 23:38
macupryk9-Sep-05 23:38 
AnswerRe: passing values from a form to a dialog form Pin
Rizwan Bashir9-Sep-05 23:26
Rizwan Bashir9-Sep-05 23:26 
GeneralRe: passing values from a form to a dialog form Pin
macupryk9-Sep-05 23:40
macupryk9-Sep-05 23:40 
GeneralRe: passing values from a form to a dialog form Pin
Rizwan Bashir10-Sep-05 9:08
Rizwan Bashir10-Sep-05 9:08 
QuestionHow I can give XP control looks in VB.net controls Pin
deepak_rai9-Sep-05 4:32
deepak_rai9-Sep-05 4:32 
AnswerRe: How I can give XP control looks in VB.net controls Pin
rudy.net11-Sep-05 17:20
rudy.net11-Sep-05 17:20 
QuestionXP control look in VB.net controls Pin
deepak_rai9-Sep-05 4:28
deepak_rai9-Sep-05 4:28 
QuestionImage conversion help, pixel byte array to image Pin
Anonymous9-Sep-05 2:47
Anonymous9-Sep-05 2:47 
AnswerRe: Image conversion help, pixel byte array to image Pin
Dave Kreskowiak9-Sep-05 4:16
mveDave Kreskowiak9-Sep-05 4:16 
GeneralRe: Image conversion help, pixel byte array to image Pin
Anonymous12-Sep-05 10:30
Anonymous12-Sep-05 10:30 
GeneralRe: Image conversion help, pixel byte array to image Pin
charles09298827-Sep-10 20:35
charles09298827-Sep-10 20:35 
QuestionNOT VB .... VBA Pin
OMalleyW9-Sep-05 2:07
OMalleyW9-Sep-05 2:07 
AnswerRe: NOT VB .... VBA Pin
Dave Kreskowiak9-Sep-05 2:23
mveDave Kreskowiak9-Sep-05 2:23 
GeneralRe: NOT VB .... VBA Pin
OMalleyW9-Sep-05 2:59
OMalleyW9-Sep-05 2:59 
GeneralRe: NOT VB .... VBA Pin
Dave Kreskowiak9-Sep-05 4:10
mveDave Kreskowiak9-Sep-05 4:10 
GeneralRe: NOT VB .... VBA Pin
OMalleyW9-Sep-05 4:34
OMalleyW9-Sep-05 4:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.