Click here to Skip to main content
15,885,546 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWhat is the Congiguration manager class in the code and how to you set it in the Project or IDE? Pin
Xarzu4-Apr-13 14:57
Xarzu4-Apr-13 14:57 
AnswerRe: What is the Congiguration manager class in the code and how to you set it in the Project or IDE? Pin
AmitGajjar5-Apr-13 19:05
professionalAmitGajjar5-Apr-13 19:05 
AnswerRe: What is the Congiguration manager class in the code and how to you set it in the Project or IDE? Pin
jkirkerx6-Apr-13 5:39
professionaljkirkerx6-Apr-13 5:39 
QuestionAccess a control or function from asp page in Global.asax Pin
SajjadZare4-Apr-13 7:01
SajjadZare4-Apr-13 7:01 
QuestionRe: Access a control or function from asp page in Global.asax Pin
Sandeep Mewara4-Apr-13 7:09
mveSandeep Mewara4-Apr-13 7:09 
AnswerMessage Closed Pin
4-Apr-13 7:42
SajjadZare4-Apr-13 7:42 
GeneralRe: Access a control or function from asp page in Global.asax Pin
Sandeep Mewara4-Apr-13 7:47
mveSandeep Mewara4-Apr-13 7:47 
QuestionPlease help me in following Linq Query Pin
indian1433-Apr-13 14:43
indian1433-Apr-13 14:43 
Hi All,

I have following linq to entities query, it looks good for compilation but giving me the following error when I run the code. And I want to get a very complex object, which is having some list of derived objects from EDM models. The lists in the below class are not directly from EDM models but they are derived classes from EDM to add more complexity to my problem. Here is the error message. Please help me in resolving this query. I have to get all the data that I want in one linq query thats what my lead is asking me for earlier I had one query for each component and I was adding them. But lead wants it in one query. Please help me in any ways link or code snippet or any suggestion please.
LINQ to Entities does not recognize the method 'System.Collections.Generic.List`1[LNI.WSAW.External.StayAtWork.EmployerAddress] ToList[EmployerAddress](System.Collections.Generic.IEnumerable`1[LNI.WSAW.External.StayAtWork.EmployerAddress])' method, and this method cannot be translated into a store expression.


And Here is the code:
Dim _requestrecord = (From r In Context.Requests.Include("Claims").Include("Employers").Include("EmployerContacts")
                     Where r.RequestId = RequestId AndAlso r.ManualClaimFlag = ManualClaim
Join c In Context.Claims On r.ClaimId Equals c.ClaimId Where c.ClaimNo.Equals(ClaimNumber)
Join e In Context.Employers On r.Employer.EmployerId Equals e.EmployerId Where e.EmplAccntNo.Equals(EmployerAccountNumber)
Join ec In Context.EmployerContacts On r.EmployerContactId Equals ec.EmployerContactId Where ec.SawGuid.Equals(EmployerContactGuid)
Select New RequestRecord() With { _
.Addresses = (From at In Context.EmployerAddressTypes
                  Join ea In Context.EmployerAddresses On at.AddressTypeId Equals ea.EmployerAddressType.AddressTypeId Where ea.EmployerId = r.Employer.EmployerId
                  Select New External.StayAtWork.EmployerAddress() With { _
                 .AddressLn1 = ea.AddressLn1,
                 .AddressLn2 = ea.AddressLn2,
                 .AddressLn3 = ea.AddressLn3,
                 .AddressType = at.Description,
                 .BusLocAddressId = ea.BuslocId,
                 .City = ea.City,
                 .Country = ea.Country,
                 .NewSwAddress = ea.NewSwAddressFlag,
                 .State = ea.St,
                 .Zip = ea.Zip,
                 .ZipExt = ea.ZipExt
                 }).ToList(),
.Employer = New EmployerBaisc() With { _
    .EmployerId = e.EmployerId,
    .EmployerName = e.EmplName
        },
.Exspenses = (From td In Context.TransactionDates Where td.RequestId = RequestId
                  Join ex In Context.ExpenseTransactions On ex.TransactionDateId Equals td.TransactionDateId
                  Select New External.StayAtWork.RequestExpense() With { _
                 .ExpenseAmount = ex.ExpenseAmount,
                 .ExpenseDate = ex.TransactionDate.TransactionDt.ToString(),
                 .ExpenseItem = ex.ExpenseItem,
                 .ExpenseReason = ex.ExpenseReason,
                 .ExpenseType = ex.ExpenseSubTypeId
                 }).ToList(),
.Wages = (From td In Context.TransactionDates Where td.RequestId = RequestId
                  Join wt In Context.WageTransactions On wt.TransactionDateId Equals td.TransactionDateId
                  Select New External.StayAtWork.RequestWage() With { _
                 .DailyWage = wt.DailyWagePaidAmount,
                 .WorkDate = wt.TransactionDate.TransactionDt.ToString(),
                 .WorkHours = wt.WorkHours.ToString()
                 }).ToList(),
.Timeloss = (From ctl In Context.ClaimTimelosses
                  Join clms In Context.Claims On ctl.ClaimId Equals clms.ClaimId Where clms.ClaimId = c.ClaimId
                  Select New External.StayAtWork.ClaimTimeLoss() With { _
                 .ClaimNo = ctl.Claim.ClaimNo,
                 .FromDate = ctl.FromDt.ToString(),
                 .ToDate = ctl.ToDt.ToString()
                 }).ToList(),
.Files = (From rfs In Context.RequestFiles
                  Join reqs In Context.Requests On rfs.RequestId Equals reqs.RequestId Where reqs.RequestId = RequestId
                  Select New FileBasic() With { _
                 .FileId = rfs.RequestFileId,
                 .FileName = rfs.FileName,
                 .FromDiv = rfs.FromDiv
                 }).ToList(),
.UiSettings = (From ruis In Context.RequestUis
                  Join reqs In Context.Requests On ruis.RequestId Equals reqs.RequestId Where reqs.RequestId = RequestId
                  Select New External.StayAtWork.RequestUI() With { _
                 .ApfByFax = ruis.ApfByFaxFlag,
                 .ApfByMail = ruis.ApfByMailFlag,
                 .ApfLniHas = ruis.ApfLniHasFlag,
                 .ExpenseByFax = ruis.ExpenseByFaxFlag,
                 .ExpenseByMail = ruis.ExpenseByMailFlag,
                 .ExpenseLniHas = ruis.ExpenseLniHasFlag,
                 .JobByFax = ruis.JobByFaxFlag,
                 .JobByLni = ruis.JobByLniFlag,
                 .JobByMail = ruis.JobByMailFlag,
                 .LastDiv = ruis.LastDiv,
                 .requestId = ruis.RequestId,
                 .WageByFax = ruis.WageByFaxFlag,
                 .WageByMail = ruis.WageByMailFlag,
                 .WageLniHas = ruis.WageLniHasFlag
                 }).FirstOrDefault(),
.Request = New RequestBasic() With { _
    .RequestId = RequestId,
    .Comments = r.Comments,
    .InjuredWorkerName = c.WorkerName,
    .IsFixedSalary = r.FixedSalaryFlag,
    .IsGraveyard = r.GraveyardFlag,
    .IsManualClaim = r.ManualClaimFlag,
    .JobDescriptBeforeInjury = r.JobDescriptBefore,
    .JobDescriptLightDuty = r.JobDescriptLightduty,
    .TrackHoursFlag = r.HoursTrackedFlag
    }
}).FirstOrDefault()

Response.ResultData = _requestrecord


And here is the the class that I have to get:
<DataContract()>
Public Class RequestRecord

    <DataMember()>
    Public Property Request As RequestBasic

    <DataMember()>
    Public Property Employer As EmployerBaisc

    <DataMember()>
    Public Property Addresses As List(Of EmployerAddress)

    <DataMember()>
    Public Property Timeloss As List(Of ClaimTimeLoss)

    <DataMember()>
    Public Property Wages As List(Of RequestWage)

    <DataMember()>
    Public Property Exspenses As List(Of RequestExpense)

    <DataMember()>
    Public Property Files As List(Of FileBasic)

    <DataMember()>
    Public Property PaidDates As List(Of PaidDate)

    <DataMember()>
    Public Property UiSettings As RequestUI

End Class


Thanks in advance.
Thanks & Regards,

Abdul Aleem Mohammad
St Louis MO - USA

AnswerRe: Please help me in following Linq Query Pin
Narayana Palla4-Apr-13 8:00
Narayana Palla4-Apr-13 8:00 
GeneralRe: Please help me in following Linq Query Pin
indian1434-Apr-13 13:12
indian1434-Apr-13 13:12 
AnswerRe: Please help me in following Linq Query Pin
Narayana Palla5-Apr-13 10:08
Narayana Palla5-Apr-13 10:08 
GeneralRe: Please help me in following Linq Query Pin
Narayana Palla5-Apr-13 10:11
Narayana Palla5-Apr-13 10:11 
GeneralRe: Please help me in following Linq Query Pin
indian1436-Apr-13 0:05
indian1436-Apr-13 0:05 
QuestionASP.Net website asks user and password continously Pin
idrisgani3-Apr-13 8:47
idrisgani3-Apr-13 8:47 
AnswerRe: ASP.Net website asks user and password continously Pin
R. Giskard Reventlov3-Apr-13 9:57
R. Giskard Reventlov3-Apr-13 9:57 
AnswerRe: ASP.Net website asks user and password continously Pin
AContractor3-Apr-13 10:11
professionalAContractor3-Apr-13 10:11 
GeneralRe: ASP.Net website asks user and password continously Pin
idrisgani3-Apr-13 12:52
idrisgani3-Apr-13 12:52 
GeneralRe: ASP.Net website asks user and password continously Pin
Jasmine25013-Apr-13 13:27
Jasmine25013-Apr-13 13:27 
GeneralRe: ASP.Net website asks user and password continously Pin
idrisgani4-Apr-13 0:07
idrisgani4-Apr-13 0:07 
GeneralRe: ASP.Net website asks user and password continously Pin
Jasmine25014-Apr-13 6:08
Jasmine25014-Apr-13 6:08 
QuestionIntranet Asp.Net application - are there any security prohibitions built in that would prohibit sending an Excel file with macros to a user's desktop?? Pin
Duke Carey3-Apr-13 8:19
professionalDuke Carey3-Apr-13 8:19 
AnswerRe: Intranet Asp.Net application - are there any security prohibitions built in that would prohibit sending an Excel file with macros to a user's desktop?? Pin
R. Giskard Reventlov3-Apr-13 8:47
R. Giskard Reventlov3-Apr-13 8:47 
GeneralRe: Intranet Asp.Net application - are there any security prohibitions built in that would prohibit sending an Excel file with macros to a user's desktop?? Pin
Duke Carey3-Apr-13 9:24
professionalDuke Carey3-Apr-13 9:24 
GeneralRe: Intranet Asp.Net application - are there any security prohibitions built in that would prohibit sending an Excel file with macros to a user's desktop?? Pin
R. Giskard Reventlov3-Apr-13 9:46
R. Giskard Reventlov3-Apr-13 9:46 
GeneralRe: Intranet Asp.Net application - are there any security prohibitions built in that would prohibit sending an Excel file with macros to a user's desktop?? Pin
Jasmine25013-Apr-13 13:18
Jasmine25013-Apr-13 13:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.