<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8083115688180378812</id><updated>2024-09-25T18:28:44.501-05:00</updated><category term="LINQ"/><category term="MVC"/><category term="Razor"/><category term="API"/><category term="SQL"/><category term=".Net Error Handling"/><category term=".net"/><category term="Active Directory"/><category term="Blazor"/><category term="Excel"/><category term="Export"/><category term="Left Join Linq"/><category term="PDF"/><category term="Razor Formatting"/><category term="exclude"/><category term="exclude list"/><category term="generics"/><category term="ilist"/><category term="jquery"/><title type='text'>CodeFlunkie</title><subtitle type='html'>Simple solutions to common questions on MVC, LINQ, Blazor and C# web development.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>120</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-7187691658038036764</id><published>2022-12-06T09:16:00.006-06:00</published><updated>2022-12-06T09:20:14.705-06:00</updated><title type='text'>Localizer in Controller</title><content type='html'>&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 20px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;b&gt;Localizer in Controller&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 16px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 16px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;b&gt;Using&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;using Microsoft.Extensions.&lt;wbr&gt;&lt;/wbr&gt;Localization;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;b&gt;Includes&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;private readonly IStringLocalizer&amp;lt;&lt;wbr&gt;&lt;/wbr&gt;AppAccessController&amp;gt;&amp;nbsp;&amp;nbsp;_localizer;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 16px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;Resource file must be in a Controller Folder in Resources&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;b&gt;Method example&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;public Dictionary&amp;lt;string,string&amp;gt; GetRoleList(string appName, bool includeX)&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;{&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;	&lt;/span&gt;//Code here&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;	&lt;/span&gt;return allItems.ToDictionary&amp;lt;string, string, string&amp;gt;(i =&amp;gt; i, i =&amp;gt;&amp;nbsp;&lt;b&gt;_localizer[i]&lt;/b&gt;);&lt;/p&gt;&lt;p style=&quot;background-color: white; color: #222222; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 13px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px;&quot;&gt;}&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/7187691658038036764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/7187691658038036764' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/7187691658038036764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/7187691658038036764'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2022/12/localizer-in-controller.html' title='Localizer in Controller'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-1546640808864598204</id><published>2022-08-24T14:15:00.003-05:00</published><updated>2022-08-24T14:15:36.189-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel"/><category scheme="http://www.blogger.com/atom/ns#" term="Export"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery"/><title type='text'>Excel download with Jquery using Table</title><content type='html'>&lt;pre style=&quot;background-color: white; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;I have a tricky dynamic table built from a model that I did not want to fashion in the controller so wanted to just download the table as shown.&lt;br /&gt;This Jquery/Javascript solution allowed me to do just that.&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;Using a button on the page id=&#39;export&#39; and using a table on the page id=&#39;tblExport&#39;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; font-family: &amp;quot;JetBrains Mono&amp;quot;, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;We add an event listener for the button&amp;nbsp;- I have declared everything explicitly but could probably have shortened some references to objects.&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: white; color: #202020; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #248700; font-style: italic;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; color: #202020; font-family: &#39;JetBrains Mono&#39;,monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #248700; font-style: italic;&quot;&gt;//For the Csv Export&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;const &lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;toCsv &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(table) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #248700; font-style: italic;&quot;&gt;// Query all rows&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #248700; font-style: italic;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;data = &lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;tableData = [];&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;rows = &lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6b2fba;&quot;&gt;table tr&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    rows.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;each&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(index, row) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;rowData = [];&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(row).&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;find&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #6b2fba;&quot;&gt;th&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #6b2fba;&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;each&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(index, column) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;            rowData.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(column.&lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;innerText&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;        });&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;        tableData.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;push&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(rowData.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;,&quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;));&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    });&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    data += tableData.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #941290;&quot;&gt;\n&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;data;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;};&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;const &lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;download &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(text, fileName) {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;const &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;link = document.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;createElement&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&#39;a&#39;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    link.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;setAttribute&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&#39;href&#39;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;`data:text/csv;charset=utf-8,&lt;/span&gt;$&lt;span style=&quot;color: #383838;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;encodeURIComponent&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(text)}&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;`&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    link.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;setAttribute&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&#39;download&#39;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;, fileName);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    link.&lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;style&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;display &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&#39;none&#39;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    document.&lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;appendChild&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(link);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    link.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;click&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    document.&lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;removeChild&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(link);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;};&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;const &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;table = document.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;getElementById&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&#39;tblExport&#39;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;const &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;exportBtn = document.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;getElementById&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&#39;export&#39;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;exportBtn.&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;addEventListener&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&#39;click&#39;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;() {&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #248700; font-style: italic;&quot;&gt;// Export to csv&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #248700; font-style: italic;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;const &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;csv = &lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;toCsv&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(table);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;reportName = &lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;#ReportName&quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;val&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;();&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #0f54d6;&quot;&gt;var &lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;repDate = &lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;#RepTitle&quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;text&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;().&lt;/span&gt;&lt;span style=&quot;color: #0093a1;&quot;&gt;replaceAll&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot; &quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;&quot;_&quot;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #248700; font-style: italic;&quot;&gt;// Download it&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #248700; font-style: italic;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #00855f;&quot;&gt;download&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;(csv, &lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;`&lt;/span&gt;$&lt;span style=&quot;color: #383838;&quot;&gt;{reportName}&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;_&lt;/span&gt;$&lt;span style=&quot;color: #383838;&quot;&gt;{repDate}&lt;/span&gt;&lt;span style=&quot;color: #8c6c41;&quot;&gt;.csv`&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #383838;&quot;&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/1546640808864598204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/1546640808864598204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/1546640808864598204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/1546640808864598204'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2022/08/excel-download-with-jquery-using-table.html' title='Excel download with Jquery using Table'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-5900222477901837762</id><published>2022-08-24T14:10:00.000-05:00</published><updated>2022-08-24T14:10:23.296-05:00</updated><title type='text'>Linq Remove from list based on other table</title><content type='html'>One way to do it when you have two lists (repYearlyData and otherdata)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var yd in repYearlyData)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int d=0;d&amp;lt;otherdata.Count;d++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (yd.AssignedRep == otherdata[d].AssignedRep)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; otherdata.RemoveAt(d);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;background-color: #eff0f1; border-radius: 3px; border: 0px; box-sizing: inherit; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px 8px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;border: 0px; box-sizing: inherit; color: #101094; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; peopleList2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Where&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;p &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;peopleList1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Any&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;p2 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; p2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; p&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;));&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;TeamAverages&amp;gt; GetRepMonthlyAverages()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int tday = DateTime.Now.Day;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int mnth = DateTime.Now.Month;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int yr = DateTime.Now.Year;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var otherdata = (from c in db.calldetail_viw&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join w in db.UserWorkgroups on c.LocalUserId equals w.UserId into workGroups&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;from ug in workGroups.Where(w =&amp;gt; !w.WorkGroup.Contains(&quot;Team&quot;)).Where(w =&amp;gt; !w.WorkGroup.Contains(&quot;Email&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(w =&amp;gt; !w.WorkGroup.Contains(&quot;Dummy&quot;)).DefaultIfEmpty()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where c.ConnectedDate.Value.Year == yr&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; c.InteractionType == 5&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;group c by new { c.LocalUserId } into grouped&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select new {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AssignedRep = grouped.Key.LocalUserId,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;YearlyAverageResponse = grouped.Average(x =&amp;gt; x.CallDurationSeconds.Value),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;YearlyEmailCount = grouped.Count(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FullName = &quot;Other&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }).ToList();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var repDailyData = db.calldetail_viw&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.ConnectedDate.Value.Year == yr)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.ConnectedDate.Value.Month == mnth)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.ConnectedDate.Value.Day == tday)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.InteractionType == 5)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Join(db.UserWorkgroups, d =&amp;gt; d.LocalUserId, w =&amp;gt; w.UserId, (d, w) =&amp;gt; new { calldetail_viw = d, UserWorkgroup = w }).Where(o =&amp;gt; o.UserWorkgroup.WorkGroup.Contains(&quot;Team&quot;)).Where(o =&amp;gt; !o.UserWorkgroup.WorkGroup.Contains(&quot;Dummy&quot;)).Where(o =&amp;gt; !o.UserWorkgroup.WorkGroup.Contains(&quot;Email&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Join(db.Individuals, w =&amp;gt; w.UserWorkgroup.UserId, i =&amp;gt; i.ICUserID, (d, i) =&amp;gt; new { calldetail_viw = d, Individual = i }).Where(p =&amp;gt; !p.Individual.JobTitle.Contains(&quot;Supervisor&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.GroupBy(x =&amp;gt; new { x.calldetail_viw.calldetail_viw.LocalUserId, x.Individual.FirstName, x.Individual.LastName, x.calldetail_viw.UserWorkgroup.WorkGroup })&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Select(y =&amp;gt; new&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AssignedRep = y.Key.LocalUserId,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TodaysAverageResponse = y.Average(x =&amp;gt; x.calldetail_viw.calldetail_viw.CallDurationSeconds.Value),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TodaysEmailCount = y.Count(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // FullName = y.Key.FirstName + &quot; &quot; + y.Key.LastName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }).OrderBy(d =&amp;gt; d.AssignedRep).ToList();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //(from z in otherdata where z.AssignedRep !=repDailyData.Any(p=&amp;gt;p.AssignedRep));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// var filteredList = otherdata.Where(a =&amp;gt; repDailyData.All(b =&amp;gt; b.AssignedRep != a.AssignedRep)).Dump();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var repMonthlyData = db.calldetail_viw&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.ConnectedDate.Value.Year == yr)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.ConnectedDate.Value.Month == mnth)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.InteractionType == 5)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Join(db.UserWorkgroups, d =&amp;gt; d.LocalUserId, w =&amp;gt; w.UserId, (d, w) =&amp;gt; new { calldetail_viw = d, UserWorkgroup = w }).Where(o =&amp;gt; o.UserWorkgroup.WorkGroup.Contains(&quot;Team&quot;)).Where(o =&amp;gt; !o.UserWorkgroup.WorkGroup.Contains(&quot;Dummy&quot;)).Where(o =&amp;gt; !o.UserWorkgroup.WorkGroup.Contains(&quot;Email&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Join(db.Individuals, w =&amp;gt; w.UserWorkgroup.UserId, i =&amp;gt; i.ICUserID, (d, i) =&amp;gt; new { calldetail_viw = d, Individual = i }).Where(p =&amp;gt; !p.Individual.JobTitle.Contains(&quot;Supervisor&quot;))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .GroupBy(x =&amp;gt; new { x.calldetail_viw.calldetail_viw.LocalUserId, x.Individual.FirstName, x.Individual.LastName, x.calldetail_viw.UserWorkgroup.WorkGroup })&lt;br /&gt;
&amp;nbsp;.Select(y =&amp;gt; new&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;AssignedRep = y.Key.LocalUserId,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;MonthlyAverageResponse = y.Average(x =&amp;gt; x.calldetail_viw.calldetail_viw.CallDurationSeconds.Value),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;MonthlyEmailCount = y.Count(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;// FullName = y.Key.FirstName + &quot; &quot; + y.Key.LastName&lt;br /&gt;
&amp;nbsp;}).Where(d =&amp;gt; d.MonthlyEmailCount &amp;gt; 0).OrderBy(d =&amp;gt; d.AssignedRep).ToList();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var repYearlyData = db.calldetail_viw&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.ConnectedDate.Value.Year == yr)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Where(d =&amp;gt; d.InteractionType == 5)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Join(db.UserWorkgroups, d =&amp;gt; d.LocalUserId, w =&amp;gt; w.UserId, (d, w) =&amp;gt; new { calldetail_viw = d, UserWorkgroup = w }).Where(o =&amp;gt; o.UserWorkgroup.WorkGroup.Contains(&quot;Team&quot;)).Where(o =&amp;gt; !o.UserWorkgroup.WorkGroup.Contains(&quot;Dummy&quot;)).Where(o =&amp;gt; !o.UserWorkgroup.WorkGroup.Contains(&quot;Email&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Join(db.Individuals, w =&amp;gt; w.UserWorkgroup.UserId, i =&amp;gt; i.ICUserID, (d, i) =&amp;gt; new { calldetail_viw = d, Individual = i }).Where(p =&amp;gt; !p.Individual.JobTitle.Contains(&quot;Supervisor&quot;))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .GroupBy(x =&amp;gt; new { x.calldetail_viw.calldetail_viw.LocalUserId, x.Individual.FirstName, x.Individual.LastName, x.calldetail_viw.UserWorkgroup.WorkGroup })&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Select(y =&amp;gt; new&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AssignedRep = y.Key.LocalUserId,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; YearlyAverageResponse = y.Average(x =&amp;gt; x.calldetail_viw.calldetail_viw.CallDurationSeconds.Value),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; YearlyEmailCount = y.Count(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FullName = y.Key.FirstName + &quot; &quot; + y.Key.LastName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }).OrderBy(d =&amp;gt; d.AssignedRep).ToList();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var yd in repYearlyData)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int d=0;d&amp;lt;otherdata.Count;d++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (yd.AssignedRep == otherdata[d].AssignedRep)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; otherdata.RemoveAt(d);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var finalData = (from co in otherdata&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; group co by new { co.FullName } into othGroup&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; select new&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AssignedRep = &quot;&quot; ,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; YearlyAverageResponse = othGroup.Average(x =&amp;gt; x.YearlyAverageResponse),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;YearlyEmailCount = othGroup.Sum(x=&amp;gt;x.YearlyEmailCount),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FullName = othGroup.Key.FullName&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }).ToList();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var totalYearlyData = repYearlyData.Concat(finalData);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var returnList = new List&amp;lt;TeamAverages&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var row in totalYearlyData)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var t = new TeamAverages();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.FullName = row.FullName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.AssignedRep = row.AssignedRep;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.bestrep = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.YearlyEmailCount = row.YearlyEmailCount;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.YearlyAverageResponse = row.YearlyAverageResponse;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var d in repDailyData.Where(p =&amp;gt; p.AssignedRep == row.AssignedRep))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (row.AssignedRep == d.AssignedRep)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.TodaysEmailCount = d.TodaysEmailCount;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.TodaysAverageResponse = d.TodaysAverageResponse;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var d in repMonthlyData.Where(p =&amp;gt; p.AssignedRep == row.AssignedRep))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (row.AssignedRep == d.AssignedRep)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.MonthlyEmailCount = d.MonthlyEmailCount;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; t.MonthlyAverageResponse = d.MonthlyAverageResponse;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; returnList.Add(t);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return returnList.ToList();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/5900222477901837762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/5900222477901837762' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/5900222477901837762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/5900222477901837762'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/11/linq-remove-from-list-based-on-other.html' title='Linq Remove from list based on other table'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-2540984029705975618</id><published>2022-08-24T14:09:00.000-05:00</published><updated>2022-08-24T14:09:33.557-05:00</updated><title type='text'>Disable Button based on checked items in CheckboxList</title><content type='html'>Windows Forms using the ClientID&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp;$(&quot;#&amp;lt;%=chkMinCedProgramManagers.ClientID %&amp;gt;&quot;).find(&#39;input[type=&quot;checkbox&quot;]&#39;).click(function () {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&quot;#&amp;lt;%=btnSaveSubGroup.ClientID %&amp;gt;&quot;).removeAttr(&quot;disabled&quot;);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;span style=&quot;color: orange;&quot;&gt;//Identify How many checkboxes are checked so that we can toggle the button&amp;nbsp; &amp;nbsp; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp;var prgchecked = $(&#39;#&amp;lt;%=chkMinCedProgramManagers.ClientID%&amp;gt;&#39;).find(&#39;input[type=&quot;checkbox&quot;]:checked&#39;).length;&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;span style=&quot;color: orange; font-size: x-small;&quot;&gt;//Disable button if we have zero checked&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;if (prgchecked===0)&lt;br /&gt;{&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&quot;#&amp;lt;%=btnSaveSubGroup.ClientID %&amp;gt;&quot;).attr(&quot;disabled&quot;, &quot;disabled&quot;);&lt;br /&gt;&amp;nbsp;};&lt;/span&gt;&lt;/h4&gt;
&lt;h4&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;/span&gt;&lt;/h4&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/2540984029705975618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/2540984029705975618' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/2540984029705975618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/2540984029705975618'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2020/02/disable-button-based-on-checked-items.html' title='Disable Button based on checked items in CheckboxList'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-1907650088169227248</id><published>2022-08-24T14:04:00.000-05:00</published><updated>2022-08-24T14:04:10.636-05:00</updated><title type='text'>Sparkline Chart</title><content type='html'>&lt;h2&gt;
VIEW&lt;br /&gt;
&lt;/h2&gt;
&lt;hr /&gt;
&amp;lt;script src=&quot;~/scripts/jquery.sparkline.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&quot;border:2px solid #cccccc;padding:10px;width:50%; box-shadow: 10px 10px 5px #888888;text-align:center;float:left;&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h4 style=&quot;color:#58B609;&quot;&amp;gt;Expirations by Month next 12 months&amp;lt;/h4&amp;gt;&amp;lt;hr /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;sparkline&quot; data-type=&quot;bar&quot; data-width=&quot;97%&quot; data-height=&quot;250px&quot; data-bar-Width=&quot;12&quot; data-bar-Spacing=&quot;10&quot; data-bar-Color=&quot;#58B609&quot; style=&quot;float:left;margin-left:30px;&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; @ViewBag.Expire&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;.sparkline&quot;).each(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $this = $(this);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $this.sparkline(&#39;html&#39;, $this.data());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;b&gt;CONTROLLER&lt;/b&gt;&lt;/h2&gt;
&lt;hr /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; public ActionResult Index(int? id, int? reportType)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;nbsp; ViewBag.Expire&lt;/span&gt; = getExpiringMonths();&lt;br /&gt;
..............................&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public string getExpiringMonths()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;List&amp;lt;int&amp;gt; listofRecords = new List&amp;lt;int&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string mylist = string.Empty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;AgreementExpiration&amp;gt; exp = new List&amp;lt;AgreementExpiration&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exp = prog.getExpiringChart();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach(var a in exp)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listofRecords.Add(a.ExpireCount);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mylist = mylist + a.ExpireCount + &quot;,&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return mylist;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/1907650088169227248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/1907650088169227248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/1907650088169227248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/1907650088169227248'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2016/12/sparkline-chart.html' title='Sparkline Chart'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-3731038667655952967</id><published>2022-08-24T14:02:00.000-05:00</published><updated>2022-08-24T14:02:03.948-05:00</updated><title type='text'>Multiple Filters</title><content type='html'>&lt;p&gt;&amp;nbsp;$(document).ready(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ManageRadioButtons();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; numerizeRows();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(&#39;[data-toggle=&quot;tooltip&quot;]&#39;).tooltip();&lt;/p&gt;&lt;p&gt;});&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;jQuery.expr[&#39;:&#39;].icontains = function (a, i, m) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return jQuery(a).text().toUpperCase()&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .indexOf(m[3].toUpperCase()) &amp;gt;= 0;&lt;/p&gt;&lt;p&gt;};&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;$(&quot;#searchInputResponsibility&quot;).keyup(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (checkMultiple() == true) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filterMultiple();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var data = this.value.split(&quot; &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var currentRow = $(&quot;#fbody&quot;).find(&quot;tr&quot;).not(&#39;.H&#39;).not(&#39;.thead&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (this.value == &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentRow.show();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //hide all the rows&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; currentRow.hide();&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; currentRow.filter(function (i, v) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var $t = $(this).find(&quot;td:eq(0)&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; for (var d = 0; d &amp;lt; data.length; ++d) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($t.is(&quot;:icontains(&#39;&quot; + data[d] + &quot;&#39;)&quot;)) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return false;&lt;/p&gt;&lt;p&gt;})&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; .show();&lt;/p&gt;&lt;p&gt;}).focus(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.value = &quot;&quot;;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).css({&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;color&quot;: &quot;black&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).unbind(&#39;focus&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; });&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;function numerizeRows() {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;var eachRow = $(&quot;#fbody&quot;).find(&quot;tr&quot;).not(&#39;.H&#39;).not(&#39;.thead&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var start = 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; eachRow.each(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).children(&#39;td:eq(1)&#39;).html(start);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start = start + 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; });&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;};&lt;/p&gt;&lt;p&gt;$(&quot;#searchInputTask&quot;).keyup(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (checkMultiple() == true) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filterMultiple();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var data = this.value.split(&quot; &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var currentRow = $(&quot;#fbody&quot;).find(&quot;tr&quot;).not(&#39;.H&#39;).not(&#39;.thead&#39;);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (this.value == &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentRow.show();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //hide all the rows&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; currentRow.hide();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; currentRow.filter(function (i, v) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var $t = $(this).find(&quot;td:eq(2)&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var d = 0; d &amp;lt; data.length; ++d) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($t.is(&quot;:icontains(&#39;&quot; + data[d] + &quot;&#39;)&quot;)) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; })&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //show the rows that match.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .show();&lt;/p&gt;&lt;p&gt;}).focus(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; this.value = &quot;&quot;;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(this).css({&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;color&quot;: &quot;black&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; });&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(this).unbind(&#39;focus&#39;);&lt;/p&gt;&lt;p&gt;});&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;$(&quot;#searchInputNotes&quot;).keyup(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (checkMultiple() == true) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filterMultiple();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// return;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var data = this.value.split(&quot; &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var currentRow = $(&quot;#fbody&quot;).find(&quot;tr&quot;).not(&#39;.H&#39;).not(&#39;.thead&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (this.value == &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; currentRow.show();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //hide all the rows&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; currentRow.hide();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;currentRow.filter(function (i, v) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $t = $(this).find(&quot;td:eq(3)&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var d = 0; d &amp;lt; data.length; ++d) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($t.is(&quot;:icontains(&#39;&quot; + data[d] + &quot;&#39;)&quot;)) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; })&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //show the rows that match.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .show();&lt;/p&gt;&lt;p&gt;}).focus(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; this.value = &quot;&quot;;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(this).css({&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;color&quot;: &quot;black&quot;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; });&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(this).unbind(&#39;focus&#39;);&lt;/p&gt;&lt;p&gt;});&lt;/p&gt;&lt;p&gt;function checkMultiple() {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var dataP = $(&quot;#searchInputResponsibility&quot;).val().split(&quot; &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var dataR = $(&quot;#searchInputTask&quot;).val().split(&quot; &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var dataI = $(&quot;#searchInputNotes&quot;).val();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (dataI != &quot;&quot; &amp;amp;&amp;amp; dataR != &quot;&quot;) return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (dataI != &quot;&quot; &amp;amp;&amp;amp; dataP != &quot;&quot;) return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (dataP != &quot;&quot; &amp;amp;&amp;amp; dataR != &quot;&quot;) return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return false;&lt;/p&gt;&lt;p&gt;};&lt;/p&gt;&lt;p&gt;function filterMultiple () {&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var dataI = $(&quot;#searchInputNotes&quot;).val().split(&quot; &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var dataR = $(&quot;#searchInputTask&quot;).val().split(&quot; &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var dataP = $(&quot;#searchInputResponsibility&quot;).val().split(&quot; &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var allRows = $(&quot;#fbody&quot;).find(&quot;tr&quot;).not(&#39;.H&#39;).not(&#39;.thead&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (dataI == &quot;&quot; &amp;amp;&amp;amp; dataR == &quot;&quot; &amp;amp;&amp;amp; dataP == &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allRows.show();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //hide all the rows&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; allRows.hide();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;allRows.filter(function (i, v) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $v = $(this).find(&quot;td:eq(0)&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $u = $(this).find(&quot;td:eq(1)&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $t = $(this).find(&quot;td:eq(2)&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataI != &quot;&quot; &amp;amp;&amp;amp; dataR != &quot;&quot; &amp;amp;&amp;amp; dataP != &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var p = 0; p &amp;lt; 2; ++p) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($v.is(&quot;:icontains(&#39;&quot; + dataP[p] + &quot;&#39;)&quot;) &amp;amp;&amp;amp; ($u.is(&quot;:icontains(&#39;&quot; + dataR[p] + &quot;&#39;)&quot;)) &amp;amp;&amp;amp; $t.is(&quot;:icontains(&#39;&quot; + dataI[p] + &quot;&#39;)&quot;) ) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataI != &quot;&quot; &amp;amp;&amp;amp; dataR != &quot;&quot; &amp;amp;&amp;amp; dataP == &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var p = 0; p &amp;lt; 2; ++p) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (($u.is(&quot;:icontains(&#39;&quot; + dataR[p] + &quot;&#39;)&quot;)) &amp;amp;&amp;amp; $t.is(&quot;:icontains(&#39;&quot; + dataI[p] + &quot;&#39;)&quot;)) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataI == &quot;&quot; &amp;amp;&amp;amp; dataR != &quot;&quot; &amp;amp;&amp;amp; dataP != &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var p = 0; p &amp;lt; 2; ++p) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (($u.is(&quot;:icontains(&#39;&quot; + dataR[p] + &quot;&#39;)&quot;)) &amp;amp;&amp;amp; $v.is(&quot;:icontains(&#39;&quot; + dataP[p] + &quot;&#39;)&quot;)) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataI != &quot;&quot; &amp;amp;&amp;amp; dataR == &quot;&quot; &amp;amp;&amp;amp; dataP != &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var p = 0; p &amp;lt; 2; ++p) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (($t.is(&quot;:icontains(&#39;&quot; + dataI[p] + &quot;&#39;)&quot;)) &amp;amp;&amp;amp; $v.is(&quot;:icontains(&#39;&quot; + dataP[p] + &quot;&#39;)&quot;)) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dataI != &quot;&quot; &amp;amp;&amp;amp; dataR != &quot;&quot; &amp;amp;&amp;amp; dataP == &quot;&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var p = 0; p &amp;lt; 2; ++p) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (($u.is(&quot;:icontains(&#39;&quot; + dataR[p] + &quot;&#39;)&quot;)) &amp;amp;&amp;amp; $t.is(&quot;:icontains(&#39;&quot; + dataI[p] + &quot;&#39;)&quot;)) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .show();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;};&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;$(&quot;input[type=&#39;radio&#39;]&quot;).change(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ManageRadioButtons();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;});&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;function ManageRadioButtons() {&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(&quot;#searchInputResponsibility&quot;).val(&#39;&#39;);;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(&quot;#searchInputTask&quot;).val(&#39;&#39;);;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(&quot;#searchInputNotes&quot;).val(&#39;&#39;);;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var selection = $(&#39;input[name=env]:checked&#39;).val();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var currentRow = $(&quot;#fbody&quot;).find(&quot;tr&quot;).not(&#39;.H&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; currentRow.hide();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (selection == &quot;QA&quot;) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var QARows = $(&quot;#fbody&quot;).find(&quot;tr.Q&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QARows.show();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; } else {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var PRows = $(&quot;#fbody&quot;).find(&quot;tr.P&quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PRows.show();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;};&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/3731038667655952967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/3731038667655952967' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/3731038667655952967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/3731038667655952967'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2022/08/multiple-filters.html' title='Multiple Filters'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-3635668521862503661</id><published>2022-08-24T14:01:00.000-05:00</published><updated>2022-08-24T14:01:03.835-05:00</updated><title type='text'>Jquery add dynamic numeric column</title><content type='html'>&lt;p&gt;&amp;nbsp;Jquery adding column options&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;function numerizeRows() {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var eachRow = $(&quot;#fbody&quot;).find(&quot;tr&quot;).not(&#39;.H&#39;).not(&#39;.thead&#39;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; var start = 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; $(&quot;.id&quot;).each(function() {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.text(start);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start = start + 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; });&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //eachRow.each(function () {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$(this).children(&#39;td:eq(0)&#39;).html(start);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //&amp;nbsp; &amp;nbsp; var myNumber = &#39;&amp;lt;td&amp;gt;&#39; + start + &#39;&amp;lt;/td&amp;gt;&#39;;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //&amp;nbsp; &amp;nbsp; this.prepend(start);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //&amp;nbsp; &amp;nbsp; start = start + 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //});&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;};&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/3635668521862503661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/3635668521862503661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/3635668521862503661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/3635668521862503661'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2022/08/jquery-add-dynamic-numeric-column.html' title='Jquery add dynamic numeric column'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-6321675075318419284</id><published>2021-10-29T10:19:00.004-05:00</published><updated>2021-10-29T10:19:39.407-05:00</updated><title type='text'>Linq list filtered on list</title><content type='html'>&lt;p&gt;modelItems is a list of Model &lt;br /&gt;&lt;b&gt;intList&amp;nbsp;&lt;/b&gt;is a list of Integers&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I am looking for modelItems where the id is in my Int List&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;var myFilteredList= modelItems.Where(item =&amp;gt; intList.Contains(item.Id))&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;					&lt;/span&gt;&amp;nbsp; .Select(a =&amp;gt; a).ToList();&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/6321675075318419284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/6321675075318419284' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/6321675075318419284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/6321675075318419284'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2021/10/linq-list-filtered-on-list.html' title='Linq list filtered on list'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-4893160430825608100</id><published>2021-09-29T09:33:00.002-05:00</published><updated>2021-09-29T09:33:17.835-05:00</updated><title type='text'>Dynamic Dropdowns NetCore and Json</title><content type='html'>&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: #ffa400; font-size: medium;&quot;&gt;&amp;nbsp;Html for placeholder&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;lt;select id=&quot;AppList&quot;&amp;nbsp; class=&quot;form-control input-sm&quot;&amp;gt;&amp;lt;/select&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #ffa400; font-size: medium;&quot;&gt;&lt;b&gt;Controller returns&amp;nbsp; a Model - Add records to the Model and then return as JsonResult&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;public async Task&amp;lt;JsonResult&amp;gt; GetApplications(int id)&lt;br /&gt;{&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var selectAppList = new List&amp;lt;ModelName&amp;gt;();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var apps =&amp;nbsp; _applicationService.GetApplicationModels();&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;var modelVariable = (await GetModelRecords);&lt;/p&gt;&lt;p&gt;&amp;nbsp;if (modelVariable&amp;nbsp;is object )&lt;br /&gt;{&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;selectAppList.Add(modelVariable);&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;return Json(selectAppList);&lt;/p&gt;&lt;p&gt;&amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #ffa400; font-size: medium;&quot;&gt;Jquery&lt;br /&gt;Add something like this to document.ready&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;$(&quot;#brandId&quot;).change(function () {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;var id = $(&quot;#brandId&quot;).val();&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;BuildAppList(id);&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;});&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #ffa400; font-size: medium;&quot;&gt;Then add the function&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;function BuildAppList(id) {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;$.ajax({&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;type: &#39;GET&#39;,&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;url:&#39;ConfigureKey/GetApplications/&#39; + id,&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;data: { id: id },&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;success: function (result) {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;$(&#39;#AppList&#39;).empty();&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;$.each(result, function (i, item) {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;$(&#39;#AppList&#39;).append(&#39;&amp;lt;option value=&quot;&#39; + item.modelid + &#39;&quot;&amp;gt; &#39; + item.name + &#39; &amp;lt;/option&amp;gt;&#39;);&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;});&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;},&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;error: function (xhr, status, err) {&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;			&lt;/span&gt;// error handling&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;		&lt;/span&gt;}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;});&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/4893160430825608100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/4893160430825608100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/4893160430825608100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/4893160430825608100'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2021/09/dynamic-dropdowns-netcore-and-json.html' title='Dynamic Dropdowns NetCore and Json'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-1153379071823579597</id><published>2021-02-26T08:56:00.000-06:00</published><updated>2021-02-26T08:56:07.199-06:00</updated><title type='text'>Ajax Loop Photos</title><content type='html'>&lt;div&gt;function GetPhotos() {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; var row = &quot;&amp;lt;div class=&#39;w3-container w3-row-padding&#39;&amp;gt;&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; var itemcount = 0;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; $.ajax({&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &#39;/Photos/PhotoList&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: &#39;GET&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contentType: &#39;application/json&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data: &quot;{}&quot;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataType: &quot;json&quot;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; success: function (data) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var count = Object.keys(data).length;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// var row = &quot;&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.each(data, function (item) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (itemcount % 6 != 0) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row += &quot;&amp;lt;div class=&#39;w3-left w3-padding-16&#39;&amp;gt;&amp;lt;div class=&#39;w3-container w3-center&#39; style=&#39;width: 150px;&#39;&amp;gt;&amp;lt;img class=&#39;w3-round-xlarge&#39; alt=&#39;&quot;+ itemcount +&quot;&#39; onclick=&quot; + &quot;if(event.shiftKey){document.getElementById(&#39;dispImage&#39;)&quot; + &quot;.src=&#39;&quot; + data[item].photoSrc + &quot;&#39;;&quot; + &quot;document.getElementById(&#39;id01&#39;)&quot; + &quot;.style.display=&#39;block&#39;;}else{if(event.ctrlKey||event.metaKey){$(this).toggleClass(&#39;csam&#39;);}else{$(this).toggleClass(&#39;rev&#39;);}}&quot; + &quot; id=&#39;&quot; + data[item].photoId + &quot;&#39; src=&quot; + data[item].photoSrc + &quot; data-src=&quot; + data[item].photoSrc + &quot; style=&#39;width: 100px;&#39; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&quot;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (itemcount % 6 == 0) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row += &quot;&amp;lt;/div&amp;gt;&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row += &quot;&amp;lt;div class=&#39;w3-container w3-row-padding&#39;&amp;gt;&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row += &quot;&amp;lt;div class=&#39;w3-left w3-padding-16&#39;&amp;gt;&amp;lt;div class=&#39;w3-container w3-center&#39; style=&#39;width: 150px;&#39;&amp;gt;&amp;lt;img class=&#39;w3-round-xlarge&#39; alt=&#39;&quot; + itemcount + &quot;&#39; onclick=&quot; + &quot;if(event.shiftKey){document.getElementById(&#39;dispImage&#39;)&quot; + &quot;.src=&#39;&quot; + data[item].photoSrc + &quot;&#39;;&quot; + &quot;document.getElementById(&#39;id01&#39;)&quot; + &quot;.style.display=&#39;block&#39;;}else{if(event.ctrlKey||event.metaKey){$(this).toggleClass(&#39;csam&#39;);}else{$(this).toggleClass(&#39;rev&#39;);}}&quot; + &quot; id=&#39;&quot; + data[item].photoId + &quot;&#39; src=&quot; + data[item].photoSrc + &quot; data-src=&quot; + data[item].photoSrc + &quot; style=&#39;width: 100px;&#39; /&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&quot;;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; itemcount++;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row += &quot;&amp;lt;/div&amp;gt;&quot;;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#photos&quot;).html(row + &quot; itemcount=&quot; + itemcount);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error: function (result) {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&quot;Error&quot;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/1153379071823579597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/1153379071823579597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/1153379071823579597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/1153379071823579597'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2021/02/ajax-loop-photos.html' title='Ajax Loop Photos'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-5398424696785249316</id><published>2021-01-27T10:10:00.001-06:00</published><updated>2021-01-27T10:10:33.515-06:00</updated><title type='text'>MVC Changed State with no query string</title><content type='html'>&lt;p&gt;&amp;nbsp;I needed to take action if i was in the edit state of my page.&amp;nbsp; So in the controller I set a ViewBag object then from my jquery I checked the value&lt;/p&gt;&lt;p&gt;I needed to check a NO value in a checkbox if there was no textarea value in the model set&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;var number = parseInt(@&lt;span style=&quot;background-color: #fcff01;&quot;&gt;ViewBag.Edit&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (number == 1) {&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($(&quot;#TextAreaEngagement&quot;).val().length == 0) {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#chkEngagedNo&quot;).prop(&quot;checked&quot;, true);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/5398424696785249316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/5398424696785249316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/5398424696785249316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/5398424696785249316'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2021/01/mvc-changed-state-with-no-query-string.html' title='MVC Changed State with no query string'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-4339443855006911374</id><published>2020-05-19T09:52:00.001-05:00</published><updated>2020-05-19T09:52:51.578-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINQ"/><title type='text'>Linq Query Syntax vs Method Syntax</title><content type='html'>&lt;pre style=&quot;font-family: Consolas, Courier, monospace !important; font-size: 13px; overflow-wrap: normal; overflow: auto; padding: 5px;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;&lt;pre style=&quot;overflow-wrap: normal; overflow: auto; padding: 5px;&quot;&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;font size=&quot;2&quot;&gt;Referenced from MSDN:&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;https://msdn.microsoft.com/en-us/library/bb397947.aspx&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;font size=&quot;2&quot;&gt;Query syntax:&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px; white-space: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;IEnumerable&amp;lt;int&amp;gt; numQuery1 =&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;from num in numbers&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;where num % 2 == 0&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;orderby num&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;select num;&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;font size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;b&gt;&lt;font size=&quot;2&quot;&gt;Method syntax:&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; white-space: normal;&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;span class=&quot;Apple-converted-space&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;IEnumerable&amp;lt;int&amp;gt; numQuery2 = numbers.Where(num =&amp;gt; num % 2 == 0).OrderBy(n =&amp;gt; n)&lt;/font&gt;&lt;/p&gt;&lt;p class=&quot;p2&quot; style=&quot;color: black; font-family: &amp;quot;Helvetica Neue&amp;quot;; font-size: 12px; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal; margin: 0px; min-height: 14px; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/4339443855006911374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/4339443855006911374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/4339443855006911374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/4339443855006911374'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2016/10/linq-query-syntax-vs-method-syntax.html' title='Linq Query Syntax vs Method Syntax'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-6667966368166967506</id><published>2020-05-19T09:40:00.004-05:00</published><updated>2022-08-24T14:05:29.017-05:00</updated><title type='text'>Sticky Footer made simple</title><content type='html'>CSS Footers are simple but people tend to overthink them.&amp;nbsp; Here is how it works&lt;br /&gt;
&lt;br /&gt;
You have two pieces&lt;br /&gt;
&lt;br /&gt;
A container that all your other stuff is in&lt;br /&gt;
A footer that you want to always stay at the bottom of the page&lt;br /&gt;
&lt;br /&gt;
In Blazor I put this container on my content pages and not my host page because I didn&#39;t want my left hand nav to be involved&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&quot;container&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All my content&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;footer&amp;gt;&lt;br /&gt;
Centered footer content&lt;br /&gt;
&amp;lt;/footer&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the CSS&lt;br /&gt;
&lt;br /&gt;
.container {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; width:100%;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; padding: 0 15px;&lt;br /&gt;
}&lt;br /&gt;
footer {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; font-size: 12px; (you could also use a vw value here)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; padding-top:20px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; background-color: #xxx;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; color: #fff;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; margin: auto;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; height: 60px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; width: 100%;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; position: sticky; //absolute;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; bottom: 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; text-align: center;&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/6667966368166967506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/6667966368166967506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/6667966368166967506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/6667966368166967506'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2020/05/sticky-footer-made-simple.html' title='Sticky Footer made simple'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-2828052995851262808</id><published>2020-05-15T17:08:00.001-05:00</published><updated>2020-05-18T09:00:36.138-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blazor"/><title type='text'>Ah Blazor - Now refresh the page!</title><content type='html'>Started my first Blazor project today.&amp;nbsp; New to NetCore as well so it was a fun challenge.&amp;nbsp; I like that is is similar to MVC&amp;nbsp; and I appreciate&amp;nbsp; the ability to add code into my page while building without moving to a controller - it was a real challenge to accommodate some JQuery but I got everything to work.&amp;nbsp; After looking a little closer I realized a large chunk of my JQuery and even javascript could be moved to the @code section and written differently - made for a cleaner, more readable page.&lt;br /&gt;
&lt;br /&gt;
I spent over an hour trying to figure out how to do a simple page refresh!&amp;nbsp; Part of the challenge is that Blazor is a moving target - different libraries and ways of doing simple tasks from version to version - I am confident that most of that will stop as they more clearly define what it is they want to do with this tool.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Refresh a page (NetCore 3.1)&lt;/h4&gt;
First set up an alias for the uriHelper - you will now find it in NavigationManager&lt;br /&gt;
@inject NavigationManager uriHelper&lt;br /&gt;
&lt;br /&gt;
Attach a method to your button:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&amp;nbsp; &amp;lt;button type=&quot;submit&quot; @onclick=&quot;Reload&quot;&amp;gt;Start Over &amp;lt;/button&amp;gt;&lt;/div&gt;
&lt;br /&gt;
In your &lt;span style=&quot;background-color: yellow;&quot;&gt;@code&amp;nbsp;&amp;nbsp;&lt;/span&gt;section add this oh so simple method - you will want to include the true as it initiates a real reload otherwise you will just navigate to the same location with no StateChange.&amp;nbsp; There are most likely many ways to do this - this was the easiest.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; private async void Reload()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; uriHelper.NavigateTo(&quot;/MyPage&quot;, true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/2828052995851262808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/2828052995851262808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/2828052995851262808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/2828052995851262808'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2020/05/ah-blazor-now-refresh-page.html' title='Ah Blazor - Now refresh the page!'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-8239864143458145991</id><published>2020-02-12T07:58:00.005-06:00</published><updated>2020-02-12T07:59:47.976-06:00</updated><title type='text'>From Checkbox to Linq list</title><content type='html'>&lt;h3&gt;
Just the Values of the Selected Items&lt;/h3&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;border-radius: 3px; border: 0px; box-sizing: inherit; color: #393318; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px 8px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;border: 0px; box-sizing: inherit; color: #7d2727; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;string&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; selectedValues &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;chkMyList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Items&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Cast&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ListItem&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Where&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;li &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; li&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Selected&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;li &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; li&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ToList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
Both Text and Value of Selected item into a listItem object&lt;/h3&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-cs prettyprint prettyprinted&quot; style=&quot;border-radius: 3px; border: 0px; box-sizing: inherit; font-family: consolas, menlo, monaco, &amp;quot;lucida console&amp;quot;, &amp;quot;liberation mono&amp;quot;, &amp;quot;dejavu sans mono&amp;quot;, &amp;quot;bitstream vera sans mono&amp;quot;, &amp;quot;courier new&amp;quot;, monospace, sans-serif; font-size: 13px; font-stretch: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px 8px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; box-sizing: inherit; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace, sans-serif; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ListItem&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; selected &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #6fa8dc; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;chkMyList&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;Items&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;Cast&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;ListItem&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&amp;gt;()&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #393318;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Where&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;li &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; li&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Selected&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;border: 0px; box-sizing: inherit; color: #2b91af; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ToList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;border: 0px; box-sizing: inherit; color: #303336; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/8239864143458145991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/8239864143458145991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/8239864143458145991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/8239864143458145991'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2020/02/from-checkbox-to-linq-list.html' title='From Checkbox to Linq list'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-875301108481061402</id><published>2019-11-21T14:13:00.001-06:00</published><updated>2019-11-21T14:13:17.599-06:00</updated><title type='text'>Linq Compare to a list</title><content type='html'>&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Establish your list&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;var idList = new [] {5, 7};&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Compare against the List&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; var jobs = originaljobs.Where(t =&amp;gt; t.StatusId != null).Where(t =&amp;gt; &lt;span style=&quot;background-color: yellow;&quot;&gt;idList&lt;/span&gt;.Contains((int)t.StatusId));&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/875301108481061402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/875301108481061402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/875301108481061402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/875301108481061402'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/11/linq-compare-to-list.html' title='Linq Compare to a list'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-4866970733396332006</id><published>2019-09-23T08:00:00.003-05:00</published><updated>2019-09-23T08:00:45.996-05:00</updated><title type='text'>Conversion Classes</title><content type='html'>&lt;h3&gt;
&lt;br /&gt;&lt;b&gt;Convert from Model to Dataset&lt;/b&gt;&lt;/h3&gt;
&lt;br /&gt;
public static DataSet ToDataSet&lt;t&gt;(this IList&lt;t&gt; list)&lt;br /&gt;
        {&lt;br /&gt;
            Type elementType = typeof(T);&lt;br /&gt;
            DataSet ds = new DataSet();&lt;br /&gt;
            DataTable t = new DataTable();&lt;br /&gt;
            ds.Tables.Add(t);&lt;br /&gt;
&lt;br /&gt;
            //add a column to table for each public property on T&lt;br /&gt;
            foreach (var propInfo in elementType.GetProperties())&lt;br /&gt;
            {&lt;br /&gt;
                Type ColType = Nullable.GetUnderlyingType(propInfo.PropertyType) ?? propInfo.PropertyType;&lt;br /&gt;
&lt;br /&gt;
                t.Columns.Add(propInfo.Name, ColType);&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            //go through each property on T and add each value to the table&lt;br /&gt;
            foreach (T item in list)&lt;br /&gt;
            {&lt;br /&gt;
                DataRow row = t.NewRow();&lt;br /&gt;
&lt;br /&gt;
                foreach (var propInfo in elementType.GetProperties())&lt;br /&gt;
                {&lt;br /&gt;
                    row[propInfo.Name] = propInfo.GetValue(item, null) ?? DBNull.Value;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                t.Rows.Add(row);&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            return ds;&lt;br /&gt;
        }&lt;br /&gt;&lt;/t&gt;&lt;/t&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;t&gt;&lt;t&gt;Convert from Array to Dataset&lt;/t&gt;&lt;/t&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;t&gt;&lt;t&gt;&lt;br /&gt;
        public static DataSet ToDataSetFromArrayOfObject(this object[] arrCollection)&lt;br /&gt;
        {&lt;br /&gt;
            DataSet ds = new DataSet();&lt;br /&gt;
            try&lt;br /&gt;
            {&lt;br /&gt;
                XmlSerializer serializer = new XmlSerializer(arrCollection.GetType);&lt;br /&gt;
                System.IO.StringWriter sw = new System.IO.StringWriter();&lt;br /&gt;
                serializer.Serialize(sw, dsCollection);&lt;br /&gt;
                System.IO.StringReader reader = new System.IO.StringReader(sw.ToString());&lt;br /&gt;
                ds.ReadXml(reader);&lt;br /&gt;
            }&lt;br /&gt;
            catch (Exception ex)&lt;br /&gt;
            {&lt;br /&gt;
                throw (new Exception(&quot;Error While Converting Array of Object to Dataset.&quot;));&lt;br /&gt;
            }&lt;br /&gt;
            return ds;&lt;br /&gt;
        }&lt;/t&gt;&lt;/t&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/4866970733396332006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/4866970733396332006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/4866970733396332006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/4866970733396332006'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/conversion-classes.html' title='Conversion Classes'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-2714170228846646060</id><published>2019-09-20T14:25:00.001-05:00</published><updated>2019-09-20T14:25:17.622-05:00</updated><title type='text'>Jquery ... little things</title><content type='html'>&lt;h3&gt;
Code Snippets&lt;/h3&gt;
&lt;br /&gt;
Remove duplicate IDs on a page - but not the first one&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $(&#39;[id]&#39;).each(function () {&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&#39;[id=&quot;&#39; + this.id + &#39;&quot;]:gt(0)&#39;).remove();&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;&amp;nbsp; });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/2714170228846646060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/2714170228846646060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/2714170228846646060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/2714170228846646060'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/jquery-little-things.html' title='Jquery ... little things'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-501591890967584510</id><published>2019-09-20T14:24:00.001-05:00</published><updated>2019-09-20T14:26:48.957-05:00</updated><title type='text'>Open XML and Word Doc creation</title><content type='html'>&lt;span style=&quot;font-family: inherit;&quot;&gt;https://github.com/OfficeDev/office-content/blob/master/en-us/OpenXMLCon/articles/360318b5-9d17-42a1-b707-c3ccd1a89c97.md&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;font-family: inherit;&quot;&gt;While at Lockheed I created an interface that modified and created contracts on the fly - wish I had kept some code references&amp;nbsp; - but I started here&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;To generate Word documents with Office Automation within .NET, specifically in C# or VB.NET:&lt;/span&gt;&lt;br /&gt;
&lt;ol style=&quot; border: 0px; box-sizing: inherit; color: #242729; font-size: 15px; font-stretch: inherit; line-height: inherit; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;li style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px 0px 0.5em; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: inherit; clear: both; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Add the&amp;nbsp;&lt;strong style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Microsoft.Office.Interop.Word&lt;/strong&gt;&amp;nbsp;assembly reference to your project. The path is&amp;nbsp;&lt;strong style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Word.dll&lt;/strong&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li style=&quot;border: 0px; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; overflow-wrap: break-word; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;border: 0px; box-sizing: inherit; clear: both; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Follow the Microsoft code example you can find here:&amp;nbsp;&lt;a href=&quot;http://support.microsoft.com/kb/316384/en-us&quot; rel=&quot;noreferrer&quot; style=&quot;border: 0px; box-sizing: inherit; color: #005999; cursor: pointer; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;http://support.microsoft.com/kb/316384/en-us&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/501591890967584510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/501591890967584510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/501591890967584510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/501591890967584510'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/open-xml-and-word-doc-creation.html' title='Open XML and Word Doc creation'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-5856933324662411886</id><published>2019-09-20T14:22:00.000-05:00</published><updated>2019-09-20T14:22:44.300-05:00</updated><title type='text'>API Examples Returning various ...</title><content type='html'>&lt;h2&gt;
API Examples&lt;/h2&gt;
&lt;br /&gt;
&amp;nbsp;public IQueryable&amp;lt;Customer&amp;gt; GetCustomers()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return db.Customers;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; [ResponseType(typeof(Customer))]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public IHttpActionResult GetCustomer(string email)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Customer customer = db.Customers.Where(c=&amp;gt;c.Email== email).FirstOrDefault();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (customer == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return NotFound();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return Ok(customer);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; // PUT: api/Customers/5&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [ResponseType(typeof(void))]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public IHttpActionResult PutCustomer(int id, Customer customer)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!ModelState.IsValid)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return BadRequest(ModelState);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (id != customer.Id)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return BadRequest();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db.Entry(customer).State = EntityState.Modified;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db.SaveChanges();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (DbUpdateConcurrencyException)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!CustomerExists(id))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return NotFound();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throw;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return StatusCode(HttpStatusCode.NoContent);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected override void Dispose(bool disposing)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (disposing)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db.Dispose();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; base.Dispose(disposing);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
----&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private bool CustomerExists(int id)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return db.Customers.Count(e =&amp;gt; e.Id == id) &amp;gt; 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
---&lt;br /&gt;
&amp;nbsp; private readonly MemoryStream _Stream = new MemoryStream();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public JsonContent(object value)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Headers.ContentType = new MediaTypeHeaderValue(&quot;application/json&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var jw = new JsonTextWriter(new StreamWriter(_Stream));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; jw.Formatting = Formatting.Indented;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var serializer = new JsonSerializer();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serializer.Serialize(jw, value);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; jw.Flush();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _Stream.Position = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; protected override Task SerializeToStreamAsync(Stream stream, TransportContext context)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return _Stream.CopyToAsync(stream);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected override bool TryComputeLength(out long length)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; length = _Stream.Length;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public IHttpActionResult PostTaskStart(OrderManfTask orderManfTask)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;OrderManfTask&amp;gt; items = new List&amp;lt;OrderManfTask&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; items = (from a in db.OrderManfTasks where a.OrderId == orderManfTask.OrderId &amp;amp;&amp;amp; a.TaskId == orderManfTask.TaskId select a).ToList();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var i in items)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.EmployeeName = orderManfTask.EmployeeName;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.TaskId = orderManfTask.TaskId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i.TaskEnd = orderManfTask.TaskEnd;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db.SaveChanges();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string tasktext = string.Empty;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (orderManfTask.TaskId)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 1:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tasktext = &quot;Cut&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 2:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tasktext = &quot;Sewn&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case 3:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tasktext = &quot;Filled&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Add Note&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OrderNote orderNote = new OrderNote();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderNote.DownloadId = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderNote.OrderId = orderManfTask.OrderId;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;orderNote.CreatedOnUtc = DateTime.Now;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; orderNote.Note = &quot;Production &quot; + tasktext + &quot; Task Completed by: &quot; + orderManfTask.EmployeeName + &quot; on &quot; + DateTime.Now;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db.OrderNotes.Add(orderNote);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; db.SaveChanges();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return Ok(new { success = true });&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int PostTaskStart(OrderManfTask orderManfTask)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int items = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int taskstarted = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int taskEnded = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; items = (from a in db.OrderManfTasks where a.OrderId == orderManfTask.OrderId &amp;amp;&amp;amp; a.TaskId == orderManfTask.TaskId select a.id).Count();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; taskstarted = (from a in db.OrderManfTasks where a.OrderId == orderManfTask.OrderId &amp;amp;&amp;amp; a.TaskId == orderManfTask.TaskId &amp;amp;&amp;amp; a.TaskStart != null select a.id).Count();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; taskEnded = (from a in db.OrderManfTasks where a.OrderId == orderManfTask.OrderId &amp;amp;&amp;amp; a.TaskId == orderManfTask.TaskId &amp;amp;&amp;amp; a.TaskEnd != null select a.id).Count();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Task has an End Date&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (taskEnded &amp;gt; 0) { return 4; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Task has started&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (taskstarted &amp;gt; 0) { return 2; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //task is not started but is valid&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (items &amp;gt; 0) { return 1; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //task is invalid for this order&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Called in Javascript&lt;br /&gt;
&amp;nbsp; summaryByTech.DataSource = app.DataSource(&quot;SummaryByTech&quot;, summaryByTech.Model, urlFilter, salesPerformanceTech.objGroup, salesPerformanceTech.objAggregate);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dsSummaryByTech = summaryByTech.DataSource;&lt;br /&gt;
&lt;br /&gt;
Within WEBSERVICES PROJECT&lt;br /&gt;
&amp;nbsp; &amp;nbsp; [Authorize(Roles = &quot;Franchisee,HomeOffice&quot;)]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public class SummaryByTechController : ApiController&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 1. Group By Tech over a date range&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 2. Group By Tech by Week for single column&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [HttpGet]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;Model_BigBoard.DTO.DTOSummaryByTech&amp;gt; FetchSummaryByTech(string bNumber, DateTime startDate, DateTime endDate)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BusinessLogic.BLSummaryByTech bl = new BusinessLogic.BLSummaryByTech();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string bNumberConvert = Dwyer.BIMS.BigBoard.Base.Util.Tools.BusinessSupport.HexToASCIICharString(bNumber);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return bl.LoadSummaryByTech(bNumberConvert, startDate, endDate);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
https://nordicapis.com/3-common-methods-api-authentication-explained/&lt;br /&gt;
&lt;br /&gt;
CALLING THE API&lt;br /&gt;
&lt;br /&gt;
From Javascript&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $(&quot;#Create&quot;).click(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var source = {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;OrderId&#39;: $(&quot;#OrderId&quot;).val(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;TrackingNumber&#39;: $(&#39;#TrackingNumber&#39;).val(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;TotalWeight&#39;: $(&#39;#TotalWeight&#39;).val(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;ShippedDateUtc&#39;: $(&#39;#ShippedDateUtc&#39;).val(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;AdminComment&#39;: $(&#39;#AdminComment&#39;).val(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;CreatedOnUtc&#39;: new Date().toISOString(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.ajax({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: &quot;POST&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data: source,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &quot;/api/Shipments&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.done(function (data, status, jqXHR) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (data.Success)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&quot;#OrderId&quot;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&#39;#TrackingNumber&#39;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&#39;#TotalWeight&#39;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;#ShippedDateUtc&#39;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;#AdminComment&#39;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alert(data.Message) //display exception&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//alert(&quot;Success&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;})&lt;br /&gt;
&amp;nbsp; &amp;nbsp; .fail(function (jqXHR, textStatus, err) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //alert(&quot;Failed&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; })&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; event.preventDefault();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; function getcustomer() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#stateID&quot;).empty();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#stateID&quot;).append(&quot;&amp;lt;option value=&#39;0&#39;&amp;gt;--Select State--&amp;lt;/option&amp;gt;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var email = $(&#39;#Email&#39;).val();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var Url=&quot;@Url.Content(&quot;~/api/customers/getcustomer&quot;)&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.ajax({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url:Url,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataType: &#39;json&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data: { email: countryID },&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; success: function (data) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.each(data, function (index, optiondata) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#FirstName&quot;).val(optiondata.firstName);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;lt;script&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;#ppTable&#39;).on(&#39;click&#39;, &#39;.btnSelect&#39;, function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// var tds = $(this).addClass(&#39;row-highlight&#39;).find(&#39;td&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var currentRow = $(this).closest(&quot;tr&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var OrderId = currentRow.find(&quot;td:eq(0)&quot;).text(); // get current row 1st TD value&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var OrderItemId = currentRow.find(&quot;td:eq(1)&quot;).text();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var tracking = currentRow.find(&quot;.tracking&quot;).val(); // get current row 2nd TD&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var weight = currentRow.find(&quot;.totalweight&quot;).val(); // get current row 3rd TD&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var shipdate = currentRow.find(&quot;.shipdate&quot;).val(); // get current row 4rd TD&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// var data = OrderId + &quot;-&quot; + tracking + &quot;-&quot; + weight + &quot;-&quot; + shipdate;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//alert(data);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var source = {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;OrderId&#39;:OrderId,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;TrackingNumber&#39;: tracking,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;TotalWeight&#39;: weight,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;ShippedDateUtc&#39;: shipdate,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;AdminComment&#39;: OrderItemId,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;CreatedOnUtc&#39;: new Date().toISOString(),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.ajax({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: &quot;POST&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data: source,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &quot;/api/PPShipments&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.done(function (data, status, jqXHR) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (data.Success)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // $(&quot;#OrderId&quot;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // $(&#39;#TrackingNumber&#39;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // $(&#39;#TotalWeight&#39;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //$(&#39;#ShippedDateUtc&#39;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //&amp;nbsp; $(&#39;#AdminComment&#39;).val(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;currentRow.remove();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alert(data.Message) //display exception&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//alert(&quot;Success&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;})&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .fail(function (jqXHR, textStatus, err) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //alert(&quot;Failed&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; })&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; event.preventDefault();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/5856933324662411886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/5856933324662411886' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/5856933324662411886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/5856933324662411886'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/api-examples-returning-various.html' title='API Examples Returning various ...'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-1903468734441670457</id><published>2019-09-20T14:21:00.000-05:00</published><updated>2019-09-20T14:21:47.579-05:00</updated><title type='text'>Security</title><content type='html'>using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Security.Cryptography;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Web;&lt;br /&gt;
&lt;br /&gt;
namespace LM_API&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public static class SiteMethods&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static string ComputeHash(string plainText,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string hashAlgorithm,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] saltBytes)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { &amp;nbsp;// If salt is not specified, generate it on the fly.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (saltBytes == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Define min and max salt sizes.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int minSaltSize = 4;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int maxSaltSize = 8;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Generate a random number for the size of the salt.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Random random = new Random();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int saltSize = random.Next(minSaltSize, maxSaltSize);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Hardcoded the salt size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;int saltSize = 3;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Allocate a byte array, which will hold the salt.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saltBytes = new byte[saltSize];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Initialize a random number generator.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Fill the salt with cryptographically strong byte values.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rng.GetNonZeroBytes(saltBytes);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Convert plain text into a byte array.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Allocate array, which will hold plain text and salt.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] plainTextWithSaltBytes =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new byte[plainTextBytes.Length + saltBytes.Length];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Copy plain text bytes into resulting array.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; plainTextBytes.Length; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; plainTextWithSaltBytes[i] = plainTextBytes[i];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Append salt bytes to the resulting array.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; saltBytes.Length; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; plainTextWithSaltBytes[plainTextBytes.Length + i] = saltBytes[i];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Because we support multiple hashing algorithms, we must define&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // hash object as a common (abstract) base class. We will specify the&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // actual hashing algorithm class later during object creation.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HashAlgorithm hash;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Make sure hashing algorithm name is specified.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (hashAlgorithm == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashAlgorithm = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Initialize appropriate hashing algorithm class.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (hashAlgorithm.ToUpper())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SHA1&quot;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hash = new SHA1Managed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SHA256&quot;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hash = new SHA256Managed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SHA384&quot;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hash = new SHA384Managed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SHA512&quot;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hash = new SHA512Managed();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hash = new MD5CryptoServiceProvider();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Compute hash value of our plain text with appended salt.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] hashBytes = hash.ComputeHash(plainTextWithSaltBytes);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create array which will hold hash and original salt bytes.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] hashWithSaltBytes = new byte[hashBytes.Length +&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saltBytes.Length];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Copy hash bytes into resulting array.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; hashBytes.Length; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashWithSaltBytes[i] = hashBytes[i];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Append salt bytes to the result.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; saltBytes.Length; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashWithSaltBytes[hashBytes.Length + i] = saltBytes[i];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Convert result into a base64-encoded string.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string hashValue = Convert.ToBase64String(hashWithSaltBytes);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Return the result.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return hashValue;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static bool VerifyHash(string plainText,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string hashAlgorithm,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string hashValue)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Convert base64-encoded hash value into a byte array.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] hashWithSaltBytes = Convert.FromBase64String(hashValue);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // We must know size of hash (without salt).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int hashSizeInBits, hashSizeInBytes;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Make sure that hashing algorithm name is specified.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (hashAlgorithm == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashAlgorithm = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Size of hash is based on the specified algorithm.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; switch (hashAlgorithm.ToUpper())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SHA1&quot;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashSizeInBits = 160;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SHA256&quot;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashSizeInBits = 256;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SHA384&quot;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashSizeInBits = 384;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case &quot;SHA512&quot;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashSizeInBits = 512;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default: // Must be MD5&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashSizeInBits = 128;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Convert size of hash from bits to bytes.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashSizeInBytes = hashSizeInBits / 8;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Make sure that the specified hash value is long enough.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (hashWithSaltBytes.Length &amp;lt; hashSizeInBytes)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Allocate array to hold original salt bytes retrieved from hash.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] saltBytes = new byte[hashWithSaltBytes.Length -&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hashSizeInBytes];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Copy salt from the end of the hash to the new array.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; saltBytes.Length; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; saltBytes[i] = hashWithSaltBytes[hashSizeInBytes + i];&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Compute a new hash string.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string expectedHashString =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ComputeHash(plainText, hashAlgorithm, saltBytes);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // If the computed hash matches the specified hash,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // the plain text value must be correct.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return (hashValue == expectedHashString);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static string Base64Encode(string plainText)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return System.Convert.ToBase64String(plainTextBytes);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static string Base64Decode(string base64EncodedData)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/1903468734441670457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/1903468734441670457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/1903468734441670457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/1903468734441670457'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/security.html' title='Security'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-5703818606921627819</id><published>2019-09-20T14:20:00.001-05:00</published><updated>2019-09-20T14:20:29.272-05:00</updated><title type='text'>Return View of a model or an HttpStatusCode</title><content type='html'>&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public ActionResult Details(int? id)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (id == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return new HttpStatusCodeResult(HttpStatusCode.BadRequest);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OrderNote orderNote = mymethodtoretriverecord(id);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (orderNote == null)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return HttpNotFound();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return View(orderNote);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; </content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/5703818606921627819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/5703818606921627819' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/5703818606921627819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/5703818606921627819'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/return-view-of-model-or-httpstatuscode.html' title='Return View of a model or an HttpStatusCode'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-7573685313004864875</id><published>2019-09-20T14:20:00.000-05:00</published><updated>2019-09-20T14:20:10.722-05:00</updated><title type='text'>Pseudo Class when you need a generic object</title><content type='html'>&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public class PseudoProduct : calldetail_viw&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;};&lt;br /&gt;
&lt;br /&gt;
public List&amp;lt;calldetail_viw&amp;gt; GetTeamMonthlySummary()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int currentmonth = DateTime.Today.Month;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int lastmonth = DateTime.Today.AddMonths(-3).Month;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var calldata = (from c in db.calldetail_viw&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;where c.ConnectedDate.Value.Month &amp;gt;= lastmonth&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; c.ConnectedDate.Value.Month &amp;lt;= currentmonth&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; c.LocalName == &quot;myaccountrep&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;amp;&amp;amp; c.CallDirection==&quot;Inbound&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;group c by new {c.AssignedWorkGroup, month = c.ConnectedDate.Value.Month}&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;into g&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;select new PseudoProduct&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AssignedWorkGroup = g.Key.AssignedWorkGroup,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CustomNum1 = g.Key.month,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CustomNum2 = g.Count()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var cl = new List&amp;lt;calldetail_viw&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;foreach (var item in calldata)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cl.Add(new calldetail_viw {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AssignedWorkGroup = item.AssignedWorkGroup,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CustomNum1 = item.CustomNum1,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CustomNum2 = item.CustomNum2,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return cl;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/7573685313004864875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/7573685313004864875' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/7573685313004864875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/7573685313004864875'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/pseudo-class-when-you-need-generic.html' title='Pseudo Class when you need a generic object'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-8245315138428954977</id><published>2019-09-20T14:16:00.002-05:00</published><updated>2019-09-20T14:16:41.272-05:00</updated><title type='text'>HTML Helper Methods</title><content type='html'>public static class CoverageAuthorization&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static MvcHtmlString ShowHideLink( this HtmlHelper helper,string linkSupplied, string username)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var approvalHierarchy = ConfigurationManager.AppSettings[&quot;ApprovalHierarchy&quot;];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; approvalHierarchy = approvalHierarchy.Substring(approvalHierarchy.IndexOf(&quot;Supervisor&quot;));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var claimManager = new ClaimManager();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var currentUser = claimManager.GetClaimUserByLogin(username);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (approvalHierarchy.IndexOf(currentUser.Role.ToString()) &amp;gt;= 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return MvcHtmlString.Create(&quot;&amp;lt;br /&amp;gt;&quot; + linkSupplied);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return MvcHtmlString.Empty; ;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
To use it&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;@Html.ShowHideLink(&quot;&amp;lt;a href=&#39;/CaseLoadTransition/Index&#39;&amp;gt;Case Load Transition&amp;lt;/a&amp;gt; &quot;, HttpContext.Current.User.Identity.Name.ToString())&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/8245315138428954977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/8245315138428954977' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/8245315138428954977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/8245315138428954977'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/html-helper-methods.html' title='HTML Helper Methods'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8083115688180378812.post-2114514512594824043</id><published>2019-09-20T14:16:00.001-05:00</published><updated>2019-09-20T14:16:15.734-05:00</updated><title type='text'>Export Grid to Excel with JQuery</title><content type='html'>&lt;h3&gt;
Using Table2Excel&lt;/h3&gt;
&lt;br /&gt;
Grab the Javascript Table2Excel and make sure you have a reference to a recent Jquery library&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://rawgit.com/unconditional/jquery-table2excel/master/src/jquery.table2excel.js&quot;&gt;https://rawgit.com/unconditional/jquery-table2excel/master/src/jquery.table2excel.js&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Create a button click or other event&lt;br /&gt;
&lt;br /&gt;
$(&quot;#myButton&quot;).click(function(){&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;$(&quot;#myGridorTable&quot;).table2excel({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exclude: &quot;.noExl&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: &quot;MyExcel.xls&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There you go - button click - excel returned as a file to the browser.</content><link rel='replies' type='application/atom+xml' href='http://codeflunkie.blogspot.com/feeds/2114514512594824043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8083115688180378812/2114514512594824043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/2114514512594824043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8083115688180378812/posts/default/2114514512594824043'/><link rel='alternate' type='text/html' href='http://codeflunkie.blogspot.com/2019/09/export-grid-to-excel-with-jquery.html' title='Export Grid to Excel with JQuery'/><author><name>CodeFlunkie</name><uri>http://www.blogger.com/profile/04090184745362426140</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2TIm5srERXnwpsadSdD-QqPaE30a-rP2bXoDySe4iq9912BHrKzF4YzX-BbadOxjiue-1zlFTF-gz-tCn8tF2NEi761apTPurjHutiGBXgeE5lYvD-xshMbpcyd_A4g/s220/Screen+Shot+2020-05-12+at+11.20.18+AM.png'/></author><thr:total>0</thr:total></entry></feed>