<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Code Smart Not Hard - CSLA.NET</title>
    <link>http://codesmartnothard.com/</link>
    <description>Team Foundation Server, Frameworks, and Code Generation</description>
    <language>en-us</language>
    <copyright>Michael Douglas</copyright>
    <lastBuildDate>Sun, 03 May 2009 08:20:00 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>mike@doitconsultants.com</managingEditor>
    <webMaster>mike@doitconsultants.com</webMaster>
    <item>
      <trackback:ping>http://codesmartnothard.com/Trackback.aspx?guid=2c831715-241e-42f3-804f-27f446316767</trackback:ping>
      <pingback:server>http://codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://codesmartnothard.com/PermaLink,guid,2c831715-241e-42f3-804f-27f446316767.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://codesmartnothard.com/CommentView,guid,2c831715-241e-42f3-804f-27f446316767.aspx</wfw:comment>
      <wfw:commentRss>http://codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=2c831715-241e-42f3-804f-27f446316767</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It has been awhile since I have been able to work with Csla.  Recently I have
gotten a chance to use it again.   The last time I used Csla was with version
2.0.  Rocky has made a lot of really cool changes since 2.0.  In this new
project I am going to use version 3.6 so I wanted to learn how to do things the new
way instead of the way I was doing it in version 2.0.  His project tracker example
is very thorough and covers almost every possible way to use Csla 3.6 but I think
it can be overwhelming to a new user even with the book.  I wanted to create
a sample that is more simple so I could easily understand the changes and help my
other team members get up to speed with Csla.   
</p>
        <p>
Here’s some of the features I included:
</p>
        <ul>
          <li>
            <strong>Custom base classes</strong> – I wanted to create a custom layer between the
Csla base classes and my implementation.  This is a good practice that allows
framework changes in the base classes instead of modifying the Csla framework. 
This should make upgrades to newer version easier. 
</li>
          <li>
            <strong>New property declarations</strong>– uses new PropertyInfo class to manage
the properties to help eliminate code. 
</li>
          <li>
            <strong>EditLevels </strong>– While this is not new, I hadn’t used it before. 
</li>
          <li>
            <strong>Child_xyz</strong>
            <strong>methods</strong> – new methods in Csla DataPortal
for loading, update/insert, and delete for child objects.  Helps reduce code
and provides more clear code. 
</li>
          <li>
            <strong>WCF</strong> – It wasn’t clear to me how to switch between 2 tier and 3 tier
modes using WCF so I wanted to implement it.  The . 
</li>
          <li>
            <strong>BindingSource</strong> – This also isn’t new but a good practice. 
</li>
          <li>
            <strong>Save Auto-Enabled</strong> – Using the bindingsource’s CurrentItemChanged
event handler, it will update the Save button on row change of the grid.  
The next version of this will use the Csla Action Extender component. 
</li>
        </ul>
        <p>
Here’s the download (includes csla dll).  Enjoy!
</p>
        <p>
          <a href="http://codesmartnothard.com/content/binary/cslawcfexample.zip">cslawcfexample.zip
(657.59 KB)</a>
        </p>
        <p>
Mike
</p>
        <img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=2c831715-241e-42f3-804f-27f446316767" />
      </body>
      <title>Csla 3.6 Example using WCF</title>
      <guid isPermaLink="false">http://codesmartnothard.com/PermaLink,guid,2c831715-241e-42f3-804f-27f446316767.aspx</guid>
      <link>http://codesmartnothard.com/Csla36ExampleUsingWCF.aspx</link>
      <pubDate>Sun, 03 May 2009 08:20:00 GMT</pubDate>
      <description>&lt;p&gt;
