<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : [Solved] Deletion Guard</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : [Solved] Deletion Guard</description>
  <pubDate>Wed, 22 May 2013 08:00:13 -700</pubDate>
  <lastBuildDate>Wed, 12 Sep 2007 19:11:06 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=425</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>[Solved] Deletion Guard : Great! Deletion guard works beautifully....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1164#1164</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 425<br /><strong>Posted:</strong> 12-Sep-2007 at 7:11pm<br /><br />Great!&nbsp; Deletion guard works beautifully.&nbsp; Powerful stuff!]]>
   </description>
   <pubDate>Wed, 12 Sep 2007 19:11:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1164#1164</guid>
  </item> 
  <item>
   <title>[Solved] Deletion Guard : I did read your response on the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1163#1163</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 425<br /><strong>Posted:</strong> 12-Sep-2007 at 7:05pm<br /><br /><P>I did read your response on the other post.&nbsp; Many thanks!!&nbsp; I am in the object mapper right now, setting the base classes for my objects.&nbsp; The BaseEntity thing certainly is the way to go...obviously!</P><DIV>Regenerating the objects, now.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 12 Sep 2007 19:05:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1163#1163</guid>
  </item> 
  <item>
   <title>[Solved] Deletion Guard : Let the object mapper add the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1162#1162</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 425<br /><strong>Posted:</strong> 12-Sep-2007 at 6:59pm<br /><br />Let the object mapper add the inheritance from BaseEntity.&nbsp; That way it will remember and not overwrite it when you regenerate the model.<DIV>&nbsp;</DIV><DIV>Then just be sure BaseEntity inherits from CommonEntity.</DIV><DIV>&nbsp;</DIV><DIV>BaseEntity gives you a place to add your common entity behavior.</DIV><DIV>&nbsp;</DIV><DIV>See my response to your earlier post as well at <a href="http://www.ideablade.com/forum/forum_posts.asp?TID=369" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=369</A>.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Sorry not to respond sooner.</DIV><DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Wed, 12 Sep 2007 18:59:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1162#1162</guid>
  </item> 
  <item>
   <title>[Solved] Deletion Guard : Ahhhhhh...this is not good. My...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1160#1160</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 425<br /><strong>Posted:</strong> 12-Sep-2007 at 6:46pm<br /><br />Ahhhhhh...this is not good.&nbsp; My objects, created by the object mapper tool, skip the BaseEntity and the CommonEntity and inherit directly from Entity.&nbsp; I had to manually add the inheritance to the BaseEntity to the "public abstract partial class" for the datarow.&nbsp; That item was buried a bit.<DIV>&nbsp;</DIV><DIV>Should I even be playing around in the datarow class file since it could be overwritten with the next update to the model project?</DIV><DIV>&nbsp;</DIV><DIV>In the words of Barbarino:&nbsp; I am so confused.&nbsp; <img src="http://www.ideablade.com/forum/smileys/smiley5.gif" height="17" width="17" border="0" align="absmiddle" alt="C&#111;nfused" /></DIV>]]>
   </description>
   <pubDate>Wed, 12 Sep 2007 18:46:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1160#1160</guid>
  </item> 
  <item>
   <title>[Solved] Deletion Guard : Nope. Haven&amp;#039;t checked. However,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1159#1159</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 425<br /><strong>Posted:</strong> 12-Sep-2007 at 6:29pm<br /><br />Nope.&nbsp; Haven't checked.&nbsp; However, this leads me to another post that I made:&nbsp; <a href="http://www.ideablade.com/forum/forum_posts.asp?TID=369" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=369</A>.&nbsp; In it I asked if the object mapper would account for the CAB structure.&nbsp; It obviously does not.&nbsp; But, will it?&nbsp; One day?<DIV>&nbsp;</DIV><DIV>I will see about altering the inheritance, then trying again.&nbsp; Thanks for the response!</DIV><DIV>&nbsp;</DIV><DIV>Bill</DIV>]]>
   </description>
   <pubDate>Wed, 12 Sep 2007 18:29:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1159#1159</guid>
  </item> 
  <item>
   <title>[Solved] Deletion Guard : Are you sure your entity class...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1157#1157</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=97" rel="nofollow">Bill Jensen</a><br /><strong>Subject:</strong> 425<br /><strong>Posted:</strong> 12-Sep-2007 at 4:53pm<br /><br />Are you sure your entity class is inheriting (directly or indirectly) from IdeaBlade.Common.EntityModel.CommonEntity?<DIV>&nbsp;</DIV><DIV>Bill J.</DIV>]]>
   </description>
   <pubDate>Wed, 12 Sep 2007 16:53:17 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1157#1157</guid>
  </item> 
  <item>
   <title>[Solved] Deletion Guard : I added this:   /// &amp;lt;summary&amp;gt;Get...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1154#1154</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 425<br /><strong>Posted:</strong> 12-Sep-2007 at 2:34pm<br /><br />I added this: <DIV><FONT color=#808080 size=2></FONT>&nbsp;</DIV><DIV><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> </FONT><FONT color=#808080 size=2>&lt;summary&gt;</FONT><FONT color=#008000 size=2>Get the displayable name of this object instance (e.g., "Nancy Davolio").</FONT><FONT color=#808080 size=2>&lt;/summary&gt;</FONT></DIV><DIV><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> </FONT><FONT color=#808080 size=2>&lt;remarks&gt;</FONT><FONT color=#008000 size=2>Typically useful in validation messages.</FONT><FONT color=#808080 size=2>&lt;/remarks&gt;</FONT></DIV><DIV><FONT size=2>&#091;</FONT><FONT color=#2b91af size=2>BindingBrowsable</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>)&#093;</FONT></DIV><DIV><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>override</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2> EntityInstanceName { </FONT><FONT color=#0000ff size=2>get</FONT><FONT size=2> { </FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> CustName; } }</FONT></DIV><DIV><FONT size=2>&nbsp;</DIV><DIV><DIV></DIV>It didn't help.&nbsp; I got the same kind of build error...no suitable method found to override (EntityInstanceName).&nbsp; I must not have the proper reference setup somewhere.</FONT></DIV><span style="font-size:10px"><br /><br />Edited by Linguinut - 12-Sep-2007 at 2:36pm</span>]]>
   </description>
   <pubDate>Wed, 12 Sep 2007 14:34:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1154#1154</guid>
  </item> 
  <item>
   <title>[Solved] Deletion Guard : I mimicked the deletion guard...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1153#1153</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=24" rel="nofollow">Linguinut</a><br /><strong>Subject:</strong> 425<br /><strong>Posted:</strong> 12-Sep-2007 at 2:01pm<br /><br />I mimicked the deletion guard code in one of my business objects: <DIV><FONT color=#808080 size=2></FONT>&nbsp;</DIV><DIV><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> </FONT><FONT color=#808080 size=2>&lt;summary&gt;</FONT><FONT color=#008000 size=2>Get if allowed to delete this customer.</FONT><FONT color=#808080 size=2>&lt;/summary&gt;<BR></FONT><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> </FONT><FONT color=#808080 size=2>&lt;remarks&gt;</FONT><FONT color=#008000 size=2>Don't permit delete of customer with orders.</FONT><FONT color=#808080 size=2>&lt;/remarks&gt;</FONT><FONT size=2>&#091;</FONT><FONT color=#2b91af size=2>Bindable</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>)&#093;<BR>&#091;</FONT><FONT color=#2b91af size=2>BindingBrowsable</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>)&#093;<BR></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> <FONT color=#ff0000><strong>override </strong></FONT></FONT><FONT color=#0000ff size=2>bool</FONT><FONT size=2> AllowDelete<BR>{<BR>&nbsp;&nbsp;&nbsp; </FONT><FONT color=#0000ff size=2>get<BR>&nbsp;&nbsp;&nbsp; </FONT><FONT size=2>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (SalesOrderMasters.Count &gt; 0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { </FONT><FONT color=#008000 size=2>// has orders...do not delete<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>;<BR>&nbsp;&nbsp;&nbsp; }<BR>}</DIV></FONT><DIV>&nbsp;</DIV><DIV>Please note that the override throws an exception stating that there is nothing to override (in my CustomerMaster object?).&nbsp; If I remove the override, then it builds and the app runs.&nbsp; I did the same on another object.&nbsp; Here is the message I get when I click the delete button from the navigator:</DIV><DIV>&nbsp;</DIV><DIV>"Are you sure that you want to delete 'MyCompany.MyNamespace.Model.MyObject'?"</DIV><DIV>&nbsp;</DIV><DIV>Whoa!&nbsp; Scary!&nbsp; Not quite what I want to do.&nbsp; I will dig into the code a bit more to find out what is going on, but a quick response here from "someone in the know" would move things along.</DIV><DIV>&nbsp;</DIV><DIV>So, two questions:&nbsp; </DIV><DIV>1)&nbsp; Do I need the override in the deletion guard code?</DIV><DIV>2)&nbsp; How are the strings handled in the actual delete code?</DIV><DIV>&nbsp;</DIV><DIV>Thanks,</DIV><DIV>Bill</DIV><DIV>&nbsp;</DIV><span style="font-size:10px"><br /><br />Edited by Linguinut - 12-Sep-2007 at 7:12pm</span>]]>
   </description>
   <pubDate>Wed, 12 Sep 2007 14:01:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=425&amp;PID=1153#1153</guid>
  </item> 
 </channel>
</rss>