﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Two quick questions...</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 08 Sep 2026 13:29:35 GMT</lastBuildDate><ttl>20</ttl><item><title>Two quick questions...</title><link>http://forum.strataframe.net/FindPost23578.aspx</link><description>1. I'm using ComboBox with enumerated lists.&amp;nbsp; How do I override the enumeration text in the ComboBox dropdownlist ?&lt;/P&gt;&lt;P&gt;2. I'm trying to work with a BO entirely from code (C#) - creation, calling a method on the BO and finally disposing.&amp;nbsp; I am getting blind onto the correct way of doing this.&amp;nbsp; HELP......&lt;/P&gt;&lt;P&gt;Looking forward to hear from you all ;-)&lt;/P&gt;&lt;P&gt;Regards&lt;BR&gt;Ulrik</description><pubDate>Fri, 19 Jun 2009 08:26:02 GMT</pubDate><dc:creator>Ulrik Mueller</dc:creator></item><item><title>RE: Two quick questions...</title><link>http://forum.strataframe.net/FindPost23602.aspx</link><description>Good answers, guys!  Thanks!</description><pubDate>Fri, 19 Jun 2009 08:26:02 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Two quick questions...</title><link>http://forum.strataframe.net/FindPost23596.aspx</link><description>[quote][b]Ulrik Mueller (06/18/2009)[/b][hr]Thanks for the assist - it is working perfectly![/quote]&lt;br&gt;
&lt;br&gt;
Not a problem, glad it worked and it was easy for you. :cool:&lt;br&gt;
&lt;br&gt;
Greg, thanks for the C# translation :hehe:</description><pubDate>Thu, 18 Jun 2009 15:29:50 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Two quick questions...</title><link>http://forum.strataframe.net/FindPost23587.aspx</link><description>Any time! :D</description><pubDate>Thu, 18 Jun 2009 11:29:01 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Two quick questions...</title><link>http://forum.strataframe.net/FindPost23585.aspx</link><description>Thanks for the assist - it is working perfectly!&amp;nbsp;&amp;nbsp; Watch out, i am sure that i'll be back soon with another "simpel" question!&lt;/P&gt;&lt;P&gt;Best regards&lt;BR&gt;Ulrik</description><pubDate>Thu, 18 Jun 2009 11:11:27 GMT</pubDate><dc:creator>Ulrik Mueller</dc:creator></item><item><title>RE: Two quick questions...</title><link>http://forum.strataframe.net/FindPost23583.aspx</link><description>C# versions:&lt;br&gt;
&lt;br&gt;
To change text displayed in an SF combo that is loaded from an enum, set an attribute on each item within the enum:&lt;br&gt;
&lt;br&gt;
[codesnippet]using MicroFour.StrataFrame.Tools&lt;br&gt;
&lt;br&gt;
public enum eMailSendFormat {&lt;br&gt;
&amp;nbsp;&amp;nbsp;// This will now display "Acrobat (PDF)" in combo&lt;br&gt;
&amp;nbsp;&amp;nbsp;[EnumDisplayValue("Acrobat (PDF)")] &lt;br&gt;
&amp;nbsp;&amp;nbsp;Acrobat_PDF = 1;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;// This will now display "Comma Separated Values (Windows-CSV)" in combo&lt;br&gt;
&amp;nbsp;&amp;nbsp;[EnumDisplayValue("Comma Separated Values (Windows-CSV)")] &lt;br&gt;
&amp;nbsp;&amp;nbsp;CSV = 2;&lt;br&gt;
}[/codesnippet]&lt;br&gt;
&lt;br&gt;
The 'using' statement in C# (Using in VB.NET) are used to ensure that disposable objects get disposed. I.e. when the using block is exited, the item is disposed. This occurs whether the code runs it course, you break out of it or an exception occurs within the block. &lt;br&gt;
&lt;br&gt;
[codesnippet]using CustomerBO customers = new CustomerBO() {&lt;br&gt;
&amp;nbsp;&amp;nbsp;customers.FillByCity("Munich");&lt;br&gt;
} // calls customers.Dispose() automatically when this block exits[/codesnippet]</description><pubDate>Thu, 18 Jun 2009 10:50:16 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Two quick questions...</title><link>http://forum.strataframe.net/FindPost23580.aspx</link><description>Hi Ulrik,&lt;br&gt;
&lt;br&gt;
[quote][b]Ulrik Mueller (06/18/2009)[/b][hr]1. I'm using ComboBox with enumerated lists. How do I override the enumeration text in the ComboBox dropdownlist ?[/quote]&lt;br&gt;
&lt;br&gt;
For this you can use the &lt; EnumDispayValue() &gt; from the MicroFour.StrataFrame.Tools, here is sample in VB:&lt;br&gt;
&lt;br&gt;
[quote]&lt;br&gt;
Imports MicroFour.StrataFrame.Tools&lt;br&gt;
&lt;br&gt;
    Public Enum eMailSendFormat As Integer&lt;br&gt;
       &lt; EnumDisplayValue("Acrobat (PDF)") &gt; _&lt;br&gt;
        Acrobat_PDF = 1&lt;br&gt;
&lt;br&gt;
        &lt; EnumDisplayValue("Comma Separated Values (Windows-CSV)") &gt; _&lt;br&gt;
        CSV = 2&lt;br&gt;
    End Enum&lt;br&gt;
[/quote]&lt;br&gt;
&lt;br&gt;
[quote]2. I'm trying to work with a BO entirely from code (C#) - creation, calling a method on the BO and finally disposing. I am getting blind onto the correct way of doing this. HELP......[/quote]&lt;br&gt;
&lt;br&gt;
I am not sure I totaly understand your request here, but here is sample in VB of how to use a SF BO:&lt;br&gt;
[quote]&lt;br&gt;
Using bo As bizItems = New bizItems&lt;br&gt;
            bo.FillByPrimaryKey(pPK_Items)&lt;br&gt;
            If bo.Count = 1 Then&lt;br&gt;
                Return bo.ItemName&lt;br&gt;
            Else&lt;br&gt;
                Return String.Empty&lt;br&gt;
            End If&lt;br&gt;
        End Using&lt;br&gt;
[/quote]&lt;br&gt;</description><pubDate>Thu, 18 Jun 2009 09:50:57 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item></channel></rss>