It has been awhile since I have been able to work with Csla.&amp;nbsp; Recently I have
gotten a chance to use it again.&amp;nbsp;&amp;nbsp; The last time I used Csla was with version
2.0.&amp;nbsp; Rocky has made a lot of really cool changes since 2.0.&amp;nbsp; In this new
project I am going to use version 3.6 so I wanted to learn how to do things the new
way instead of the way I was doing it in version 2.0.&amp;nbsp; His project tracker example
is very thorough and covers almost every possible way to use Csla 3.6 but I think
it can be overwhelming to a new user even with the book.&amp;nbsp; I wanted to create
a sample that is more simple so I could easily understand the changes and help my
other team members get up to speed with Csla.&amp;nbsp;&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
Here’s some of the features I included:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Custom base classes&lt;/strong&gt; – I wanted to create a custom layer between the
Csla base classes and my implementation.&amp;nbsp; This is a good practice that allows
framework changes in the base classes instead of modifying the Csla framework.&amp;nbsp;
This should make upgrades to newer version easier. 
&lt;li&gt;
&lt;strong&gt;New property declarations&lt;/strong&gt;– uses new PropertyInfo class to manage
the properties to help eliminate code. 
&lt;li&gt;
&lt;strong&gt;EditLevels &lt;/strong&gt;– While this is not new, I hadn’t used it before. 
&lt;li&gt;
&lt;strong&gt;Child_xyz&lt;/strong&gt; &lt;strong&gt;methods&lt;/strong&gt; – new methods in Csla DataPortal
for loading, update/insert, and delete for child objects.&amp;nbsp; Helps reduce code
and provides more clear code. 
&lt;li&gt;
&lt;strong&gt;WCF&lt;/strong&gt; – It wasn’t clear to me how to switch between 2 tier and 3 tier
modes using WCF so I wanted to implement it.&amp;nbsp; The . 
&lt;li&gt;
&lt;strong&gt;BindingSource&lt;/strong&gt; – This also isn’t new but a good practice. 
&lt;li&gt;
&lt;strong&gt;Save Auto-Enabled&lt;/strong&gt; – Using the bindingsource’s CurrentItemChanged
event handler, it will update the Save button on row change of the grid.&amp;nbsp;&amp;nbsp;
The next version of this will use the Csla Action Extender component. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Here’s the download (includes csla dll).&amp;nbsp; Enjoy!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://codesmartnothard.com/content/binary/cslawcfexample.zip"&gt;cslawcfexample.zip
(657.59 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Mike
&lt;/p&gt;
&lt;img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=2c831715-241e-42f3-804f-27f446316767" /&gt;</description>
      <comments>http://codesmartnothard.com/CommentView,guid,2c831715-241e-42f3-804f-27f446316767.aspx</comments>
      <category>CSLA.NET</category>
    </item>
    <item>
      <trackback:ping>http://codesmartnothard.com/Trackback.aspx?guid=41f2f309-8588-413d-89b6-bcd550a3958e</trackback:ping>
      <pingback:server>http://codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://codesmartnothard.com/PermaLink,guid,41f2f309-8588-413d-89b6-bcd550a3958e.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://codesmartnothard.com/CommentView,guid,41f2f309-8588-413d-89b6-bcd550a3958e.aspx</wfw:comment>
      <wfw:commentRss>http://codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=41f2f309-8588-413d-89b6-bcd550a3958e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I admit that while I have been keeping up with Csla information, I haven't had the
opportunity to use the newer versions of Csla.  We have an opportunity to use
Csla with a client so I'm using this chance to catch up on it and get some practical
experience with 3.6.  I downloaded the framework and samples downloads. You can
download the latest framework at <a href="http://www.lhotka.net/cslanet/Download.aspx">http://www.lhotka.net/cslanet/Download.aspx</a></p>
        <p>
I was excited by how much is included in both.  The framework includes snippets,
visual studio templates, and a deployment package.  Here's some highlights.
</p>
        <p>
          <font size="3">
            <strong>Snippets</strong>
          </font>
          <br />
There are several snippets included. With the new way to do properties in Csla, the
editable and readonly property snippets will come in handy.  Here's the results
of the "cslaprop" snippet.<br /><font color="#0000ff" size="2"><font color="#0000ff" size="2"></font></font></p>
        <p>
private<font color="#000000" size="2"></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">static</font></font><font color="#000000" size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">PropertyInfo</font></font><font color="#000000" size="2">&lt;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">int</font></font><font color="#000000" size="2">&gt;
NameProperty = RegisterProperty(</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">new</font></font><font color="#000000" size="2"></font><font color="#2b91af" size="2"><font color="#2b91af" size="2">PropertyInfo</font></font><font color="#000000" size="2">&lt;</font><font color="#0000ff" size="2"><font color="#0000ff" size="2">int</font></font><font color="#000000" size="2">&gt;(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"Name"</font></font><font color="#000000" size="2">, </font><font color="#a31515" size="2"><font color="#a31515" size="2">"Name"</font></font><font size="2"><font color="#000000">));</font></font></p>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">
            <p>
public
</p>
          </font>
        </font>
        <font color="#000000" size="2">
        </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">int</font>
        </font>
        <font size="2">
          <font color="#000000"> Name<br /></font>{<br /></font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">   get</font>
        </font>
        <font color="#000000" size="2"> { </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">return</font>
        </font>
        <font size="2">
          <font color="#000000"> GetProperty(NameProperty);
}<br /></font>
        </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">   set</font>
        </font>
        <font color="#000000" size="2"> {
SetProperty(NameProperty, </font>
        <font color="#0000ff" size="2">
          <font color="#0000ff" size="2">value</font>
        </font>
        <font size="2">
          <font color="#000000">);
}<br /></font>}
</font>
        <p>
          <font size="3">
            <strong>Item Templates<br /></strong>
          </font>When you install the VSI, it installs 14 templates for almost all
common Csla usages and objects.  Like the rest of the framework, the full source
for the templates are included.  So customizing the templates to fit your projects
needs is easy.<br /><img style="WIDTH: 683px; HEIGHT: 373px" height="278" src="http://codesmartnothard.com/content/binary/CslaItemTemplates.jpg" width="551" border="0" /></p>
        <p>
          <font size="3">
            <strong>
            </strong>
          </font> 
</p>
        <p>
          <font size="3">
            <strong>Csla Samples</strong>
          </font>
          <font size="3">
            <br />
          </font>I downloaded the samples project expecting to just see the Project Tracker
example.  The Project Tracker is still the main example but it has been expanded
to include examples for every configuration that Csla supports including WCF, Web
Services, WPF, winforms, Webforms, Silverlight (requires additional Csla for Silverlight
download), LINQ, DTO, Entity Framework, Workflow, etc.
</p>
        <p>
In addition to the Project Tracker, there are examples for doing WPF design time support,
Deep loading and saving of data, and establishing parent-child-grandchild relationships
in Csla.  
</p>
        <p>
I am looking forward to working through all of these examples to see Rocky's recommendations
in the 3.6 version of his framework.
</p>
        <p>
Mike<br />
 
</p>
        <img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=41f2f309-8588-413d-89b6-bcd550a3958e" />
      </body>
      <title>Csla 3.6 packed with goodies</title>
      <guid isPermaLink="false">http://codesmartnothard.com/PermaLink,guid,41f2f309-8588-413d-89b6-bcd550a3958e.aspx</guid>
      <link>http://codesmartnothard.com/Csla36PackedWithGoodies.aspx</link>
      <pubDate>Mon, 08 Dec 2008 00:17:28 GMT</pubDate>
      <description>&lt;p&gt;
I admit that while I have been keeping up with Csla information, I haven't had the
opportunity to use the newer versions of Csla.&amp;nbsp; We have an opportunity to use
Csla with a client so I'm using this chance to catch up on it and get some practical
experience with 3.6.&amp;nbsp; I downloaded the framework and samples downloads. You can
download the latest framework at &lt;a href="http://www.lhotka.net/cslanet/Download.aspx"&gt;http://www.lhotka.net/cslanet/Download.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I was excited by how much is included in both.&amp;nbsp; The framework includes snippets,
visual studio templates, and a deployment package.&amp;nbsp; Here's some highlights.
&lt;/p&gt;
&lt;p&gt;
&lt;font size=3&gt;&lt;strong&gt;Snippets&lt;/strong&gt;&lt;/font&gt;
&lt;br&gt;
There are several snippets included. With the new way to do properties in Csla, the
editable and readonly property snippets will come in handy.&amp;nbsp; Here's the results
of the "cslaprop" snippet.&lt;br&gt;
&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;
&lt;/p&gt;
&lt;p&gt;
private&gt;&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;static&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;PropertyInfo&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;&amp;lt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;&amp;gt;
NameProperty = RegisterProperty(&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#2b91af size=2&gt;&lt;font color=#2b91af size=2&gt;PropertyInfo&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;&amp;lt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;&amp;gt;(&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"Name"&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt;, &lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"Name"&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;));&lt;/font&gt;
&lt;/p&gt;
&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt; 
&lt;p&gt;
public
&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt; Name&lt;br&gt;
&lt;/font&gt;{&lt;br&gt;
&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; { &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt; GetProperty(NameProperty);
}&lt;br&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; {
SetProperty(NameProperty, &lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;font color=#0000ff size=2&gt;value&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font color=#000000&gt;);
}&lt;br&gt;
&lt;/font&gt;}&gt;
&lt;/font&gt; 
&lt;p&gt;
&lt;font size=3&gt;&lt;strong&gt;Item Templates&lt;br&gt;
&lt;/strong&gt;&lt;/font&gt;When you install the VSI, it installs 14 templates for almost all
common Csla usages and objects.&amp;nbsp; Like the rest of the framework, the full source
for the templates are included.&amp;nbsp; So customizing the templates to fit your projects
needs is easy.&lt;br&gt;
&lt;img style="WIDTH: 683px; HEIGHT: 373px" height=278 src="http://codesmartnothard.com/content/binary/CslaItemTemplates.jpg" width=551 border=0&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=3&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;font size=3&gt;&lt;strong&gt;Csla Samples&lt;/strong&gt;&lt;/font&gt;&lt;font size=3&gt;
&lt;br&gt;
&lt;/font&gt;I downloaded the samples project expecting to just see the Project Tracker
example.&amp;nbsp; The Project Tracker is still the main example but it has been expanded
to include examples for every configuration that Csla supports including WCF, Web
Services, WPF, winforms, Webforms, Silverlight (requires additional Csla for Silverlight
download), LINQ, DTO, Entity Framework, Workflow, etc.
&lt;/p&gt;
&lt;p&gt;
In addition to the Project Tracker, there are examples for doing WPF design time support,
Deep loading and saving of data, and establishing parent-child-grandchild relationships
in Csla.&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
I am looking forward to working through all of these examples to see Rocky's recommendations
in the 3.6 version of his framework.
&lt;/p&gt;
&lt;p&gt;
Mike&lt;br&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=41f2f309-8588-413d-89b6-bcd550a3958e" /&gt;</description>
      <comments>http://codesmartnothard.com/CommentView,guid,41f2f309-8588-413d-89b6-bcd550a3958e.aspx</comments>
      <category>CSLA.NET</category>
    </item>
    <item>
      <trackback:ping>http://codesmartnothard.com/Trackback.aspx?guid=7d44748b-71d8-4ced-a69d-51db1ea072d2</trackback:ping>
      <pingback:server>http://codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://codesmartnothard.com/PermaLink,guid,7d44748b-71d8-4ced-a69d-51db1ea072d2.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://codesmartnothard.com/CommentView,guid,7d44748b-71d8-4ced-a69d-51db1ea072d2.aspx</wfw:comment>
      <wfw:commentRss>http://codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7d44748b-71d8-4ced-a69d-51db1ea072d2</wfw:commentRss>
      <title>CSLA.NET and Reports</title>
      <guid isPermaLink="false">http://codesmartnothard.com/PermaLink,guid,7d44748b-71d8-4ced-a69d-51db1ea072d2.aspx</guid>
      <link>http://codesmartnothard.com/CSLANETAndReports.aspx</link>
      <pubDate>Tue, 22 Jan 2008 12:18:28 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;The
CSLA.NET books have some guidance for reports, but I have found that a little different
solution has worked better for us.&amp;nbsp;&amp;nbsp;Reports usually have some similar characteristics.&amp;nbsp; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;ul type=disc&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 10pt; COLOR: #003300; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;The
are read only.&amp;nbsp; Static data.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 10pt; COLOR: #003300; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Logic
for reports are usually in stored procs.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;li class=MsoNormal style="MARGIN: 0in 0in 10pt; COLOR: #003300; LINE-HEIGHT: normal; mso-list: l0 level1 lfo1; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; tab-stops: list .5in"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Usually
different than the standard business object formats.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;So
I got a little push back and I didn't quite like the idea of creating a seperate business
object for each report.&amp;nbsp; We weren't using any validation or code generation.&amp;nbsp;
However, I didn't want to lose some of the power of CSLA.NET like the DataPortal.&amp;nbsp;
I didn't want to use just classic data access and use datasets directly from the database.&amp;nbsp; 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;We
came up with a hybrid report business object.&amp;nbsp; Instead of calling the data access
directly, we used the dataportal_fetch and put the logic in there like a normal business
object.&amp;nbsp; However this object only has one property, ReportDataSet.&amp;nbsp; This
still allows us to use remoting or WCF if we want a middle tier.&amp;nbsp; Each report
then is a new Factory method passing in a custom criteria object including the stored
proc name and a parameters collection.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;The
returned object's dataset property then can be bound to the report.&amp;nbsp; The only
thing we lose is property names.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;Below&amp;nbsp;is
basic example of a ReportFactory class.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: #003300; FONT-FAMILY: 'Verdana','sans-serif'; mso-bidi-font-family: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'"&gt;-Mike&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Collections.Generic;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Text;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Data;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Data.SqlClient;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; System.Collections.Specialized;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; BusinessObjects&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;class&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ReportFactory&lt;/span&gt;&lt;font color=#000000&gt; :
Csla.&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;BusinessBase&lt;/span&gt;&lt;font color=#000000&gt;&amp;lt;&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ReportFactory&lt;/span&gt;&lt;font color=#000000&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;private&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;DataSet&lt;/span&gt;&lt;font color=#000000&gt; reportDataSource;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;DataSet&lt;/span&gt;&lt;font color=#000000&gt; ReportDataSource&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;get&lt;/span&gt;&lt;font color=#000000&gt; { &lt;/font&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; reportDataSource;
}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;static&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ReportFactory&lt;/span&gt;&lt;font color=#000000&gt; GetMonthEndTotalsReport(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&lt;font color=#000000&gt; Month, &lt;/font&gt;&lt;span style="COLOR: blue"&gt;int&lt;/span&gt;&lt;font color=#000000&gt; Year)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: #2b91af"&gt;ReportCriteria&lt;/span&gt;&lt;font color=#000000&gt; criteria
= &lt;/font&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ReportCriteria&lt;/span&gt;&lt;font color=#000000&gt;();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;criteria.SPName
= &lt;/font&gt;&lt;span style="COLOR: #a31515"&gt;"usp_MonthEndTotalsReport"&lt;/span&gt;&lt;font color=#000000&gt;;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;criteria.SQLParameters.Add(&lt;/font&gt;&lt;span style="COLOR: #a31515"&gt;"@Month"&lt;/span&gt;&lt;font color=#000000&gt;,
Month);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;criteria.SQLParameters.Add(&lt;/font&gt;&lt;span style="COLOR: #a31515"&gt;"@Year"&lt;/span&gt;&lt;font color=#000000&gt;,
Year);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; Csla.&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;DataPortal&lt;/span&gt;&lt;font color=#000000&gt;.Fetch&amp;lt;&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ReportFactory&lt;/span&gt;&lt;font color=#000000&gt;&amp;gt;(criteria);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;[&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;Serializable&lt;/span&gt;&lt;font color=#000000&gt;()]&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;protected&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;class&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ReportCriteria&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;font color=#000000&gt; SPName
= &lt;/font&gt;&lt;span style="COLOR: #a31515"&gt;""&lt;/span&gt;&lt;font color=#000000&gt;;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ListDictionary&lt;/span&gt;&lt;font color=#000000&gt; SQLParameters
= &lt;/font&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ListDictionary&lt;/span&gt;&lt;font color=#000000&gt;();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;protected&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;void&lt;/span&gt;&lt;font color=#000000&gt; DataPortal_Fetch(&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;ReportCriteria&lt;/span&gt;&lt;font color=#000000&gt; criteria)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;using&lt;/span&gt;&lt;font color=#000000&gt; (&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;SqlConnection&lt;/span&gt;&lt;font color=#000000&gt; conn
= &lt;/font&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;SqlConnection&lt;/span&gt;&lt;font color=#000000&gt;(&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;Database&lt;/span&gt;&lt;font color=#000000&gt;.Connection))&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;conn.Open();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&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; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;using&lt;/span&gt;&lt;font color=#000000&gt; (&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;SqlCommand&lt;/span&gt;&lt;font color=#000000&gt; cm
= conn.CreateCommand())&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;cm.CommandType
= &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;CommandType&lt;/span&gt;&lt;font color=#000000&gt;.StoredProcedure;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;cm.CommandText
= criteria.SPName;&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&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; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;foreach&lt;/span&gt;&lt;font color=#000000&gt; (&lt;/font&gt;&lt;span style="COLOR: blue"&gt;string&lt;/span&gt;&lt;font color=#000000&gt; param &lt;/font&gt;&lt;span style="COLOR: blue"&gt;in&lt;/span&gt;&lt;font color=#000000&gt; criteria.SQLParameters.Keys)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;cm.Parameters.AddWithValue(param,
criteria.SQLParameters[param]);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;reportDataSource
= &lt;/font&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;DataSet&lt;/span&gt;&lt;font color=#000000&gt;();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&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; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;using&lt;/span&gt;&lt;font color=#000000&gt; (&lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;SqlDataAdapter&lt;/span&gt;&lt;font color=#000000&gt; da
= &lt;/font&gt;&lt;span style="COLOR: blue"&gt;new&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;SqlDataAdapter&lt;/span&gt;&lt;font color=#000000&gt;(cm))&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;da.Fill(reportDataSource);&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&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; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;protected&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;override&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;object&lt;/span&gt;&lt;font color=#000000&gt; GetIdValue()&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;return&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: #2b91af"&gt;Guid&lt;/span&gt;&lt;font color=#000000&gt;.NewGuid();&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;}&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=7d44748b-71d8-4ced-a69d-51db1ea072d2" /&gt;</description>
      <comments>http://codesmartnothard.com/CommentView,guid,7d44748b-71d8-4ced-a69d-51db1ea072d2.aspx</comments>
      <category>CSLA.NET</category>
    </item>
    <item>
      <trackback:ping>http://codesmartnothard.com/Trackback.aspx?guid=ea138e37-fb83-47b3-bbf8-b0ee5c27044f</trackback:ping>
      <pingback:server>http://codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://codesmartnothard.com/PermaLink,guid,ea138e37-fb83-47b3-bbf8-b0ee5c27044f.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://codesmartnothard.com/CommentView,guid,ea138e37-fb83-47b3-bbf8-b0ee5c27044f.aspx</wfw:comment>
      <wfw:commentRss>http://codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=ea138e37-fb83-47b3-bbf8-b0ee5c27044f</wfw:commentRss>
      <title>CSLA.NET Dynamic Validation Rules</title>
      <guid isPermaLink="false">http://codesmartnothard.com/PermaLink,guid,ea138e37-fb83-47b3-bbf8-b0ee5c27044f.aspx</guid>
      <link>http://codesmartnothard.com/CSLANETDynamicValidationRules.aspx</link>
      <pubDate>Sat, 21 Jul 2007 20:50:13 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;&lt;b style="mso-bidi-font-weight: normal"&gt;Our business problem:&lt;/b&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;We
