Click here to Skip to main content
11,720,547 members (74,005 online)
   

ASP.NET

 
QuestionUnknown mobile manufacturer and model Pin
Jassim Rahma6-Apr-13 5:43
memberJassim Rahma6-Apr-13 5:43 
AnswerRe: Unknown mobile manufacturer and model Pin
Jassim Rahma10-Apr-13 5:03
memberJassim Rahma10-Apr-13 5:03 
Questionbypass login Pin
Member 98932915-Apr-13 1:01
memberMember 98932915-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
member@AmitGajjar5-Apr-13 19:00 
AnswerRe: bypass login Pin
jayesh.sharma10-Apr-13 3:26
memberjayesh.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
memberXarzu4-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
member@AmitGajjar5-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
memberjkirkerx6-Apr-13 5:39 
QuestionAccess a control or function from asp page in Global.asax Pin
SajjadZare4-Apr-13 7:01
memberSajjadZare4-Apr-13 7:01 
QuestionRe: Access a control or function from asp page in Global.asax Pin
Sandeep Mewara4-Apr-13 7:09
mvpSandeep Mewara4-Apr-13 7:09 
AnswerMessage Removed Pin
SajjadZare4-Apr-13 7:42
memberSajjadZare4-Apr-13 7:42 
GeneralRe: Access a control or function from asp page in Global.asax Pin
Sandeep Mewara4-Apr-13 7:47
mvpSandeep Mewara4-Apr-13 7:47 
QuestionPlease help me in following Linq Query Pin
indian1433-Apr-13 14:43
memberindian1433-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
memberNarayana Palla4-Apr-13 8:00 
GeneralRe: Please help me in following Linq Query Pin
indian1434-Apr-13 13:12
memberindian1434-Apr-13 13:12 
AnswerRe: Please help me in following Linq Query Pin
Narayana Palla5-Apr-13 10:08
memberNarayana Palla5-Apr-13 10:08 
GeneralRe: Please help me in following Linq Query Pin
Narayana Palla5-Apr-13 10:11
memberNarayana Palla5-Apr-13 10:11 
GeneralRe: Please help me in following Linq Query Pin
indian1436-Apr-13 0:05
memberindian1436-Apr-13 0:05 
QuestionASP.Net website asks user and password continously Pin
idrisgani3-Apr-13 8:47
memberidrisgani3-Apr-13 8:47 
AnswerRe: ASP.Net website asks user and password continously Pin
mark merrens3-Apr-13 9:57
membermark merrens3-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
memberidrisgani3-Apr-13 12:52 
GeneralRe: ASP.Net website asks user and password continously Pin
Jasmine25013-Apr-13 13:27
memberJasmine25013-Apr-13 13:27 
GeneralRe: ASP.Net website asks user and password continously Pin
idrisgani4-Apr-13 0:07
memberidrisgani4-Apr-13 0:07 
GeneralRe: ASP.Net website asks user and password continously Pin
Jasmine25014-Apr-13 6:08
memberJasmine25014-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
memberDuke 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
mark merrens3-Apr-13 8:47
membermark merrens3-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
memberDuke 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
mark merrens3-Apr-13 9:46
membermark merrens3-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
memberJasmine25013-Apr-13 13:18 
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
Jasmine25013-Apr-13 13:17
memberJasmine25013-Apr-13 13:17 
QuestionHow to create MX Excel file from DataTable? Pin
Tesic Goran2-Apr-13 22:58
memberTesic Goran2-Apr-13 22:58 
AnswerRe: How to create MX Excel file from DataTable? Pin
AContractor3-Apr-13 1:50
professionalAContractor3-Apr-13 1:50 
AnswerRe: How to create MX Excel file from DataTable? Pin
Jasmine25013-Apr-13 5:50
memberJasmine25013-Apr-13 5:50 
GeneralRe: How to create MX Excel file from DataTable? Pin
Tesic Goran3-Apr-13 20:23
memberTesic Goran3-Apr-13 20:23 
GeneralRe: How to create MX Excel file from DataTable? Pin
AContractor4-Apr-13 1:59
professionalAContractor4-Apr-13 1:59 
GeneralRe: How to create MX Excel file from DataTable? Pin
Jasmine25014-Apr-13 6:10
memberJasmine25014-Apr-13 6:10 
QuestionWant to display check boxes in report viewer Pin
VishwaKL2-Apr-13 22:35
memberVishwaKL2-Apr-13 22:35 
AnswerRe: Want to display check boxes in report viewer Pin
@AmitGajjar5-Apr-13 19:13
member@AmitGajjar5-Apr-13 19:13 
GeneralRe: Want to display check boxes in report viewer Pin
VishwaKL7-Apr-13 16:08
memberVishwaKL7-Apr-13 16:08 
GeneralRe: Want to display check boxes in report viewer Pin
@AmitGajjar7-Apr-13 16:35
member@AmitGajjar7-Apr-13 16:35 
QuestionReading an HTML file into XmlDocument object Pin
Chinmaya_Champatiray2-Apr-13 19:33
memberChinmaya_Champatiray2-Apr-13 19:33 
AnswerRe: Reading an HTML file into XmlDocument object Pin
Richard Deeming3-Apr-13 3:42
professionalRichard Deeming3-Apr-13 3:42 
QuestionAdding dll in web application which is developing on MVC Framework Pin
Shree.grace1-Apr-13 19:41
groupShree.grace1-Apr-13 19:41 
AnswerRe: Adding dll in web application which is developing on MVC Framework Pin
Jasmine25012-Apr-13 18:41
memberJasmine25012-Apr-13 18:41 
GeneralRe: Adding dll in web application which is developing on MVC Framework Pin
Shree.grace2-Apr-13 19:02
groupShree.grace2-Apr-13 19:02 
GeneralRe: Adding dll in web application which is developing on MVC Framework Pin
Jasmine25013-Apr-13 5:47
memberJasmine25013-Apr-13 5:47 
GeneralRe: Adding dll in web application which is developing on MVC Framework Pin
Shree.grace3-Apr-13 18:23
groupShree.grace3-Apr-13 18:23 
GeneralRe: Adding dll in web application which is developing on MVC Framework Pin
Jasmine25014-Apr-13 6:39
memberJasmine25014-Apr-13 6:39 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.150901.1 | Last Updated 4 Sep 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid