<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : LINQ Query not working in silver light project</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : LINQ Query not working in silver light project</description>
  <pubDate>Wed, 15 Apr 2026 06:04:11 -700</pubDate>
  <lastBuildDate>Mon, 13 Jun 2011 18:52:14 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2745</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>LINQ Query not working in silver light project :  Hi Jeena;Try writing your query...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2745&amp;PID=10973#10973</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2745<br /><strong>Posted:</strong> 13-Jun-2011 at 6:52pm<br /><br />Hi Jeena;<div><br></div><div>Try writing your query as follows.</div><div><br></div><div>var query = from managerSpends in _mgr.vwManagerSpends</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">where (managerSpends.ID == App.DBUser.UserID &amp;&amp; managerSpends.HasWrite == true)</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;group managersSpends by managerSpends.Date.Value.Month into g</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;select new {</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; date = g.Key</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; customerExpenses = g.sum(ms =&gt; ms.expenseByCustomer),</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; employeeExpenses = g.Sum(ms =&gt; ms.expenseByEmployee),</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;};</span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;"><br></span></div><div><span ="apple-style-span"="" style="-webkit-border-horiz&#111;ntal-spacing: 1px; -webkit-border-vertical-spacing: 1px;">You can also refer to this page for more LINQ query examples.&nbsp;</span><a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/query-101-examples" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/query-101-examples</a></div><span style="font-size:10px"><br /><br />Edited by DenisK - 15-Jun-2011 at 4:12pm</span>]]>
   </description>
   <pubDate>Mon, 13 Jun 2011 18:52:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2745&amp;PID=10973#10973</guid>
  </item> 
  <item>
   <title>LINQ Query not working in silver light project : Hi i have created a view and my...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2745&amp;PID=10926#10926</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1174" rel="nofollow">Jeena</a><br /><strong>Subject:</strong> 2745<br /><strong>Posted:</strong> 09-Jun-2011 at 11:24pm<br /><br />Hi <br><br>i have created a view and my data is something like this now..<br><br> <table border="0" cellpadding="0" cellspacing="0" width="1029"><col style="width:48pt" span="2" width="64"> <col style="mso-width-source:userset;mso-width-alt:6729;width:138pt" width="184"> <col style="mso-width-source:userset;mso-width-alt:5376;width:110pt" width="147"> <col style="mso-width-source:userset;mso-width-alt:5814;width:119pt" width="159"> <col style="mso-width-source:userset;mso-width-alt:5083;width:104pt" width="139"> <col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:7606;width:156pt" width="208"> <t><tr style="height:15.0pt" height="20">  <td style="height:15.0pt;width:48pt" height="20" width="64">USerID</td>  <td style="width:48pt" width="64">pid</td>  <td style="width:138pt" width="184">date</td>  <td style="width:110pt" width="147">expenseByCustomer</td>  <td style="width:119pt" width="159">expenseByEmployee</td>  <td style="width:104pt" width="139">total exp</td>  <td style="width:48pt" width="64">Has read</td>  <td style="width:156pt" width="208">Has write</td> </tr> <tr style="height:15.0pt" height="20">  <td style="height:15.0pt" align="right" height="20">1<br></td>  <td align="right">3</td>  <td ="xl65" align="right">12/15/2010 0:00</td>  <td align="right">5423311.7</td>  <td align="right">2060206.59</td>  <td align="right">7483518.29</td>  <td align="right">1</td>  <td align="right">1</td> </tr> <tr style="height:15.0pt" height="20">  <td style="height:15.0pt" align="right" height="20">1<br></td>  <td align="right">3</td>  <td ="xl65" align="right">1/15/2011 0:00</td>  <td align="right">6511198.06</td>  <td align="right">3287308.85</td>  <td align="right">9798506.91</td>  <td align="right">1</td>  <td align="right">1</td> </tr> <tr style="height:15.0pt" height="20">  <td style="height:15.0pt" align="right" height="20">1<br></td>  <td align="right">3</td>  <td ="xl65" align="right">2/15/2011 0:00</td>  <td align="right">6776986.05</td>  <td align="right">1464081.51</td>  <td align="right">8241067.56</td>  <td align="right">1</td>  <td align="right">1</td> </tr> <tr style="height:15.0pt" height="20">  <td style="height:15.0pt" align="right" height="20">1<br></td>  <td align="right">3</td>  <td ="xl65" align="right">3/15/2011 0:00</td>  <td align="right">8664801.13</td>  <td align="right">2477348.81</td>  <td align="right">11142149.94</td>  <td align="right">1</td>  <td align="right">1</td> </tr></t></table><br><br>Now i need to take the data as follows <br><br>select SUM(expenseByCustomer),SUM(expenseByEmployee),MONTH(DATE) from VW_NS_SPEND_PENDING_BY_USER where MC_USER_ID=1<br>and HAS_WRITE=1 group by month(DATE)<br><br><br>i was trying to get the data like this<br><br>from i in<br>from managerSpends in _mgr.vwManagerSpends<br>where (managerSpends.ID == App.DBUser.UserID &amp;&amp; managerSpends.HasWrite == true)<br>select new { managerSpends.DATE, managerSpends.expenseByCustomer, managerSpends.expenseByEmployee })<br>group i by new { i.DATE.Value.Month} into g<br>select new <br>&nbsp;{<br>&nbsp;&nbsp;&nbsp; //i expected like i can take the data here using sum function but am not getting it here<br>&nbsp;};<br><br><br>can somebody help me to solve this??<br><br><br><br><br>]]>
   </description>
   <pubDate>Thu, 09 Jun 2011 23:24:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2745&amp;PID=10926#10926</guid>
  </item> 
  <item>
   <title>LINQ Query not working in silver light project : Hi Jeena;Your query looks reasonable....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2745&amp;PID=10920#10920</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2745<br /><strong>Posted:</strong> 09-Jun-2011 at 11:01am<br /><br />Hi Jeena;<div><br></div><div>Your query looks reasonable. Can you see if you can dig in more into the MethodAccessException and post the complete message and stack trace?</div>]]>
   </description>
   <pubDate>Thu, 09 Jun 2011 11:01:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2745&amp;PID=10920#10920</guid>
  </item> 
  <item>
   <title>LINQ Query not working in silver light project : Hi allIs it possible to do this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2745&amp;PID=10903#10903</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1174" rel="nofollow">Jeena</a><br /><strong>Subject:</strong> 2745<br /><strong>Posted:</strong> 07-Jun-2011 at 7:36am<br /><br />Hi all<br><br>Is it possible to do this query using LINQ in ideablade for my silver light project using MVVM pattern<br><br>"select SUM(sp.ITEM_SPEND) as ITEM_SPEND ,SUM(SUPPLIER_SPEND) as SUPPLIER_SPEND,<br>SUM(SPEND_TOTAL) as SPEND_TOTAL,sp.SPEND_DATE from TBL_SPEND_PENDING_BY_TCHS sp <br>INNER JOIN TBL_NS_USER_TCHS cm ON sp.MDW_TCHS_ID = cm.MDW_TCHS_ID<br>where cm.MC_USER_ID = 783 and sp.MDW_TCHS_ID in (3,135) <br>AND sp.spend_date between DateAdd(yy,-1,getdate()) and getDate()<br>group by sp.SPEND_DATE"<br><br><br><br>&nbsp;&nbsp; //Query to create TBL_SPEND_PENDING_BY_TCHS <br>&nbsp;&nbsp; CREATE TABLE &#091;dbo&#093;.&#091;TBL_SPEND_PENDING_BY_TCHS&#093;(<br>&nbsp;&nbsp;&nbsp; &#091;TCHS_SPEND&#093; &#091;int&#093; IDENTITY(1,1) NOT NULL,<br>&nbsp;&nbsp;&nbsp; &#091;MDW_TCHS_ID&#093; &#091;int&#093; NOT NULL,<br>&nbsp;&nbsp;&nbsp; &#091;SPEND_DATE&#093; &#091;smalldatetime&#093; NULL,<br>&nbsp;&nbsp;&nbsp; &#091;ITEM_SPEND&#093; &#091;decimal&#093;(18, 2) NOT NULL,<br>&nbsp;&nbsp;&nbsp; &#091;SUPPLIER_SPEND&#093; &#091;decimal&#093;(18, 2) NOT NULL,<br>&nbsp;&nbsp;&nbsp; &#091;SPEND_TOTAL&#093;&nbsp; AS (&#091;ITEM_SPEND&#093;+&#091;SUPPLIER_SPEND&#093;),<br>&nbsp;&nbsp;&nbsp; &#091;SPEND_TREND&#093; &#091;bit&#093; NULL)<br><br>&nbsp;&nbsp; //Query to create TBL_NS_USER_TCHS<br>CREATE TABLE &#091;dbo&#093;.&#091;TBL_NS_USER_TCHS&#093;(<br>&nbsp;&nbsp;&nbsp; &#091;MC_USER_ID&#093; &#091;int&#093; NOT NULL,<br>&nbsp;&nbsp;&nbsp; &#091;MDW_TCHS_ID&#093; &#091;int&#093; NOT NULL,<br>&nbsp;&nbsp;&nbsp; &#091;HAS_READ&#093; &#091;bit&#093; NOT NULL,<br>&nbsp;&nbsp;&nbsp; &#091;HAS_WRITE&#093; &#091;bit&#093; NOT NULL)<br><br>i have tried the following way<br><br>//SpendPendingByCommodity it maps to  TBL_SPEND_PENDING_BY_TCHS table<br>//UserCommodities maps to TBL_NS_USER_TCHS<br><br>&nbsp; selectedCommoditiesSpendByUser = new ObservableCollection&lt;SpendPendingByCommodity&gt;();<br><br>&nbsp;var selectedCommoditiesByUserQuery = from TBL_NS_USER_TCHS in _mgr.UserCommodities<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; join TBL_SPEND_PENDING_BY_TCHS in _mgr.SpendPendingByCommodities<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on TBL_NS_USER_TCHS.CommodityID equals&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TBL_SPEND_PENDING_BY_TCHS.CommodityID<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where TBL_NS_USER_TCHS.UserID == App.DBUser.UserID &amp;&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; selectedCommoditiesByUser.Contains(TBL_SPEND_PENDING_BY_TCHS.CommodityID) <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; TBL_SPEND_PENDING_BY_TCHS.SpendDate&lt; DateTime.Now.AddYears(-1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;&amp; TBL_SPEND_PENDING_BY_TCHS.SpendDate&gt;DateTime.Now.Date<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; group TBL_SPEND_PENDING_BY_TCHS by TBL_SPEND_PENDING_BY_TCHS.SpendDate into result<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select new<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>i was not getting results.fields name so i changed the query to as follows and tried<br><br>selectedCommoditiesSpendByUser = new ObservableCollection&lt;SpendPendingByCommodity&gt;();<br>var selectedCommoditiesByUserQuery =&nbsp; from TBL_NS_USER_TCHS in _mgr.UserCommodities<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; join TBL_SPEND_PENDING_BY_TCHS in _mgr.SpendPendingByCommodities<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on TBL_NS_USER_TCHS.CommodityID equals <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; TBL_SPEND_PENDING_BY_TCHS.CommodityID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; where TBL_NS_USER_TCHS.UserID == App.DBUser.UserID &amp;&amp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; TBL_SPEND_PENDING_BY_TCHS.CommodityID == 3 &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select TBL_SPEND_PENDING_BY_TCHS;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var qry = selectedCommoditiesByUserQuery.ExecuteAsync();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; qry.Completed += new EventHandler&lt;EntityQueriedEventArgs&lt;SpendPendingByCommodity&gt;&gt;(qry_Completed);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; void qry_Completed(object sender, EntityQueriedEventArgs&lt;SpendPendingByCommodity&gt; e)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (SpendPendingByCommodity item in e.Results)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; selectedCommoditiesSpendByUser.Add(item);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>This is doing while selecting the commodity code by the user on a rad grid's selected item change command..On qry_Completed am&nbsp; getting the error as e.Results' threw an exception of type 'System.MethodAccessException'..<br><br>am i doing anything wrong please help me to solve this issue?<br><br>Thanks <br>Jeena<br><br><br><br><br><br><br><br>]]>
   </description>
   <pubDate>Tue, 07 Jun 2011 07:36:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2745&amp;PID=10903#10903</guid>
  </item> 
 </channel>
</rss>