have properties that are required only when the status code is particular statuses.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
caused us to look at how to dynamically add/remove Validation Rules.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Here’s a small example of the different pieces.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I
can’t include the full class because my work doesn’t like me to post that much code.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
should show you the main parts.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;The
only change to CSLA.NET that I can remember is that we had to make the ValidationRules
public so we could call the AddRule and DeleteRule from outside the business object.&amp;nbsp;&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;/span&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font face=Calibri color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;/span&gt;&lt;/font&gt;&lt;font color=#000000&gt;In
the Extended Property of the FullName column:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font size=3&gt;&lt;font color=#000000&gt;&lt;font face=Calibri&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;font size=2&gt;Name&lt;/font&gt; &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;font face=Calibri&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color=#000000&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;IsRequiredForStatus&lt;br&gt;
&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;font face=Calibri&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt; =
Codes.Status.Complete&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Property is generated like this:&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&amp;lt;IsRequiredForStatus(Codes.Status.Complete)&amp;gt;
_&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;Public&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Overridable&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Property&lt;/span&gt;&lt;font color=#000000&gt; FullName() &lt;/font&gt;&lt;span style="COLOR: blue"&gt;As&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;String&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;In the “set” of the nogen Status property (which is of type &lt;font face=Verdana&gt;&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Codes.Status&lt;/span&gt; &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;enumeration),
it calls the function to check the attributes.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
calls the EVIL attributes to process the rules:&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;RunValidationAttributes()&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="mso-bidi-font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;In
the Validator, it uses reflection to get all of the properties of the object. It loops
through each of the properties and checks to see if any of the attributes are of type
VBEvilBaseAttribute.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If so then it calls
the ProcessRule of that attribute class such as “IsRequiredForStats”.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Public&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Class&lt;/span&gt;&lt;font color=#000000&gt; IsRequiredForStatus&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;span style="COLOR: blue"&gt;Inherits&lt;/span&gt;&lt;font color=#000000&gt; VBEvilBaseAttribute&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;
&lt;font color=#000000&gt;&amp;nbsp;&lt;/font&gt;
&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Public&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Overrides&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Function&lt;/span&gt;&lt;font color=#000000&gt; ProcessRule(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;ByVal&lt;/span&gt;&lt;font color=#000000&gt; pi &lt;/font&gt;&lt;span style="COLOR: blue"&gt;As&lt;/span&gt;&lt;font color=#000000&gt; PropertyInfo, 
&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;ByVal&lt;/span&gt;&lt;font color=#000000&gt; entity &lt;/font&gt;&lt;span style="COLOR: blue"&gt;As&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Object&lt;/span&gt;&lt;font color=#000000&gt;) &lt;/font&gt;&lt;span style="COLOR: blue"&gt;As&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Boolean&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="COLOR: black; mso-bidi-font-family: 'Courier New'; mso-no-proof: yes; mso-themecolor: text1"&gt;If
the property’s attribute enumeration value matches the enumeration of the Status property
then it’s required.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The logic below is
done for each datatype.&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;
&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;If&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt; IsRequired &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;span style="COLOR: blue"&gt;If&lt;/span&gt;&lt;font color=#000000&gt; pi.PropertyType &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Is&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;GetType&lt;/span&gt;&lt;font color=#000000&gt;(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;String&lt;/span&gt;&lt;font color=#000000&gt;) &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;Dim&lt;/span&gt;&lt;font color=#000000&gt; args &lt;/font&gt;&lt;span style="COLOR: blue"&gt;As&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;New&lt;/span&gt;&lt;font color=#000000&gt; Csla2.Validation.RuleArgs(pi.Name)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;args.Description
= pi.Name &amp;amp; &lt;/font&gt;&lt;span style="COLOR: #a31515"&gt;" is required for this status."&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;args.Severity
= Csla2.Validation.RuleSeverity.FailsCustomRules&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;busObject.ValidationRules.AddRule(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;AddressOf&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;Csla2.Validation.CommonRules.StringRequired,
args)&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;Else&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;
&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;span style="mso-spacerun: yes"&gt;&lt;font color=#000000&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: blue"&gt;If&lt;/span&gt;&lt;font color=#000000&gt; pi.PropertyType &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Is&lt;/span&gt;&lt;font color=#000000&gt; &lt;/font&gt;&lt;span style="COLOR: blue"&gt;GetType&lt;/span&gt;&lt;font color=#000000&gt;(&lt;/font&gt;&lt;span style="COLOR: blue"&gt;String&lt;/span&gt;&lt;font color=#000000&gt;) &lt;/font&gt;&lt;span style="COLOR: blue"&gt;Then&lt;o:p&gt;&lt;/o:p&gt;
&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;span style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;font color=#000000&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;busObject.ValidationRules.DeleteRule(pi.Name, &lt;/font&gt;&lt;span style="COLOR: #a31515"&gt;"StringRequired"&lt;/span&gt;&lt;font color=#000000&gt;)&lt;/font&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;If you have any questions, comments, or better ideas, please let
me know.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I always like to hear ideas
for using CSLA.NET. I would like to thank Dave Cottle.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;He
is the one that figured out a lot details to make this work.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
Mike
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
Code Smart Not Hard
&lt;/p&gt;
&lt;img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=ea138e37-fb83-47b3-bbf8-b0ee5c27044f" /&gt;</description>
      <comments>http://codesmartnothard.com/CommentView,guid,ea138e37-fb83-47b3-bbf8-b0ee5c27044f.aspx</comments>
      <category>Code Generation;CSLA.NET</category>
    </item>
    <item>
      <trackback:ping>http://codesmartnothard.com/Trackback.aspx?guid=cd6b08bd-3fcd-49ba-8252-d2d28930dad6</trackback:ping>
      <pingback:server>http://codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://codesmartnothard.com/PermaLink,guid,cd6b08bd-3fcd-49ba-8252-d2d28930dad6.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://codesmartnothard.com/CommentView,guid,cd6b08bd-3fcd-49ba-8252-d2d28930dad6.aspx</wfw:comment>
      <wfw:commentRss>http://codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=cd6b08bd-3fcd-49ba-8252-d2d28930dad6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font color="#000000">I have seen several people searching for this that have reached
