Click here to Skip to main content
15,900,724 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionMVC 4 Maintain state of the check box,Drop down list Pin
VishwaKL8-Apr-13 0:34
VishwaKL8-Apr-13 0:34 
Question__EVENTTARGET is undefined Pin
GGev7-Apr-13 23:32
GGev7-Apr-13 23:32 
AnswerRe: __EVENTTARGET is undefined Pin
Karthik Harve8-Apr-13 2:01
professionalKarthik Harve8-Apr-13 2:01 
QuestionHow solve (Validation of viewstate MAC failed)? Pin
Jassim Rahma7-Apr-13 0:38
Jassim Rahma7-Apr-13 0:38 
AnswerRe: How solve (Validation of viewstate MAC failed)? Pin
AContractor7-Apr-13 1:48
professionalAContractor7-Apr-13 1:48 
AnswerRe: How solve (Validation of viewstate MAC failed)? Pin
Vani Kulkarni7-Apr-13 20:17
professionalVani Kulkarni7-Apr-13 20:17 
QuestionPlacing & arranging controls on web form Pin
Member 99120916-Apr-13 6:47
Member 99120916-Apr-13 6:47 
AnswerRe: Placing & arranging controls on web form Pin
David C# Hobbyist.6-Apr-13 7:18
professionalDavid C# Hobbyist.6-Apr-13 7:18 
AnswerRe: Placing & arranging controls on web form Pin
jkirkerx7-Apr-13 10:10
professionaljkirkerx7-Apr-13 10:10 
Questionhow to upgrade from iis6 to iis7.5 Pin
Member 87018136-Apr-13 6:35
Member 87018136-Apr-13 6:35 
AnswerRe: how to upgrade from iis6 to iis7.5 Pin
dusty_dex6-Apr-13 7:58
dusty_dex6-Apr-13 7:58 
QuestionUnknown mobile manufacturer and model Pin
Jassim Rahma6-Apr-13 5:43
Jassim Rahma6-Apr-13 5:43 
AnswerRe: Unknown mobile manufacturer and model Pin
Jassim Rahma10-Apr-13 5:03
Jassim Rahma10-Apr-13 5:03 
Questionbypass login Pin
Suman Maji5-Apr-13 1:01
professionalSuman Maji5-Apr-13 1:01 
AnswerRe: bypass login Pin
AContractor5-Apr-13 2:02
professionalAContractor5-Apr-13 2:02 
GeneralRe: bypass login Pin
AmitGajjar5-Apr-13 19:00
professionalAmitGajjar5-Apr-13 19:00 
AnswerRe: bypass login Pin
jayesh.sharma10-Apr-13 3:26
jayesh.sharma10-Apr-13 3:26 
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

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.