Problems calling FillByPrimaryKey method of a BO


Author
Message
Marcia G Akins
Marcia G Akins
StrataFrame VIP (1.9K reputation)StrataFrame VIP (1.9K reputation)StrataFrame VIP (1.9K reputation)StrataFrame VIP (1.9K reputation)StrataFrame VIP (1.9K reputation)StrataFrame VIP (1.9K reputation)StrataFrame VIP (1.9K reputation)StrataFrame VIP (1.9K reputation)StrataFrame VIP (1.9K reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
Hi All.

I am baffled. I must be doing something stupid.

This line of code:

boSchedule_hdr.FillByPrimaryKey(tiSchedHdr_id);

gives me this error:

Error 1 An object reference is required for the non-static field, method, or property 'MicroFour.StrataFrame.Business.BusinessLayer.FillByPrimaryKey(int)' F:\TGIF\Libs\HandicapCalculator.cs 14 13 TGIF

This line of code:

boCalcPar.GetLast3Scores(Convert.ToDateTime(boSchedule_hdr.play_dte.ToString()), tiPerson_id);

gives me this error:

Error 2 An object reference is required for the non-static field, method, or property 'TGIF.BusinessObject.boSchedule_hdr.play_dte.get' F:\TGIF\Libs\HandicapCalculator.cs 36 57 TGIF

but this line of code works just fine:

boPerson.FillByPrimaryKey(tiPerson_id);

Also, the lines of code that are causing errors now worked just fine in the form where they were originally. I am trying to abstract the form method into a class of its own because I now need this functionality from multiple places.

Any ideas are greatly appreciated.

TIA.

Marcia


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search