my site.<span style="mso-spacerun: yes">  </span>The thought of getting the best
of both SubSonic and CSLA.NET worlds has started to intrigue me.<span style="mso-spacerun: yes">   </span>I
previous took the Subsonic templates for granted but I have spent a lot of time modifying
my CSLA.NET templates and the framework.<span style="mso-spacerun: yes">  </span>So
I am going to follow these steps to figure out how possible it was and if it really
makes sense once it is done.</font>
        </p>
        <p class="MsoListParagraphCxSpFirst" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">1.<span style="FONT: 7pt 'Times New Roman'"><font face="Verdana" size="2">       </font></span></span>
            </span>
            <span style="mso-spacerun: yes"> </span>Research
the subsonic templates.<span style="mso-spacerun: yes">  </span>I haven’t looked
at these much so I’m going to look through these to find comparisons and the differences
between my CSLA.NET templates</font>
        </p>
        <p class="MsoListParagraphCxSpMiddle" style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">2.<span style="FONT: 7pt 'Times New Roman'"><font face="Verdana" size="2">       </font></span></span>
            </span>Since
I obviously can’t inherit from both ActiveList/ActiveRecord and BindingListBase and
BindingBase, I have to figure out what the hierarchy should be.<span style="mso-spacerun: yes">  </span>I
am suspecting that there is a lot of common code between the two, especially when
it comes to the binding and implementing the IList, IBindingLIst, etc<span style="mso-spacerun: yes">  </span>interfaces.</font>
        </p>
        <p class="MsoListParagraphCxSpLast" style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1">
          <font color="#000000">
            <span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin">
              <span style="mso-list: Ignore">3.<span style="FONT: 7pt 'Times New Roman'"><font face="Verdana" size="2">       </font></span></span>
            </span>Once
