Hello. I know I’m probably going to feel silly when I learn the answer to this one, but sometimes I just have to “set my pride to the side”.
I have a good working Data Directive for OrderHed that will assist with calculating the Request Date and a few other things. One of the requirements is to pull the Non-work Days from ProdCalDay, and I currently have it hard-coded to “MASI”. I would like to enhance this to read the value in Company.CalendarID, but I am getting an error when adding the following code to set my variable:
var companyRow = (from ccRow in Db.Company
where ccRow.Company == Session.CompanyID
select ccRow).FirstOrDefault();
string dfltCal = companyRow.CalendarID;
The error message reads as follows:
CS1061 ‘Company’ does not contain a definition for ‘Company’ and no accessible extension method ‘Company’ accepting a first argument of type ‘Company’ could be found (are you missing a using directive or an assembly reference?)
I try adding an Assembly Reference to Erp.Contracts.BO.Company, but this didn’t seem to help.
Any ideas what I might be overlooking here?