<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://code.msdn.microsoft.com/rss.xsl"?><rss version="2.0"><channel><title>csharpsamples Forum Rss Feed</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/List.aspx</link><description>csharpsamples Forum Rss Description</description><item><title>NEW POST: addin for word 2003</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=2003</link><description>&lt;div class="wikidoc"&gt;
hello all,&lt;br /&gt; &lt;br /&gt;this is my very first time here and I am not sure if I am correct here or not, as this place seems to be soooo huge...that I am getting lost already. in case I am wrong, please move my question/discussion to the proper area. Thank you in advance.&lt;br /&gt; &lt;br /&gt;I basically looking for help to create an addin for word 2003. The function of that addin is basically to save word documents (basically all other office documents) with a certain format, respecitively naming convention. I do not want the users to have the freedom to type in anything in any order, but they should stick to a certain format for naming the documents.&lt;br /&gt;what I would like to have is an addin, which you click on, a window will popup which is actually divided into several horizontal field with dropdown lists. and to the very right of the popup window, you can just click save and it will save the document with the name u have choosen and type from the dropdown list.&lt;br /&gt; &lt;br /&gt;-------------------------------------------------------------------------------------------------------------------&lt;br /&gt;l   Business Unit   l      Document Type    l       FREE TITEL        l        VERSION     l    DATE (automatically retrieve from today)  l            SAVE&lt;br /&gt;-------------------------------------------------------------------------------------------------------------------&lt;br /&gt; &lt;br /&gt;the popup window should look like that only, where the following fields are:&lt;br /&gt;Business Unit: is a dropdown menue, where the user can choose the busines uni, e.g. IT, Finance, Marketing etc etc..&lt;br /&gt;Document Type: is a dropdown menue, containing predefine types of documents, e.g.: Agende, Minutes, Report etc. etc.&lt;br /&gt;FREE TITEL: is a free field, where the user can actually type in something&lt;br /&gt;Version: might be a drop down, or a free field for typing&lt;br /&gt;Date: will automatically take the date as of today&lt;br /&gt; &lt;br /&gt;SAVE, this is only the SAVE BUTTON: after clicking on it, the word document will be saved with the name u have chosen in the popup window. so it could look like that at the end:&lt;br /&gt; &lt;br /&gt;IT&lt;i&gt;AGENDA&lt;/i&gt;DISCUSSION ON LIFE ON MARS&lt;i&gt;V0.1&lt;/i&gt;20090709.doc&lt;br /&gt; &lt;br /&gt;I think that is something similar to save.as functionality, but only customized.&lt;br /&gt; &lt;br /&gt;I hope you guys can help me out with coding.&lt;br /&gt;thank you in advance,&lt;br /&gt; &lt;br /&gt;regards,&lt;br /&gt; &lt;br /&gt;emolicious&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>emolicious</author><pubDate>Thu, 09 Jul 2009 12:58:08 GMT</pubDate><guid isPermaLink="false">NEW POST: addin for word 2003 20090709P</guid></item><item><title>NEW POST: VS 2008 C# Samples</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=12</link><description>&lt;div class="wikidoc"&gt;
I really could get use of the DynamicQuery library...if I could get it to work the way I want :-)&lt;br /&gt; &lt;br /&gt;I need to construct a dynamic query runtime based on columns and values that users select runtime.&lt;br /&gt;I have a DataTable with lots of columns and would like to use linq to query the table instead of using DataView and RowFilter (which is what I'm using now).&lt;br /&gt;However, I can't get it to work the way I want. It seems like it can't find any of the columns in the the table when I try to use the Where clause with the query.&lt;br /&gt; &lt;br /&gt;Here's the way I use it: &lt;br /&gt; &lt;br /&gt;DataTable dt&lt;br /&gt;...&lt;br /&gt;var query = dt.AsEnumerable().AsQueryable();&lt;br /&gt;query = query.Where(&amp;quot;Index &amp;gt;= 0 and Index &amp;lt;= 99&amp;quot;);&lt;br /&gt; &lt;br /&gt;This throws the following exception: &amp;quot;No property or field 'Index' exists in type 'DataRow'&amp;quot;.&lt;br /&gt; &lt;br /&gt;I have tried to query with other columns as well but get the same exception.&lt;br /&gt;I debugged the DynamicQuery and it seems like it tries to find the members of the DataRow class and not the actual columns in the data row.&lt;br /&gt; &lt;br /&gt;So I thought that maybe using the Item property of the DataRow could work, and I tried this:&lt;br /&gt; &lt;br /&gt;DataTable dt&lt;br /&gt;...&lt;br /&gt;var query = dt.AsEnumerable().AsQueryable();&lt;br /&gt;query = query.Where(&amp;quot;Item&lt;a href="http://code.msdn.microsoft.com/csharpsamples/Wiki/View.aspx?title=%400"&gt;@0&lt;/a&gt; &amp;gt;= 0 and Item&lt;a href="http://code.msdn.microsoft.com/csharpsamples/Wiki/View.aspx?title=%400"&gt;@0&lt;/a&gt; &amp;lt;= 99&amp;quot;, &amp;quot;Index&amp;quot;);&lt;br /&gt; &lt;br /&gt;But but now I get this exception: &amp;quot;No applicable indexer exists in type 'Object'&amp;quot;&lt;br /&gt; &lt;br /&gt;Is there a bug or do I have to do something else in order to get this to work?&lt;br /&gt; &lt;br /&gt;Any help appreciated.&lt;br /&gt;Thanks.&lt;br /&gt;
&lt;/div&gt;</description><author>magbo</author><pubDate>Mon, 15 Jun 2009 07:41:01 GMT</pubDate><guid isPermaLink="false">NEW POST: VS 2008 C# Samples 20090615A</guid></item><item><title>NEW POST: VS 2008 C# Samples</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=12</link><description>&lt;div class="wikidoc"&gt;
I have downloaded and trying to make sense of these applications. I am coming from a Visual Studio 2003/2005 level. Can you please provide a complete sample which works with a test application. I have noticed several good examples here which I can use, but it is taking hours to get one setup to test.&lt;br /&gt; &lt;br /&gt;Any help in this matter is appreciated. &lt;br /&gt;
&lt;/div&gt;</description><author>nandumenon</author><pubDate>Fri, 05 Jun 2009 16:51:13 GMT</pubDate><guid isPermaLink="false">NEW POST: VS 2008 C# Samples 20090605P</guid></item><item><title>NEW POST: VS 2008 C# Samples</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=12</link><description>&lt;div class="wikidoc"&gt;
I cannot open the archive file of C# examples, it appears to be corrupt. Can anyone else d/l the current release and open them. I am using winzip 12.&lt;br /&gt; &lt;br /&gt;thanks&lt;br /&gt;
&lt;/div&gt;</description><author>PaulHJ</author><pubDate>Mon, 30 Mar 2009 10:37:52 GMT</pubDate><guid isPermaLink="false">NEW POST: VS 2008 C# Samples 20090330A</guid></item><item><title>NEW POST: Order and Employees</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=1241</link><description>&lt;div class="wikidoc"&gt;
I like this good example.&lt;br /&gt;I am using NorthwindMapping in a simple WinForm application. I have dropped a DataGridView onto a form and bound it to NorthwindMapping.Order through a BindigSource control.  It works fine, the DataGridView autogenerate the columns. &lt;br /&gt;It generates all the  columns of Orders table plus 3 other: Customer, Employee, Shipper. That's fine.&lt;br /&gt; &lt;br /&gt;Can anyone explain why can be seen the full name of Employees (TitleOfCurtesy + Firstname + Lastname) in the Employee column?&lt;br /&gt;How can the Customer.CompanyName be displayed in Customer column in the same simple way instead of displaying &amp;quot;NorthwindMapping.Customer&amp;quot;?&lt;br /&gt;
&lt;/div&gt;</description><author>atommaki</author><pubDate>Thu, 29 Jan 2009 16:26:36 GMT</pubDate><guid isPermaLink="false">NEW POST: Order and Employees 20090129P</guid></item><item><title>NEW POST: VS 2008 C# Samples</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=12</link><description>&lt;div class="wikidoc"&gt;
In other words, here's a link. You're on your own&lt;br /&gt;
&lt;/div&gt;</description><author>KenH</author><pubDate>Thu, 19 Jun 2008 23:41:56 GMT</pubDate><guid isPermaLink="false">NEW POST: VS 2008 C# Samples 20080619P</guid></item><item><title>NEW POST: Try to use  lazy initialize in collections</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=268</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;I think you might need to create Publisher class.&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>YPG</author><pubDate>Thu, 08 May 2008 10:27:19 GMT</pubDate><guid isPermaLink="false">NEW POST: Try to use  lazy initialize in collections 20080508A</guid></item><item><title>NEW POST: VS 2008 C# Samples</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=12</link><description>&lt;div class="wikidoc"&gt;
Mark,&lt;br /&gt; &lt;br /&gt;Questions like this are best answered in the Forums:&lt;br /&gt; &lt;br /&gt;http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=569&amp;amp;SiteID=1&lt;br /&gt; &lt;br /&gt;- Charlie&lt;br /&gt;
&lt;/div&gt;</description><author>CharlieCalvert</author><pubDate>Fri, 25 Apr 2008 01:45:58 GMT</pubDate><guid isPermaLink="false">NEW POST: VS 2008 C# Samples 20080425A</guid></item><item><title>NEW POST: Try to use  lazy initialize in collections</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=268</link><description>&lt;div class="wikidoc"&gt;
Try to use the easy intialize, I got error this is my coding, anybody can tell me what's wrong&lt;br /&gt; &lt;br /&gt; static public class SampleData&lt;br /&gt;    {&lt;br /&gt;        static public Publisher[] Publishers =&lt;br /&gt;        {&lt;br /&gt;            new Publisher{Name = &amp;quot;FunBools&amp;quot;},&lt;br /&gt;            new Publisher{Name = &amp;quot;Joe Publishing&amp;quot;},&lt;br /&gt;            new Publisher{Name = &amp;quot;I Publisher&amp;quot;}&lt;br /&gt;        };&lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt;the error message is &amp;quot;The type or namespace name 'Publisher' could not be found (are you missing a using directive or an assembly reference)&amp;quot;&lt;br /&gt;
&lt;/div&gt;</description><author>bzeng</author><pubDate>Wed, 09 Apr 2008 20:25:29 GMT</pubDate><guid isPermaLink="false">NEW POST: Try to use  lazy initialize in collections 20080409P</guid></item><item><title>NEW POST: VS 2008 C# Samples</title><link>http://code.msdn.microsoft.com/csharpsamples/Thread/View.aspx?ThreadId=12</link><description>&lt;div class="wikidoc"&gt;
To kick off a discussion of these samples, I'll introduce some of the team members who worked on them. Mary Deyo was the primary QA engineer, Terry Adams did much of the development work, and Alex Turner and myself have both worked on managing the project. In practice, we all did a little bit of everything, but those were the primary roles. We will all try to make ourselves available to answer any questions you might have, and to listen to your suggestions on how to improve the samples. If you haven't done so already, please sign in with your Live ID and then register yourself as a user on the CodeGallery site. The please feel free to continue this thread, or to start a new thread of your own.&lt;br /&gt;
&lt;/div&gt;</description><author>CharlieCalvert</author><pubDate>Thu, 17 Jan 2008 22:01:28 GMT</pubDate><guid isPermaLink="false">NEW POST: VS 2008 C# Samples 20080117P</guid></item></channel></rss>