I have the framework ready for my template, I am going to take the VB_ClassTemplate
and modify it to include both references and inherit from the new base.</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font color="#000000">I should be able to have some stuff figured out over the weekend.<span style="mso-spacerun: yes">   </span>I’ll
post the results and some downloads.<span style="mso-spacerun: yes">  </span>Feel
free to send me your thoughts on <span style="mso-spacerun: yes"> </span>what
you think the hybrid templates should look like. </font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font color="#000000">Code Smart Not Hard</font>
        </p>
        <p class="MsoNormal" style="MARGIN: 0in 0in 10pt">
          <font color="#000000">-Mike</font>
        </p>
        <p>
        </p>
        <img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=cd6b08bd-3fcd-49ba-8252-d2d28930dad6" />
      </body>
      <title>SubSonic CSLA.NET Hybrid Templates</title>
      <guid isPermaLink="false">http://codesmartnothard.com/PermaLink,guid,cd6b08bd-3fcd-49ba-8252-d2d28930dad6.aspx</guid>
      <link>http://codesmartnothard.com/SubSonicCSLANETHybridTemplates.aspx</link>
      <pubDate>Sat, 16 Jun 2007 04:54:20 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;I have seen several people searching for this that have reached
my site.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;The thought of getting the best
of both SubSonic and CSLA.NET worlds has started to intrigue me.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;I
previous took the Subsonic templates for granted but I have spent a lot of time modifying
my CSLA.NET templates and the framework.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;So
I am going to follow these steps to figure out how possible it was and if it really
makes sense once it is done.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;1.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;Research
the subsonic templates.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I haven’t looked
at these much so I’m going to look through these to find comparisons and the differences
between my CSLA.NET templates&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;2.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Since
I obviously can’t inherit from both ActiveList/ActiveRecord and BindingListBase and
BindingBase, I have to figure out what the hierarchy should be.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I
am suspecting that there is a lot of common code between the two, especially when
it comes to the binding and implementing the IList, IBindingLIst, etc&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;interfaces.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;span style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"&gt;&lt;span style="mso-list: Ignore"&gt;3.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Once
I have the framework ready for my template, I am going to take the VB_ClassTemplate
and modify it to include both references and inherit from the new base.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;I should be able to have some stuff figured out over the weekend.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;I’ll
post the results and some downloads.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Feel
free to send me your thoughts on &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;what
you think the hybrid templates should look like. &lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Code Smart Not Hard&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;-Mike&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=cd6b08bd-3fcd-49ba-8252-d2d28930dad6" /&gt;</description>
      <comments>http://codesmartnothard.com/CommentView,guid,cd6b08bd-3fcd-49ba-8252-d2d28930dad6.aspx</comments>
      <category>CSLA.NET;SubSonic</category>
    </item>
    <item>
      <trackback:ping>http://codesmartnothard.com/Trackback.aspx?guid=63b956e6-11f2-4ed8-91ed-2fa992045df5</trackback:ping>
      <pingback:server>http://codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://codesmartnothard.com/PermaLink,guid,63b956e6-11f2-4ed8-91ed-2fa992045df5.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://codesmartnothard.com/CommentView,guid,63b956e6-11f2-4ed8-91ed-2fa992045df5.aspx</wfw:comment>
      <wfw:commentRss>http://codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=63b956e6-11f2-4ed8-91ed-2fa992045df5</wfw:commentRss>
      <title>Turning DataObjects into BusinessObjects</title>
      <guid isPermaLink="false">http://codesmartnothard.com/PermaLink,guid,63b956e6-11f2-4ed8-91ed-2fa992045df5.aspx</guid>
      <link>http://codesmartnothard.com/TurningDataObjectsIntoBusinessObjects.aspx</link>
      <pubDate>Sat, 09 Jun 2007 03:54:10 GMT</pubDate>
      <description>&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;&lt;/font&gt;&amp;nbsp;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Objects that are tightly coupled to the table that they reflect
