So I added
CustShipAdapt.CustShipData.Tables("ShipHead").Rows(0)("Character05") = "It
Works"
to the existing code I had and it worked BEAUTIFULLY! Thank you!
CustShipAdapt.CustShipData.Tables("ShipHead").Rows(0)("Character05") = "It
Works"
to the existing code I had and it worked BEAUTIFULLY! Thank you!
--- In vantage@yahoogroups.com, "mmcwilliams22" <mmcwilliams22@...> wrote:
>
> Try this.
>
> Private Sub PackingSlipParam_AfterFieldChange(ByVal sender As object, ByVal args As DataColumnChangeEventArgs) Handles PackingSlipParam_Column.ColumnChanged
>
> Dim edvReportParam As EpiDataView = CType(oTrans.EpiDataViews("ReportParam"), EpiDataView)
>
> Select Case args.Column.ColumnName
>
> Case "WorkstationID"
> Dim edvShipHead As EpiDataView = CType(oTrans.EpiDataViews("ShipHead"), EpiDataView)
>
> Dim packNum As String = edvShipHead.dataView(edvShipHead.Row)("PackNum")
>
> Dim CustShipAdapt As CustShipAdapter = New CustShipAdapter(PackingSlipPrintForm)
>
> CustShipAdapt.BOConnect()
> Dim ShipAdapter As Boolean = CustShipAdapt.GetByID(edvReportParam.dataView(packNum)
>
> If edvReportParam.dataView(edvReportParam.Row)("ReportStyleNum") = 4 then
>
> CustShipAdapt.CustShipData.Tables("ShipHead").Rows(0)("Character05") = "It Works"
>
> Else
>
> End If
> Case Else
>
> End Select
> CustShipAdapt.Update()
> CustShipAdapt.Dispose()
> End Sub
>
>
>
>
>
>
>
>
> --- In vantage@yahoogroups.com, "drew.pete" <drew.pete@> wrote:
> >
> > Gotcha. I am completely new to adapters so here is what I have thus far. I believe I am connecting to the adapter fine and bringing up the correct id, but I haven't a clue as to how to populate the field ShipHead.Character05. Any help would be greatly appreciated.
> >
> > Private Sub PackingSlipParam_AfterFieldChange(ByVal sender As object, ByVal args As DataColumnChangeEventArgs) Handles PackingSlipParam_Column.ColumnChanged
> >
> > Dim edvReportParam As EpiDataView = CType(oTrans.EpiDataViews("ReportParam"), EpiDataView)
> >
> > Dim CustShipAdapt As CustShipAdapter = New CustShipAdapter(PackingSlipPrintForm)
> >
> > CustShipAdapt.BOConnect()
> > CustShipAdapt.GetByID(edvReportParam.dataView(edvReportParam.Row)("PackNum"))
> >
> > Select Case args.Column.ColumnName
> >
> > Case "WorkstationID"
> >
> >
> > Dim edvShipHead As EpiDataView = CType(oTrans.EpiDataViews("ShipHead"), EpiDataView)
> >
> > If edvReportParam.dataView(edvReportParam.Row)("ReportStyleNum") = 4 then
> >
> > edvShipHead.dataView(edvShipHead.Row)("Character05") = "It Works!"
> >
> > Else
> > End If
> > Case Else
> >
> > End Select
> > CustShipAdapt.Update()
> > CustShipAdapt.Dispose()
> > End Sub
> >
> > --- In vantage@yahoogroups.com, "mmcwilliams22" <mmcwilliams22@> wrote:
> > >
> > > FKV is read only you will need to use the CustShipAdapter to populate the ship head.
> > >
> > > --- In vantage@yahoogroups.com, "drew.pete" <drew.pete@> wrote:
> > > >
> > > > Right now I would like to populate a field when a certain report is printed. In order to do that I am bringing in the ShipHead as a Foreign Key View. When the user selects "Print Preview" the field "WorkstationID" changes, initiating the event code. I can get the field ShipHead.Character05 to populate and I can see it on the Print Form but I can't get the string to get stored in the database. I tried otrans.update() but that didn't work. Any thoughts??
> > > >
> > > > Thanks,
> > > >
> > > > Drew
> > > >
> > > > Private Sub PackingSlipParam_AfterFieldChange(ByVal sender As object, ByVal args As DataColumnChangeEventArgs) Handles PackingSlipParam_Column.ColumnChanged
> > > >
> > > > Select Case args.Column.ColumnName
> > > >
> > > > Case "WorkstationID"
> > > >
> > > > Dim edvReportParam As EpiDataView = CType(oTrans.EpiDataViews("ReportParam"), EpiDataView)
> > > > Dim edvShipHead As EpiDataView = CType(oTrans.EpiDataViews("ShipHead"), EpiDataView)
> > > > If edvReportParam.dataView(edvReportParam.Row)("ReportStyleNum") = 4 then
> > > > edvShipHead.dataView(edvShipHead.Row)("Character05") = "It Works!"
> > > > Else
> > > > End If
> > > > Case Else
> > > >
> > > > End Select
> > > > otrans.update()
> > > > End Sub
> > > >
> > >
> >
>