Returning Value from EntityClass

Posts   
 
    
avarndel
User
Posts: 36
Joined: 14-Jun-2007
# Posted on: 27-Sep-2007 17:45:44   

Hi,

I'm calling the following and return a value

Dim CostCenterID = Me.ddlCostCenterNames.SelectedValue Dim CustID = Me.ddlClientName.SelectedValue Dim ExpectedStartDate = Me.dteExpectedStartDte.SelectedDate Dim ExpectedEndDate = Me.dteExpectedEndDte.SelectedDate Dim RequestStatus = Me.txtRequestStatus.Text Dim Billings = Me.numBillings.ToString Dim Revenue = Me.numRevenue.ToString Dim ProjDesc = Me.txtDescription.Text

PBBRL.EntityClass.xProjectRequest.AddProjectRequest(CostCenterID, CustID, ExpectedStartDate, ExpectedEndDate, RequestStatus, Billings, Revenue, ProjDesc, BReqID)

BReqID is the returned value and I need to add it to a variable. What is the best way to accomplish this?

Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 28-Sep-2007 11:21:54   

I can't see how your question relates to LLBLGen Pro. I'm sorry, but I think your post need much elaboration.

"PBBRL.EntityClass" What does that namespace represent?

PBBRL.EntityClass.xProjectRequest.AddProjectRequest(CostCenterID, CustID, ExpectedStartDate, ExpectedEndDate, RequestStatus, Billings, Revenue, ProjDesc, BReqID)

BReqID is the returned value and I need to add it to a variable. What is the best way to accomplish this?

Dim BReqID As Integer

avarndel
User
Posts: 36
Joined: 14-Jun-2007
# Posted on: 28-Sep-2007 17:46:00   

Sorry, It's call my BRL which is using LLGen. Here is the code for that Namespace EntityClass Public Class xProjectRequest Inherits PBDAL.EntityClasses.XProjectRequestEntity Public Shared Sub AddProjectRequest(ByVal costCenterId As String, ByVal ClientName As String, ByVal ExpectedStartDate As Date, ByVal ExpectedEndDate As Date, ByVal RequestStatus As String, ByVal Billings As Integer, ByVal Revenue As Integer, ByVal ProjDesc As String, ByRef BudReqID As Integer) Dim obj As New xProjectRequest obj.CostCenterId = costCenterId obj.CustId = ClientName obj.ExpectedStartDate = ExpectedStartDate obj.ExpectedEndDate = ExpectedEndDate obj.RequestStatus = RequestStatus obj.Billings = Billings obj.Revenue = Revenue obj.ProjDesc = ProjDesc obj.Save() BudReqID = obj.BudReqId End Sub Public Shared Sub UpdateProjectRequest(ByVal BReqID As Integer, ByVal costCenterId As String, ByVal ClientID As String, ByVal ExpectedStartDate As Date, ByVal ExpectedEndDate As Date, ByVal RequestStatus As String, ByVal RateCardID As String, ByVal Billings As Integer, ByVal Revenue As Integer, ByVal ProjDesc As String, ByVal NoBid As Boolean) Dim obj As New xProjectRequest obj.FetchUsingPK(BReqID) obj.CostCenterId = costCenterId obj.CustId = ClientID obj.ExpectedStartDate = ExpectedStartDate obj.ExpectedEndDate = ExpectedEndDate obj.RequestStatus = RequestStatus obj.RateCardId = RateCardID obj.Billings = Billings obj.Revenue = Revenue obj.ProjDesc = ProjDesc obj.NoBid = NoBid obj.Save() End Sub End Class End Namespace

I'm not up on the lingo, but once I get the returned value, how can I add it to my variable in my ASPX form?

THanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 29-Sep-2007 06:44:20   

I think this isn't related to LLBLGenPro (the question would be the same with other simply function that return any value). However I recommend you to read some about ASPX Session and ViewState. If there's anything we can help you related to LLBLGenPro please let us know. wink

David Elizondo | LLBLGen Support Team