can be referred to as DataObjects.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;BusinessObjects,
however are objects that represent a logic unit contain the attributes and methods
of the business object.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Using CSLA.NET,
CodeSmith Tools for code generation, and partial classes in .NET 2.0 we are able to
take the benefits of code generation and a straightforward DAL with the flexibility
and options needed for designing Business Objects.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Below
are some of the features of my templates that allow me to generate my Business Objects
based on table schema but still allow flexibility&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;font color=#000000&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;Partial
Classes&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Partial Classes is a key feature to my entire code generation
process. The golden rule for generating code is to “Never edit generated code”.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;With
partial classes this is easy.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;All of
my custom functionality can be put in to my “NoGen” partial class file.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;All
of the other features actually contol how and what is generated but I included partial
classes because it really is fundamental to code generation and allows unlimited custom
functionality added to a pure DataObject.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;font color=#000000&gt;Foreign Key Fields&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;This started out a way to display both the key and value data
of a code in a particular row.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;For example
if I had an Employee table with a RoleID column, I could add a RoleName “Foreign Key
Field” to the template properties.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
would generate the property just like it was a column in the table.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;It
is really handy for binding drop down lists to your business object and wanting to
display the text value somewhere else without having to go look it up again.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;This
feature started out as always generating the property as a string and has grown into
a delimited array where I specify the column and the datatype.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Keep
in mind this will generate code for the fetch, update, and insert logic.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;font color=#000000&gt;Require Gen &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;Column&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Sometimes I don’t want the property to be generated but I still
want the fetch, insert, and update data portal functions generated.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In
this case, I specify in my template properties, to skip particular property generation.
Then I can create the custom property in the no-gen partial class. &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;One
example for this is if you have a lookup id field in your table and want the property
to be an enumeration instead of an integer.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;b style="mso-bidi-font-weight: normal"&gt;&lt;font color=#000000&gt;“GenOnly” Tables&lt;o:p&gt;&lt;/o:p&gt;
&lt;/font&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;“GenOnly” tables are tables that I create to base my object when
the data isn’t in the format I want the data displayed.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;For
example I had a table with 6 columns each with a date.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;If
I bound this to a grid, each data for a particular row would display across in column
s.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;However the users wanted to see each
date in its own row.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I couldn’t change
the format the data is stored, so I created a “GenOnly” table with the schema in the
format I wanted.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;MyDates Table&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;MyDateID&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Year1Date&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Year2Date&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Year3Date&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Year4Date&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Year5Date&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo1"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Year6Date&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;GenOnly_MyDates&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo2"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;MyDateID&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo2"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;YearNumber&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo2"&gt;
&lt;font color=#000000&gt;&lt;font face=Verdana&gt;&lt;span style="FONT-FAMILY: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;·&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&lt;font size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;YearDate&lt;/font&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Now I can use my templates to generate my readonly collection
and object classes based on the “GenOnly” table.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;I
then create the SELECT stored procedure to pivot the data into the format of my objects.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;Lastly
I can load the objects and bind it to my grid so the data displays down.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;In
this example the data is readonly so I didn’t need to worry about deletes and updates.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;However,
if I needed to that I could create the UPDATE and DELETE procs to use a CASE statement
or some dynamic SQL.&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;I like to think you can get the best of both worlds in using a
code generator to generate your objects based on table schema but still have some
flexibility because something will be different.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Code Smart Not Hard&lt;/font&gt;
&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;
&lt;font color=#000000&gt;Mike&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=63b956e6-11f2-4ed8-91ed-2fa992045df5" /&gt;</description>
      <comments>http://codesmartnothard.com/CommentView,guid,63b956e6-11f2-4ed8-91ed-2fa992045df5.aspx</comments>
      <category>Code Generation;CSLA.NET</category>
    </item>
    <item>
      <trackback:ping>http://codesmartnothard.com/Trackback.aspx?guid=19ca6b91-1d6a-4b9e-83a7-c120654e6bf5</trackback:ping>
      <pingback:server>http://codesmartnothard.com/pingback.aspx</pingback:server>
      <pingback:target>http://codesmartnothard.com/PermaLink,guid,19ca6b91-1d6a-4b9e-83a7-c120654e6bf5.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://codesmartnothard.com/CommentView,guid,19ca6b91-1d6a-4b9e-83a7-c120654e6bf5.aspx</wfw:comment>
      <wfw:commentRss>http://codesmartnothard.com/SyndicationService.asmx/GetEntryCommentsRss?guid=19ca6b91-1d6a-4b9e-83a7-c120654e6bf5</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A little over a year ago I presented at the Omaha.NET User Group meeting about using
