I know this is a lot of code, but here is what I have;
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
uf_get_supplier_list()
End If
End Sub
Private Sub uf_get_supplier_list()
'This function gets the Withdrawal listing if available.
'Define the local variables.
Dim li_no_row As Integer = 0
Try
'Instantiate an RPC to get an Withdrawal Listing.
lo_AZRM001A_SEL = New MotorFuel.AZRM001A_SEL()
lo_misc_func = New MotorFuel.misc_func()
Catch
'Destroy the objects.
lo_AZRM001A_SEL = Nothing
lo_misc_func = Nothing
End Try
'Check for CICS call.
If lo_AZRM001A_SEL.uf_cicscall() Then
'If CICS call is true then move forward.
'Check for the dci error code.
If lo_AZRM001A_SEL.get_dci_error_code = "0000" Then
'Convert the string value to the interget value.
If lo_misc_func.IsNumeric(lo_AZRM001A_SEL.get_dci_row _count) = True Then
li_no_row = Integer.Parse(lo_AZRM001A_SEL.get_dci_row_count)
Else
li_no_row = 0
End If
'Set the data to the Data Grid if the li_no_row is not equal "0".
If li_no_row <> 0 Then
If Page.IsPostBack = False Then
'dtg_sel_sup.DataSource = lo_AZRM001A_SEL.get_ddl_sel_sup
dt_mc = lo_AZRM001A_SEL.get_ddl_sel_sup
dtg_load_data()
End If
Else
End If
'Destroy the objects.
lo_AZRM001A_SEL = Nothing
lo_misc_func = Nothing
End If
Else
'Destroy the objects.
lo_AZRM001A_SEL = Nothing
lo_misc_func = Nothing
End If
End Sub
Private Sub btn_sel_sup_ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_sel_sup_ok.Click
Response.Redirect("../Common/mc_rpt_period.aspx")
End Sub
Sub dtg_load_data()
dtg_sel_sup.DataSource = dt_mc
dtg_sel_sup.DataKeyField = "BusinessID"
dtg_sel_sup.DataMember = "BusinessName"
dtg_sel_sup.DataMember = "Account"
dtg_sel_sup.DataBind()
'Destroy the objects.
lo_AZRM001A_SEL = Nothing
lo_misc_func = Nothing
End Sub
Sub dtg_sel_sup_Page(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs)
dtg_sel_sup.CurrentPageIndex = e.NewPageIndex
End Sub
I'm not sure if it is the lack of a Not page.isPostBack that is causing me the problem in my dataload sub or not...any suggestions? Thanks very much for your help :-)
---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/