CSLA.NET and Codesmith.   My team and I have been using these two products
together in a project for over a year now.   I absolutely believe these
two products have contributed to the success of the projects.  
</p>
        <p>
CSLA.NET gives us
</p>
        <ul>
          <li>
Unlimited Undo 
</li>
          <li>
Binding to UI Controls 
</li>
          <li>
Base Collection and Editable Objects with CRUD 
</li>
          <li>
Broken rules notification to client via IDataErrorInfo 
</li>
          <li>
Remoting / Direct Data Access with only config change 
</li>
          <li>
much more!</li>
        </ul>
        <p>
We extended CSLA and features provided by our templates
</p>
        <ul>
          <li>
Standard business rules through extended properties in SQL Server like MinLength,
MaxLength, ReadOnly, IsRequired, etc 
</li>
          <li>
Custom business rules for any property by overriding AddCustomBusinessRules() 
</li>
          <li>
Add any custom code in partial classes 
</li>
          <li>
Parent object can contain 0 to many children collections 
</li>
          <li>
CRUD stored procs are generated 
</li>
          <li>
Load Multiple levels at once so that there is only one round trip to the server 
</li>
          <li>
Created SortedFilteredView object to act like a DataView 
</li>
          <li>
Custom column formatting for grids in our business objects</li>
        </ul>
        <p>
Take a look at the zip file attached.   I included the demo and the slides
I used in the presentation.
</p>
        <p>
          <a href="http://codesmartnothard.com/content/binary/CSLA2Demo.zip">CSLA2Demo.zip (1.34
MB)</a>
        </p>
        <p>
If you have any questions or comments you can email me at  mike *at* doitconsultants.com
</p>
        <p>
Mike
</p>
        <img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=19ca6b91-1d6a-4b9e-83a7-c120654e6bf5" />
      </body>
      <title>CSLA.NET and Codesmith Presentation</title>
      <guid isPermaLink="false">http://codesmartnothard.com/PermaLink,guid,19ca6b91-1d6a-4b9e-83a7-c120654e6bf5.aspx</guid>
      <link>http://codesmartnothard.com/CSLANETAndCodesmithPresentation.aspx</link>
      <pubDate>Fri, 16 Mar 2007 03:44:58 GMT</pubDate>
      <description>&lt;p&gt;
A little over a year ago I presented at the Omaha.NET User Group meeting about using
CSLA.NET and Codesmith.&amp;nbsp;&amp;nbsp; My team and I have been using these two products
together in a project for over a year now.&amp;nbsp;&amp;nbsp; I absolutely believe these
two products have contributed to the success of the projects.&amp;nbsp;&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
CSLA.NET gives us
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Unlimited Undo 
&lt;li&gt;
Binding to UI Controls 
&lt;li&gt;
Base Collection and Editable Objects with CRUD 
&lt;li&gt;
Broken rules notification to client via IDataErrorInfo 
&lt;li&gt;
Remoting / Direct Data Access with only config change 
&lt;li&gt;
much more!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
We extended CSLA and features provided by our templates
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Standard business rules through extended properties in SQL Server like MinLength,
MaxLength, ReadOnly, IsRequired, etc 
&lt;li&gt;
Custom business rules for any property by overriding AddCustomBusinessRules() 
&lt;li&gt;
Add any custom code in partial classes 
&lt;li&gt;
Parent object can contain 0 to many children collections 
&lt;li&gt;
CRUD stored procs are generated 
&lt;li&gt;
Load Multiple levels at once so that there is only one round trip to the server 
&lt;li&gt;
Created SortedFilteredView object to act like a DataView 
&lt;li&gt;
Custom column formatting for grids in our business objects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Take a look at the zip file attached.&amp;nbsp;&amp;nbsp; I included the demo and the slides
I used in the presentation.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://codesmartnothard.com/content/binary/CSLA2Demo.zip"&gt;CSLA2Demo.zip (1.34
MB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
If you have any questions or comments you can email me at&amp;nbsp; mike *at* doitconsultants.com
&lt;/p&gt;
&lt;p&gt;
Mike
&lt;/p&gt;
&lt;img width="0" height="0" src="http://codesmartnothard.com/aggbug.ashx?id=19ca6b91-1d6a-4b9e-83a7-c120654e6bf5" /&gt;</description>
      <comments>http://codesmartnothard.com/CommentView,guid,19ca6b91-1d6a-4b9e-83a7-c120654e6bf5.aspx</comments>
      <category>Code Generation;CSLA.NET</category>
    </item>
  </channel>
</rss>